Bug 442302 - PK doesn't show all updates
Summary: PK doesn't show all updates
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: PackageKit
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Robin Norwood
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 442114 (view as bug list)
Depends On:
Blocks: F9PKBlocker
TreeView+ depends on / blocked
 
Reported: 2008-04-14 03:01 UTC by Matthias Clasen
Modified: 2008-04-17 10:33 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-04-17 10:33:02 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
what's in git master (8.63 KB, patch)
2008-04-15 14:06 UTC, Richard Hughes
no flags Details | Diff

Description Matthias Clasen 2008-04-14 03:01:20 UTC
I just had yum show me 

---> Package mono-extras.i386 0:1.9-7.fc9 set to be updated
---> Package mono-winforms.i386 0:1.9-7.fc9 set to be updated
---> Package mono-core.i386 0:1.9-7.fc9 set to be updated
---> Package mono-data-sqlite.i386 0:1.9-7.fc9 set to be updated
---> Package kdenetwork-libs.i386 7:4.0.3-5.fc9 set to be updated
---> Package mono-data.i386 0:1.9-7.fc9 set to be updated
---> Package nscd.i386 0:2.8-1 set to be updated
---> Package kdenetwork.i386 7:4.0.3-5.fc9 set to be updated
---> Package mono-web.i386 0:1.9-7.fc9 set to be updated

At the same time, PackageKit was only showing me kdenetwork as an available
update. Is there some subpackage filtering going on ?

Comment 1 Richard Hughes 2008-04-14 11:25:59 UTC
Yes, it looks like BASENAME is not doing the right thing. I'll add to my todo.

Comment 2 Richard Hughes 2008-04-14 11:26:59 UTC
*** Bug 442114 has been marked as a duplicate of this bug. ***

Comment 3 Richard Hughes 2008-04-15 10:51:16 UTC
[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.


Comment 4 Richard Hughes 2008-04-15 14:06:44 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.