# Why some of the port names are different than path?



## kenorb (Nov 10, 2010)

```
Path:	/usr/ports/databases/mysql-workbench52
```


```
> sudo portinstall mysql-workbench52
** No such package or port: mysql-workbench52
> sudo portinstall mysql-workbench52\*
** No such package or port: mysql-workbench52*
```

And the port name is:	mysql-workbench-oss52-5.2.1_4

It's not confusing?


----------



## SirDice (Nov 10, 2010)

kenorb said:
			
		

> And the port name is:	mysql-workbench-oss52-5.2.1_4


No, that's the package name.


----------



## kenorb (Nov 10, 2010)

Other example:

```
> portsearch -n mysql-server-5.1
Port:	mysql-server-5.1.51_1
Path:	/usr/ports/databases/mysql51-server
Info:	Multithreaded SQL database (server)
Maint:	ale@FreeBSD.org
B-deps:	mysql-client-5.1.51_1
R-deps:	mysql-client-5.1.51_1
WWW:	http://www.mysql.com/
> portinstall
usage: portinstall [-habcCDDefFiklnOpPPqrRsuvwWy] [-A command] [-B command]
        [-L format] [-S command] [-x pkgname_glob]
        [[-o origin] [-m make_args] [-M make_env] pkgname_glob ...]
pkgname_glob is one of these: a full pkgname, a pkgname w/o version,
a shell glob pattern in which you can use wildcards *, ?, and [..],
an extended regular expression preceded by a colon (:), or a date range
specification preceded by either < or >.  See pkg_glob(1) for details.
The package list is automatically sorted in dependency order.
```

When using port name and path name, doesn't work for both.

```
> sudo portinstall mysql-server-5.1.51_1
** No such package or port: mysql-server-5.1.51_1
> sudo portinstall mysql51-server
** No such package or port: mysql51-server
```
How can I check with portsearch which name I should use for portinstall then?


----------



## SirDice (Nov 10, 2010)

kenorb said:
			
		

> How can I check with portsearch which name I should use for portinstall then?


Just cd to /usr/ports and use the relative path to the port. Having the CWD in /usr/ports means you can use tab-completion :e


----------



## kenorb (Nov 10, 2010)

Anyway I'm kind of person who wants to know why this doesn't work from the source and how I could use portsearch tool in proper way in above case. This is the reason why this tool was created, to save the time to cd's to ports and make all the make's steps manually.

```
> pkg_info -W portsearch
/usr/local/bin/portsearch was installed by package portsearch-1.3.2
```


----------



## SirDice (Nov 10, 2010)

I don't use portsearch but I do use ports-mgmt/psearch. Should be quite similar though. Just search for a name without any version numbers in it.


```
dice@molly:~>psearch mysql-server
databases/mysql323-server Multithreaded SQL database (server)
databases/mysql40-server  Multithreaded SQL database (server)
databases/mysql41-server  Multithreaded SQL database (server)
databases/mysql50-server  Multithreaded SQL database (server)
databases/mysql51-server  Multithreaded SQL database (server)
databases/mysql55-server  Multithreaded SQL database (server)
```


----------



## aragon (Nov 10, 2010)

You can also do:


```
cd /usr/ports/databases/mysql-workbench52
make package-name
```


----------



## kenorb (Nov 10, 2010)

Anyway to force portsearch to return package-name? psearch looks like it's only returning port paths.


----------



## DutchDaemon (Nov 10, 2010)

[cmd=]psearch -n[/cmd]


```
$ psearch -n mysql-workbench
mysql-workbench-oss51-5.1.16_4 The MySQL Workbench
mysql-workbench-oss52-5.2.1_4 The MySQL Workbench
```


----------



## Jamz (Nov 11, 2010)

```
cd /usr/ports
make search name=blah
```

or


```
cd /usr/ports
make search key=blah
```

Has always worked fine for me..

James


----------



## kenorb (Nov 11, 2010)

DutchDaemon said:
			
		

> [cmd=]psearch -n[/cmd]



This works, thanks.


```
[CMD="psearch"]> psearch -nl mysql-workbench[/CMD]
mysql-workbench-oss51-5.1.16_4 The MySQL Workbench
    MySQL Workbench is a cross-platform, visual database design tool developed 
    by MySQL. It is the highly anticipated successor application of the 
    DBDesigner4 project.
    
    WWW: http://dev.mysql.com/workbench/
```


----------



## kenorb (Dec 14, 2010)

This one is funny:

```
> sudo portinstall gdk-pixbuf2
** No such package or port: gdk-pixbuf2
```

Really?

```
> sudo portinstall gdk-pixbuf\*
--->  Found 2 ports matching 'gdk-pixbuf*':
	graphics/gdk-pixbuf
	graphics/gdk-pixbuf2
** Found already installed package(s) of 'graphics/gdk-pixbuf': gdk-pixbuf-0.22.0_11
** Found already installed package(s) of 'graphics/gdk-pixbuf2': gdk-pixbuf-2.22.1
```


----------

