[Yum] package list builder...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2003-10-31 at 12:30, Robert G. Brown wrote:
> Well, I got a package list builder built and running, and alas, learned
> an important thing about the way the groups are structured that make it
> impossible to realize my goal on TOP of yum -- I'm really going to have
> to hack yum itself to make it go.
> 
> The application
> 
>   a) gets a full list of installed packages (yum list installed).
>   b) gets a full list of all groups, installed or not (yum grouplist)
>   c) expands each group, extracts mandatory and default packages, and
> maintains a "hit count" to see if a group is 50% or more installed
> (making it faster to install the group and adjust downward by removing
> packages than it is to install the packages).  All of this goes into
> hash/structs in perl with keys that are package or group names.
>   d) in a second pass, print out groups selected for install followed by
> the package removal deltas, followed by leftover packages that aren't in
> any of the installed groups.
> 
> So far, so good, works charmlike.
> 
> EXCEPT, as it turns out, the groups do not include the automatically
> included dependencies of the toplevel packages selected for install.
> These presumably are automagically expanded by both kickstart and yum,
> and hence are not toplevel package targets.
> 
> As a consequence, there are WAY more leftover packages then there
> "should" be using yum as a tool.  In order to do what I want to do with
> yum, all the dependencies have to be resolved and the dependent packages
> removed from the leftovers to produce a truly minimal list.  At this
> point, even though I installed my testbed/development system from a
> kickstart file and hence have a fairly accurate idea of what its minimal
> package list looks like, the output of the algorithm above is way off,
> although a lot better than just a raw list of applications (and it would
> of course be harmless to have the dependencies already listed in the
> kickstart file, EXCEPT that they might change!).

ok, let me make sure I understand what you want to do here:

you want to have a program, look at your system, determine what groups
you have installed and what additional packages you have installed and
dump you the kickstart-like output for that? Is that correct?

if so - look in yumcomps.py and see what mechanisms I'm using in there
to generate the 'installed groups' list.

then remove the if statement that excludes groups that are marked as
uservisible = false - then that will show you things like Base and Core
that are hidden but, by default, installed groups, via kickstart.

You hardly even need yum to do this. You should only need comps.py (from
rhpl), yumcomps.py and a short script that reads your rpmdb and dumps
the package names.

-sv



[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux