[Rpm-maint] Rally: minor API requests
mls at suse.de
Tue Nov 13 11:42:46 UTC 2007
On Tue, Nov 13, 2007 at 10:09:24AM +0200, Panu Matilainen wrote:
> On Sat, 3 Nov 2007, Maxim Udushlivy wrote:
> > The first is very small and is about the way to check RPM database
> >modification time. This is crucial for a GUI application as in order to
> >run smoothly it must have a full list of installed RPM's with a minimal
> >delay after start. Rally uses a fast internal cache which should be
> >updated only if some RPM's were installed or erased since the last run.
> >Currently I do the same as the Smart package manager: use stat(2)/st_mtime
> >on "/var/lib/rpm/Packages" file, but a specialized function would make RPM
> >API a bit more complete. As an alternative that function may return the
> >number of transactions committed to the database.
> Sounds entirely reasonable to me, there are a number of users (smartpm,
> apt-rpm ...) that would benefit. Whatever the implementation, it needs to
> abstract out any backend DB details (as rpm supports BDB and SQLite
> backends for the DB)
Here's another idea I use in my little installer project: add
an interface that returns all database ids of all installed
packages (i.e. the numbers that you specify with --querybynumber).
With that information you can easily retrieve just the changed
packages from the rpm database.
Michael Schroeder mls at suse.de
SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg
More information about the Rpm-maint