Bug 442302
Summary: | PK doesn't show all updates | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Matthias Clasen <mclasen> | ||||
Component: | PackageKit | Assignee: | Robin Norwood <robin.norwood> | ||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | low | Docs Contact: | |||||
Priority: | low | ||||||
Version: | rawhide | CC: | richard, selinux, tim.lauridsen | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2008-04-17 10:33:02 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 441857 | ||||||
Attachments: |
|
Description
Matthias Clasen
2008-04-14 03:01:20 UTC
Yes, it looks like BASENAME is not doing the right thing. I'll add to my todo. *** Bug 442114 has been marked as a duplicate of this bug. *** [hughsie@hughsie-work helpers]$ ./get-updates.py basename allow-cancel true no-percentage-updates status info package normal glibc;2.8-1;i686;rawhide The GNU libc libraries package normal tomboy;0.10.1-2.fc9;i386;rawhide Tomboy is a desktop note-taking application for Linux and Unix package normal gvfs;0.2.3-2.fc9;i386;rawhide Backends for the gio framework in GLib [hughsie@hughsie-work helpers]$ ./get-updates.py none allow-cancel true no-percentage-updates status info package normal mono-data;1.9-7.fc9;i386;rawhide Database connectivity for Mono package normal mono-core;1.9-7.fc9;i386;rawhide The Mono CIL runtime, suitable for running .NET code package normal glibc-devel;2.8-1;i386;rawhide Object files for development using standard C libraries. package normal gdm-user-switch-applet;1:2.21.10-0.2008.04.11.3.fc9;i386;rawhide GDM User Switcher Panel Applet package normal glibc-debuginfo-common;2.8-1;i386;rawhide-debuginfo Debug information for package glibc package normal libvolume_id;120-3.fc9;i386;rawhide Dynamic libraries to get volume ids package normal nscd;2.8-1;i386;rawhide A Name Service Caching Daemon (nscd). package normal mono-winforms;1.9-7.fc9;i386;rawhide Windows Forms implementation for Mono package normal glibc;2.8-1;i686;rawhide The GNU libc libraries package normal glibc-headers;2.8-1;i386;rawhide Header files for development using standard C libraries. package normal mono-web;1.9-7.fc9;i386;rawhide ASP.NET, Remoting, and Web Services for Mono package normal tomboy;0.10.1-2.fc9;i386;rawhide Tomboy is a desktop note-taking application for Linux and Unix package normal desktop-backgrounds-basic;9.0.0-1;noarch;rawhide Desktop background base set. package normal glibc-debuginfo;2.8-1;i686;rawhide-debuginfo Debug information for package glibc package normal mono-data-sqlite;1.9-7.fc9;i386;rawhide sqlite database connectivity for Mono package normal libvolume_id-devel;120-3.fc9;i386;rawhide Static libraries and headers for libvolume_id package normal gvfs;0.2.3-2.fc9;i386;rawhide Backends for the gio framework in GLib package normal glibc-common;2.8-1;i386;rawhide Common binaries and locale data for glibc package normal mono-extras;1.9-7.fc9;i386;rawhide Provides the infrastructure for running and building daemons and services with Mono as well as various stub assemblies Now, the BASENAME filter is doing: def _check_basename(self, pkg): ''' If a package does not have a source rpm (If that ever happens), or it does have a source RPM, and the package's name is the same as the source RPM's name, then we assume it is the 'base' package. ''' basename = pkg.name print 'basename:'+pkg.name print 'source:'+pkg.sourcerpm if pkg.sourcerpm: basename = rpmUtils.miscutils.splitFilename(pkg.sourcerpm)[0] if basename == pkg.name: return True return False So, because there is no "mono" or "libvolume_id" rpm packages, then these never match. The latter, libvolume_id is provided by udev, so that's never going to match in a million years. [Side note: if libvolume_id was built, wasn't a new udev also built at the same time?] So, we try to return the SRPM name in this case. This isn't going to work as: (this is correct for rawhide, we don't get metadata) [hughsie@hughsie-work helpers]$ ./get-update-detail.py "libvolume_id-devel;120-3.fc9;i386;rawhide" allow-cancel true no-percentage-updates status info updatedetail libvolume_id-devel;120-3.fc9;i386;rawhide libvolume_id-devel;120-2.fc9;i386;installed none (incorrect) [hughsie@hughsie-work helpers]$ ./get-update-detail.py "udev;120-3.fc9;;" allow-cancel true no-percentage-updates status info updatedetail udev;120-3.fc9;; udev;120-3.fc9;i386;installed none i.e. because we are not updating udev, we are just updating a package that udev.srpm creates then we fail to do the match. The same with mono.srpm, it doesn't create a mono.rpm, only mono-foo. Out of interest, the libvolume_id-devel package is created in udev.spec like this: %package -n libvolume_id-devel Summary: Static libraries and headers for libvolume_id Group: Development/Libraries Requires: libvolume_id = %{version}-%{release} Now, the way forward out of this tricky situation with a couple of lists: create list of updates with no filtering clear output_list clear base_list for each entry base=get_srpm_name if entry=base add entry to output_list add base to base_list else if base not in base_list add entry to output_list add base to base_list for each output_list emit Package I'll prototype that code now and see if I can make it do something sane. Created attachment 302456 [details]
what's in git master
This is what I've merged to master - it produces the following (correct)
output:
[hughsie@hughsie-work helpers]$ ./get-updates.py basename
allow-cancel true
no-percentage-updates
status info
package normal glibc;2.8-1;i686;rawhide The GNU libc libraries
package normal tomboy;0.10.1-2.fc9;i386;rawhide Tomboy is a desktop
note-taking application for Linux and Unix
package normal gvfs;0.2.3-2.fc9;i386;rawhide Backends for the gio framework
in GLib
package normal mono-data;1.9-7.fc9;i386;rawhide Database connectivity
for Mono
package normal
gdm-user-switch-applet;1:2.21.10-0.2008.04.11.3.fc9;i386;rawhide GDM
User Switcher Panel Applet
package normal libvolume_id;120-3.fc9;i386;rawhide Dynamic libraries to
get volume ids
package normal desktop-backgrounds-basic;9.0.0-1;noarch;rawhide Desktop
background base set.
If it works okay, in a few days I'll backport it into stable.
|