# "pkg info kde4" fails, only "pkg info x11/kde4" works. Why?



## Snurg (Feb 2, 2018)

this does not work:

```
# pkg info kde4
pkg: No package(s) matching kde4
#
```

Why does it only work this way?

```
# pkg info x11/kde4
<snipped expected output>
#
```

Is this intended behavior?
I find that a bit annoying because one first has to do a web search for the path of the meta package one wants to look for.
This makes easy things complicated


----------



## linux->bsd (Feb 2, 2018)

That is annoying, and I've seen it before on I think a different program. But I wanted to point out you don't need to do a web search to find the path of the meta package.


```
# echo /usr/ports/**/kde4
/usr/ports/x11/kde4
```


----------



## ljboiler (Feb 2, 2018)

It would work if you did this:

```
pkg info kde
```
Why?   Because KDE is the "meta" package for installing a bunch of KDE4 pieces, and the version # is not part of that meta-package name.


----------



## ShelLuser (Feb 2, 2018)

Simple solution: use the regexp option (-x):


```
unicron:/home/peter/snapshot $ pkg info -x kde4
kde4-style-bespin-201303202227_5
kde4-style-nitrogen-1.0.5_8
kde4-style-oxygen-transparent-2014.03.10_3
kde4-style-polyester-2.0.0_10
kde4-style-qtcurve-1.8.18_3
kde4-style-skulpture-0.2.4_1
kde4-wallpapers-freebsd-1.0
kde4-windeco-dekorator-0.5.1_7
kde4-xdg-env-1.1_1
py27-pykde4-4.14.3_5
```

(edit)

Obviously this doesn't apply to the KDE aspect for reasons explained above, but it can make it a lot easier to search for packages.


----------



## tobik@ (Feb 2, 2018)

With flavors support in the ports tree a port can generate multiple packages with different names.  Using the origin to install packages will install all available flavors which is probably almost never what you intend to do. This also applies to using pkg-info(8) and other commands.

If you're unsure what the package names are for a given origin you can always look them up with something like

```
$ pkg search -L name -e devel/py-setuptools
py27-setuptools                Python packages installer
py35-setuptools                Python packages installer
py34-setuptools                Python packages installer
py36-setuptools                Python packages installer
$ pkg search -L name -e x11/kde4
kde                            KDE Software Compilation 4 (meta port)
```


----------



## Snurg (Feb 2, 2018)

Thank to you all, this makes me understand the thing a bit better.
It still is complicated...  for example I haven't yet found out how to get pkg info about gnome3... 
linux->bsd's trick seems generally the easiest, and if this doesn't give me the package category, like with the python installers @tobik mentioned, then freshports helps...


----------



## talsamon (Feb 2, 2018)

Seems the behaviour of `pkg info` is inconsistent: e.g. it works with `py27-pytest`.

```
pkg info py27-pytest
py27-pytest-3.4.0
Name           : py27-pytest
.....
```


```
pkg info py27-pytest\*
py27-pytest-3.4.0
py27-pytest-capturelog-0.7
py27-pytest-runner-2.11.1
py27-pytest-timeout-1.2.0
py27-pytest-xdist-1.13.1
```


----------

