Question to show-installed

Radek Holy rholy at redhat.com
Wed Apr 22 09:36:25 UTC 2015


----- Original Message -----
> From: "Harald Heigl" <Harald.Heigl1000+yumdevel at gmail.com>
> To: yum-devel at lists.baseurl.org
> Sent: Tuesday, April 21, 2015 11:05:14 PM
> Subject: Re: Question to show-installed
> 
> Hi,
> 
> Sorry for my late reply, had lots of work the last weeks.
> Just my two cents:
> 
> So when do I need a kickstart-install:
> 1) My computer crashes and I have to reinstall the same version on
> another computer, ok this never happened so far. Here I would use my
> whole package list ...
> 2) I'm not regularly upgrading, mostly I'm skipping 1 or 2 versions
> and then I do mostly a fresh install (instead of an upgrade). Here I
> will use a kickstart with some system presets (graphics, base, ...)
> and my userinstalled packages. Systempackages don't interest me so far
> (perhaps they have changed anyway between versions), I assume they are
> mostly in the presets.
> 
> The more comprehensive the better, for example I'm not interested if
> I'm having 20 libreoffice-packages, if all of this could be described
> with a simple group @libreoffice. So I can go through the list and
> adjust.
> 
> For now I ended with a show-installed (reduced by a reason-user of
> yumdb) plus a small script which makes a diff between leaves(+deps)
> and full package list, this gives me a small set including my circular
> dependencies. It's not that performant, but it works ...
> 
> For now I decided to wait with my fresh install till F22 (which should
> use dnf as default, if I'm correctly informed). A "dnf history
> userinstalled" might help in the future, there are just some points:
> 
> 1) Will this also show the dependencies or just the package I
> installed with "dnf install ..."?

It prints only those packages installed with "dnf install" (and similar); no dependencies.

> 2) Are there any efforts, that this command shows yum-installed
> packages too or is this impossible?

No efforts AFAIK. The problem is that DNF does not access YUM's DB which contains the necessary information. Without that, DNF only knows that the given package was not installed using DNF but it does not know whether it's user-installed or a dependency. And since YUM is being deprecated, I'm afraid that the state won't change.

But! You can use a "migrate" plugin, which is part of the community plugins package, to migrate YUMDB. Then DNF would know everything to list yum-installed packages using "history userinstalled" as well.

> 3) What if packages not only installed via console but via graphical
> installer, will this be noticed by dnf history userinstalled?

The same applies for the other package managers. DNF does not access their databases (in case they even store such information). Without that information, DNF has no clue. But sure, if there is a demand, we can collaborate with them. One possible solution may be here: https://bugzilla.redhat.com/show_bug.cgi?id=1167239

