#848544 packagekit-tools: Looking up modalias info using what-provides find nothing

Package:
packagekit-tools
Source:
packagekit
Description:
Provides PackageKit command-line tools
Submitter:
Petter Reinholdtsen
Date:
2024-07-25 04:36:03 UTC
Severity:
normal
#848544#5
Date:
2016-12-18 09:09:32 UTC
From:
To:
According to
<URL: https://github.com/kororaproject/kp-pharlap/tree/master/upstream >,
the pkcon implementation in Ubuntu is able to look up packages
supporting a given hardware device using the what-provides call.  As
AppStrema have information about this particular device, I expected this
to work:

  pkcon what-provides usb:v08E6p3438d0200dc00dsc00dp00ic0Bisc00ip00in00

But when I run it, I do not get a list of packages, only this:

  Getting provides              [=========================]
  Loading cache                 [=========================]
  Finished                      [=========================]

It also describe a dummy modalias for all attached hardware, which also
do not work:

  pkcon what-provides "drivers_for_attached_hardware"

#848544#10
Date:
2016-12-18 15:05:51 UTC
From:
To:
2016-12-18 10:09 GMT+01:00 Petter Reinholdtsen <pere@hungry.com>:

This only works for distributions which have this information embedded
in their package manager metadata (e.g. Fedora) or when it is injected
for a limited amount of packages (only Ubuntu) - the only way to make
this feature work properly on Debian would be to make PK query the
data from AppStream...
I wonder whether doing so would make sense...

Cheers,
    Matthias

#848544#15
Date:
2016-12-18 15:05:51 UTC
From:
To:
2016-12-18 10:09 GMT+01:00 Petter Reinholdtsen <pere@hungry.com>:

This only works for distributions which have this information embedded
in their package manager metadata (e.g. Fedora) or when it is injected
for a limited amount of packages (only Ubuntu) - the only way to make
this feature work properly on Debian would be to make PK query the
data from AppStream...
I wonder whether doing so would make sense...

Cheers,
    Matthias

#848544#20
Date:
2016-12-18 22:35:53 UTC
From:
To:
[Matthias Klumpp]

Why do you doubt it make sense??

As for a limited amount of packages, it seem to me like the number of
hardware related packages in Debian is rather small.  There are 210
packages with files in /lib/udev/rules.d/, and four with files in
/lib/firmware/, which both are good indicators to identify hardware
related packages.  We do not need to modify the entire archive for this
to work, just a few hundred packages. :)

#848544#25
Date:
2016-12-18 23:05:34 UTC
From:
To:
2016-12-18 23:35 GMT+01:00 Petter Reinholdtsen <pere@hungry.com>:

I doubt adding AppStream support to PK makes sense, because anyone who
wants this data could simply use AppStream and then call PK.

#848544#30
Date:
2017-04-02 17:46:32 UTC
From:
To:
2016-12-18 10:09 GMT+01:00 Petter Reinholdtsen <pere@hungry.com>:

By the way, 'pkcon what-provides' no longer works in Ubuntu 16.10 and newer.

It's too bad because it broke what we had been using to install Ubuntu
language packs on Ubuntu GNOME. https://launchpad.net/bugs/1631750

Thanks,
Jeremy Bicha

#848544#35
Date:
2017-04-02 18:11:04 UTC
From:
To:
2017-04-02 19:46 GMT+02:00 Jeremy Bicha <jbicha@ubuntu.com>:

This is an Ubuntu-specific feature. The only stuff that is actually
implemented and should be working with PackageKit is searches for
codecs and to a very limited extend libraries and mimetypes.
does something different to make it work.
The long-term solution for l10n stuff in Debian will be AppStream:
https://www.freedesktop.org/software/appstream/docs/sect-Metadata-Localization.html
- I haven't yet had the time to work on it though.

In any case, going through appstreamcli to find the stuff you want is
easier today:
appstreamcli what-provides %type% %stuff%

(or just search & grep)

Cheers,
    Matthias

#848544#40
Date:
2017-04-02 18:18:39 UTC
From:
To:
2017-04-02 20:11 GMT+02:00 Matthias Klumpp <matthias@tenstral.net>:

Btw, I was thinking about making PackageKit's aptcc backend use
AppStream in Debian to provide this functionality, as there is no
other way to easily have it, but doing that is a low priority tasks as
people who want it can have it today just by linking against
libappstream and requesting the components.

I might add support for it at some point though, to achieve PK API
completion ;-)

Cheers,
    Matthias

#848544#45
Date:
2024-07-25 04:33:38 UTC
From:
To:
[Matthias Klumpp]

I see.  One argument for adding it is to ensure consistency between
Linux distributions, allowing documentation mentioning "pkcon
what-provides" to be valid on most Linux distributions.  Then again, the
same could be said for using appstreamcli.  And there is not really a
reason it should only work with one of them.