On Fri, Apr 01, 2016 at 02:05:46PM +0200, Tomas Chvatal wrote:
> I was wondering if it would be possible to extend rpmdb to contain
> information about how package was pulled in the dependency graph.
> 
> At this point we at openSUSE have some sort of solver trying to
> magically do it in zypper and you guys at Fedora have it in dnf.

libzypp stores this information in /var/lib/zypp/AutoInstalled,
yum stores it in /var/lib/yum/yumdb, dnf stores it in
/var/lib/dnf/yumdb. (I guess the next version of dnf that is based
on libhif will store it in /var/lib/yum/yumdb again, but we'll see...)

> I would more like to see it tracked in the rpm because that way we
> could properly have all packages in the db, including the ones users
> installed via rpm commands and could see if they are
>  a) directly requested by user
>  b) just dependency of something and thus eligible for removal

Most implementations (including libzypp) assume that packages that
are not in the extra database are installed via rpm commands.

> I guess dnf/zypper would just flag them during install as True/False
> depending if they are direct request or dependency and for rpm we would
> always flag them as True for the solver as requested by user.
> 
> Would something like this make sense?

Dunno. Check https://bugzilla.redhat.com/show_bug.cgi?id=1167239

You can either store this information directly in the rpm db, or
you can have a little extra db like currently done with libzypp/yum/dnf.

Having an extra db makes it easier to change the autoinstalled status
of a package later on (which is something that needs to be dont from
time to time). Having in stored in the rpm header makes changing
the info more expensive, but it makes sure that the data is always
in sync.

Independent of the database implementation I would very much like
to have a commin interface in librpm, so that different software
management stacks all use the same mechansim.

Cheers,
  Michael.

-- 
Michael Schroeder                                   m...@suse.de
SUSE LINUX GmbH,           GF Jeff Hawn, HRB 16746 AG Nuernberg
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}
_______________________________________________
Rpm-ecosystem mailing list
Rpm-ecosystem@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-ecosystem

Reply via email to