On Apr 1, 2016, at 9:03 AM, devzero2000 wrote:

> No bad idea
> 
> 

<aside>
The semantics of "installed through dependencies" is
less useful than one might imagine. The intent is usually
to permit automatic  uninstall extensions when some
explicitly chosen package is uninstalled as in "unneeded".

The state machine in rpmlib (and transactional logs) cannot easily
accomodate, say, a subsidiary package that is "installed through
dependencies" that is then upgraded without the deliberately chosen
package being upgraded:.

Is that still a "installed through dependencies" package or not?
(i.e. is the magic marker persistent independent of
additional upgrades -- and changes in the package -- or not).

Sure one can invent semantics and define behavior explicitly,
just there are lots of side effects that what have to be undertaken
propagating the tag forward persistently. Consider what would be
needed with hot fixes like
        rpm -e --nodeps --justdb
or
        rpm --reinstall
to ensure that the tag could be maintained persistently and reliably.
</aside>

Meanwhile all that RPM itself could do is provide the storage mechanism
with, say, a tag/state in a header in an rpmdb. RPM itself does
only what is specified, either from the CLI, or throuch libraries/bindings.

And if the storage is through an appended header tag, the behavior would not be
"persistent", and the side effects of propagating an appended tag through
additional upgrades to achieve "persistence".

Alternatively,  changing the rpmdb schema to add a different persistent
index tracking package state to save the "installed through dependencies"
state would likely not meet anyone's expectations any better than writing
the info that whatever the given depsolver wishes to have in some flat file.

hth

73 de Jeff

> ---------- Messaggio inoltrato ----------
> Da: "Pascal Terjan" <pter...@gmail.com>
> Data: 01/Apr/2016 14:12
> Oggetto: Re: [Rpm-ecosystem] Using rpm db to track unneeded packages
> A: <tchva...@suse.cz>, <rpm-ecosys...@lists.rpm.org>
> Cc: 
> 
> On 1 April 2016 at 13:05, Tomas Chvatal <tchva...@suse.cz> wrote:
> > Hello,
> >
> > 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.
> >
> > 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
> 
> urpmi has its own tracking (a simple text file
> /var/lib/rpm/installed-through-deps.list) but I think that would be
> nice to have it in rpm directly so that it works whatever tool is used
> to install the packages
> 
> > 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?
> >
> > Cheers
> >
> > Tom
> > _______________________________________________
> > Rpm-ecosystem mailing list
> > rpm-ecosys...@lists.rpm.org
> > http://lists.rpm.org/mailman/listinfo/rpm-ecosystem
> >
> _______________________________________________
> Rpm-ecosystem mailing list
> rpm-ecosys...@lists.rpm.org
> http://lists.rpm.org/mailman/listinfo/rpm-ecosystem

Reply via email to