[packagekit] basename filter

Robin Norwood rnorwood at redhat.com
Sat Mar 1 16:43:00 PST 2008


On Sat, 01 Mar 2008 22:03:05 +0100
Richard Hughes <hughsient at gmail.com> wrote:

> Using origin/forked-dbus-backend:
> 
> sudo dbus-send --system --dest=org.freedesktop.PackageKitYumBackend
> --type=method_call --print-reply /org/freedesktop/PackageKitBackend
> org.freedesktop.PackageKitBackend.GetUpdates string:basename
> 
> AllowCancel (1)
> NoPercentageUpdates
> StatusChanged (info)
> Package (bugfix, lohit-fonts-oriya;2.1.9-1.fc8;noarch;updates, Free
> Oriya font) Package (bugfix,
> lohit-fonts-telugu;2.1.9-1.fc8;noarch;updates, Free Telugu font)
> Package (bugfix, lohit-fonts-tamil;2.1.9-1.fc8;noarch;updates, Free
> Tamil font) Package (enhancement,
> b43-fwcutter;011-3.fc8;i386;updates, Firmware extraction tool for
> Broadcom wireless driver) Package (bugfix,
> ConsoleKit-x11;0.2.3-3.fc8.1;i386;updates, X11-requiring add-ons for
> ConsoleKit) Package (bugfix,
> ConsoleKit-libs;0.2.3-3.fc8.1;i386;updates, ConsoleKit libraries)
> Package (bugfix, lohit-fonts-gujarati;2.1.9-1.fc8;noarch;updates,
> Free Gujarati font) Package (bugfix,
> ConsoleKit;0.2.3-3.fc8.1;i386;updates, System daemon for tracking
> users, sessions and seats) Package (bugfix,
> lohit-fonts-kannada;2.1.9-1.fc8;noarch;updates, Free Kannada font)
> Package (bugfix, lohit-fonts-punjabi;2.1.9-1.fc8;noarch;updates, Free
> Punjabi font) Package (bugfix, at;3.1.10-20.fc8;i386;updates, Job
> spooling tools) Package (bugfix,
> lohit-fonts-hindi;2.1.9-1.fc8;noarch;updates, Free Hindi font)
> Package (bugfix, lohit-fonts-malayalam;2.1.9-1.fc8;noarch;updates,
> Free Malayalam font) Package (bugfix,
> lohit-fonts-bengali;2.1.9-1.fc8;noarch;updates, Free Bengali font)
> Finished (success)
> 
> Looks good.
> 
> sudo dbus-send --system --dest=org.freedesktop.PackageKitYumBackend
> --type=method_call --print-reply /org/freedesktop/PackageKitBackend
> org.freedesktop.PackageKitBackend.GetUpdates string:basename
> 
> AllowCancel (1)
> NoPercentageUpdates
> StatusChanged (info)
> Package (enhancement, b43-fwcutter;011-3.fc8;i386;updates, Firmware
> extraction tool for Broadcom wireless driver) Package (bugfix,
> ConsoleKit;0.2.3-3.fc8.1;i386;updates, System daemon for tracking
> users, sessions and seats) Package (bugfix,
> at;3.1.10-20.fc8;i386;updates, Job spooling tools) Finished (success)
> 
> So basename seems to ignore lohit-fonts-* - any ideas why?

Yeah...

So the logic I used to show only 'base' packages was 'If the package
has an SRPM, and the package name doesn't match the SRPM name, then
don't show it'.

So the lohit-fonts-* packages have an SRPM (lohit-fonts), but there's
no 'lohit-fonts' package, only lohit-fonts-*.  I'll have to change the
logic to catch that case, which means that GetUpdates (for yum) will
spit out all the Package() signals at once, instead of dribbling them
out as we get them from yum.  Shouldn't be a big deal, though.

-RN

-- 
Robin Norwood
Red Hat, Inc.

"The Sage does nothing, yet nothing remains undone."
-Lao Tzu, Te Tao Ching



More information about the PackageKit mailing list