[Yum] Using yum as a dependency resolution component

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

 



While I have been using yum the way it was intended for about a month 
now, I am interested in exploring a possibility of using yum as a 
dependency resolution "component," as part of a larger system.

I have a way to textually specify system  installation. Part of it lists 
all the packages installed on the system. The idea is that an any given 
time the textual representation if valid. Now, suppose a use edits this 
representation and adds one more package to the list. If I am to take 
this new representation and install a machine based on it, I would have 
no guarantee that it will be stable, because the user might not have 
specified all the dependent packages. To prevent this problem,  I would 
like to provide an interface to the user to modify this textual 
representation. When user tell the system that he wants to add one 
package, the system might end up adding more to the list (textual 
representation of the system configuration) after all the dependencies 
are resolved.

Since yum already does dependency resolution I would like to use it. 
Ideally, once the user specified the package he wants to add, 
internally, I run "yum -C get_dependency_set <user_package>" and yum 
returns, say:
"
<user_package>
<package1_that_user_package_also_needs>
<some_other_required_package>
"

I would like to run yum from cache, to make it a little faster. The 
"get_dependency_set" is, obviously, not implemented yet.

What is the best way to achieve this?  If the community thinks that this 
is a worthwhile flag to have, I would write the glue code necessary to 
get this flag call yum's internal functions (once I figure out where 
these functions are).

Once other way would be to run "yum install <package> and just parse 
yum's output, since it has package information when it asks confirmation 
questions. But his seems like a bad way.

-Sergei



[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