Thomas Fitzsimmons <[EMAIL PROTECTED]> writes:

> I'm working on a way to pass per-architecture package counts to
> scriptlets [1].  Jeff Johnson suggested creating a new database index
> for this purpose [2].
>
> Attached are two patches against Fedora 9's rpm.  The first adds a
> Namearch index to the RPM database.  The second uses Namearch to
> implement a new rpmlib function, rpmdbCountPackagesArch.

One question on this patch: is Namearch really worth it?

In the typical case, rpmtsRun() is already doing 2 iterations on
"Name" doing headerLoad. And there are a few more.

IMO if we look at optimisations, there are many things that should be
done before this. For example, it would be far more effective to
introduce a "Packages-light" with only the more interesting piece of
information (EVRA and maybe a few more). This would make "rpm -qa"
much much more faster/lighter (I/O accesses on Packages are really
killing it).

So i would say, implement rpmdbCountPackagesArch() using
rpmdbSetIteratorRE() for now.


As for "change $1 and $2 to be per-arch", i wonder if it won't break
some things in case of "shared files": the %preun|%postun will think
it is the last, whereas in fact the other arch package is still
installed and providing the files. Uh? (this is only wild guess since
i've no experience on this, since once again Mandriva is handling this
differently, without rpm help)
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to