> All in all a list with all packages compressed to leaves and groups
> (that's what show-installed does) with an additional filter for
> userinstalled and respect to possible circular references would make
> the list complete and kickstart ready. At least for me ...


* leaves: done
* groups: missing (I think this would be really useful, at least in form of a switch; could you file an RFE, please?)
* filter: done
* circular dependencies: done (I believe that they does not affect the current "history userinstalled" implementation)


> Thanks,
> Harald
> 
> 2015-03-17 13:00 GMT+01:00  <yum-devel-request at lists.baseurl.org>:
> > Send Yum-devel mailing list submissions to
> >         yum-devel at lists.baseurl.org
> >
> > To subscribe or unsubscribe via the World Wide Web, visit
> >         http://lists.baseurl.org/mailman/listinfo/yum-devel
> > or, via email, send a message with subject or body 'help' to
> >         yum-devel-request at lists.baseurl.org
> >
> > You can reach the person managing the list at
> >         yum-devel-owner at lists.baseurl.org
> >
> > When replying, please edit your Subject line so it is more specific
> > than "Re: Contents of Yum-devel digest..."
> >
> >
> > Today's Topics:
> >
> >    1. Re: Question to show-installed (Radek Holy)
> >    2. Re: Question to show-installed (Florian Festi)
> >
> >
> > ----------------------------------------------------------------------
> >
> > Message: 1
> > Date: Mon, 16 Mar 2015 11:18:53 -0400 (EDT)
> > From: Radek Holy <rholy at redhat.com>
> > To: yum development <yum-devel at lists.baseurl.org>
> > Subject: Re: Question to show-installed
> > Message-ID:
> >         <1279347462.26385981.1426519133204.JavaMail.zimbra at redhat.com>
> > Content-Type: text/plain; charset=utf-8
> >
> >
> >
> > ----- Original Message -----
> >> From: "Florian Festi" <ffesti at redhat.com>
> >> To: yum-devel at lists.baseurl.org
> >> Sent: Friday, March 13, 2015 10:55:58 AM
> >> Subject: Re: Question to show-installed
> >>
> >> On 03/12/2015 11:10 AM, Radek Holy wrote:
> >> > Take a look at `dnf history userinstalled`. I think this is actually
> >> > what
> >> > you are looking for. The output is designed so that it can be directly
> >> > used in the Kickstart files. The disadvantage is that DNF does not share
> >> > the history database with YUM. Thus the command works only for packages
> >> > installed via DNF. If a package is not installed via DNF, the command
> >> > assumes that the package is not "installed by a user".
> >>
> >> With the yum/dnf history being messed up the way it is I wonder if this
> >> command should actually do what show-installed does in addition to
> >> looking into the history. Ending up with a kickstart list that is
> >> missing important parts of the system is of very little help.
> >>
> >> This is IMHO one example where we just do not give the user the
> >> information she needs although we actually know that data we provide is
> >> lacking.
> >
> > Actually, I confused "YUM/DNF history" with "YUMDB/DNFDB". DNF would need
> > *YUMDB* to work with packages installed by YUM. But the rest is correct.
> >
> > Hm, if you could tell me what does "show-installed" do, I could tell you
> > whether it is what `dnf history userinstalled` should do. Man pages say
> > "gives a compact description of the packages installed (or given) making
> > use of the comps groups found in the repositories". This is very vague. I
> > can talk about "dnf info installed" and "dnf group" but I know that
> > "show-installed" does something else.
> >
> > But I guess that the answer is: "no". Actually, the purpose of `dnf history
> > userinstalled` is very simple. It should do what was requested in a bug
> > 884615.
> > --
> > Radek Hol?
> > Associate Software Engineer
> > Software Management Team
> > Red Hat Czech
> >
> >
> > ------------------------------
> >
> > Message: 2
> > Date: Tue, 17 Mar 2015 11:45:50 +0100
> > From: Florian Festi <ffesti at redhat.com>
> > To: yum-devel at lists.baseurl.org
> > Subject: Re: Question to show-installed
> > Message-ID: <550805DE.2080406 at redhat.com>
> > Content-Type: text/plain; charset=utf-8
> >
> > On 03/16/2015 04:18 PM, Radek Holy wrote:
> >>
> >>
> >> ----- Original Message -----
> >>> From: "Florian Festi" <ffesti at redhat.com>
> >>> To: yum-devel at lists.baseurl.org
> >>> Sent: Friday, March 13, 2015 10:55:58 AM
> >>> Subject: Re: Question to show-installed
> >>>
> >>> On 03/12/2015 11:10 AM, Radek Holy wrote:
> >>>> Take a look at `dnf history userinstalled`. I think this is actually
> >>>> what
> >>>> you are looking for. The output is designed so that it can be directly
> >>>> used in the Kickstart files. The disadvantage is that DNF does not share
> >>>> the history database with YUM. Thus the command works only for packages
> >>>> installed via DNF. If a package is not installed via DNF, the command
> >>>> assumes that the package is not "installed by a user".
> >>>
> >>> With the yum/dnf history being messed up the way it is I wonder if this
> >>> command should actually do what show-installed does in addition to
> >>> looking into the history. Ending up with a kickstart list that is
> >>> missing important parts of the system is of very little help.
> >>>
> >>> This is IMHO one example where we just do not give the user the
> >>> information she needs although we actually know that data we provide is
> >>> lacking.
> >>
> >> Actually, I confused "YUM/DNF history" with "YUMDB/DNFDB". DNF would need
> >> *YUMDB* to work with packages installed by YUM. But the rest is correct.
> >>
> >> Hm, if you could tell me what does "show-installed" do, I could tell you
> >> whether it is what `dnf history userinstalled` should do. Man pages say
> >> "gives a compact description of the packages installed (or given) making
> >> use of the comps groups found in the repositories". This is very vague. I
> >> can talk about "dnf info installed" and "dnf group" but I know that
> >> "show-installed" does something else.
> >
> > Well, show-installed tries to construct a minimal list of groups and
> > packages that can go into a kickstart file to reconstruct the current
> > set of packages. I implemented it basically as a prove of concept
> > implementation that I had hoped would be picked up to close the gaps we
> > have in the userinstalled data in the yum/dnf db/history. Unfortunately
> > this never happened.
> >
> >> But I guess that the answer is: "no". Actually, the purpose of `dnf
> >> history userinstalled` is very simple. It should do what was requested in
> >> a bug 884615.
> >
> > The problem is that the definition of "simple" is the wrong one. It is
> > "simple" in the sense of "easy to get from the data we have". IMHO we
> > should focus more an making answers to the simple questions that users
> > would ask available. The question that comes to mind is "What got
> > installed on this system?" dnf history userinstalled asks this question
> > but restricts the answer to "but only after the system got installed"
> > which is a restriction, making the question more complicated - much less
> > useful - but more easy to answer.
> >
> > What we'd need is a yum list command that returns a (kickstart
> > compatible) list of groups and packages that will get the system in the
> > same state as it is right now - including the yumdb metadata. So all
> > packages and groups that were tagged with reason "user" would still be
> > in the reinstalled system (some packages might be additionally)[*].
> >
> > The reason why this is an interesting command to have is not only the
> > user in kickstart but much more that it gives a compact, human readable
> > description of the whole system.
> >
> > This would of course need to be based on the userinstalled data but with
> > additional reasoning for the leaf packages that - for what ever reason -
> > are not tagged as userinstalled.
> >
> > Florian
> >
> > [*] I guess this won't work because anaconda won't tag the packages
> > properly but this does not disprove my point. In opposite it is (if it
> > is in fact true) just one more place where this whole "reason" thing is
> > not thought through/not properly implemented.
> >
> > --
> >
> > Red Hat GmbH, http://www.de.redhat.com/ Registered seat: Grasbrunn,
> > Commercial register: Amtsgericht Muenchen, HRB 153243,
> > Managing Directors: Charles Cachera, Michael Cunningham, Michael
> > O'Neill, Charles Peters
> >
> >
> > ------------------------------
> >
> > Subject: Digest Footer
> >
> > _______________________________________________
> > Yum-devel mailing list
> > Yum-devel at lists.baseurl.org
> > http://lists.baseurl.org/mailman/listinfo/yum-devel
> >
> >
> > ------------------------------
> >
> > End of Yum-devel Digest, Vol 132, Issue 7
> > *****************************************
> _______________________________________________
> Yum-devel mailing list
> Yum-devel at lists.baseurl.org
> http://lists.baseurl.org/mailman/listinfo/yum-devel
> 

-- 
Radek Holý
Associate Software Engineer
Software Management Team
Red Hat Czech


More information about the Yum-devel mailing list