Some questions on smart usage

Anders F Björklund afb at algonet.se
Fri Sep 2 13:47:50 PDT 2011


Sriram Narayanan wrote:
> With Anders backport of createrepo 0.9.x features to 0.4.11, all
> that's needed to get a working package management system are rpm5,
> smart and create 0.4.11. Yum itself is not needed.

For some reason I ported yum to FreeBSD, for createrepo perhaps,
so you *could* probably benefit from that if you really want yum.

> Getting yum to work on Belenix needs a bit of work since there's some
> solaris glibc issue there, I recall from some earlier experiments.

I don't think yum was ever meant to run on something other than
Linux, or in a prefix other than /usr. Certainly not coded for it.

> So, here are some questions:
> 1. Assuming a system that has only smart, what would be the
> equivalents of the yum-utils (http://yum.baseurl.org/wiki/YumUtils) ?

There's only the smart commands. So if you want such a utility,
you would have to write it using the Python API. There's a few
examples in the "sandbox" directory, not all of them updated...
There's a *lot* of options to the regular smart commands, though.

Quick guessing:
# debuginfo-install 	 install debuginfo packages and their dependencies
=> smart install ?
# find-repos-of-install 	show which repository the currently installed packages came from
=> pkgconf.getOrigin(pkg) - Bug #687713
# package-cleanup 	manage package cleanup, duplicates, orphaned packages and outstanding dependency problems
=> smart query --dupes | --leaves, smart fix
# repo-graph 	outputs a full package dependency list in dot format
=> smart query --format=graphviz (see below)
# repo-rss 	generates an RSS feed from one or more repositories
=> smart query --format=template (not released)
# repoclosure 	reads metadata of repositories, checks dependencies and displays list of unresolved dependencies
=> smart check ?
# repodiff 	takes two or more repositories, returns a list of added, removed or changed packages
=> ?
# repomanage 	manages a directory of rpm packages, returns a list of newest or oldest packages in a directory
=> ?
# repoquery 	query yum repositories and get additional information on the them
=> ?
# reposync 	synchronize a remote yum repository to a local directory using yum to retrieve packages
=> ?
# repotrack 	track packages and its dependencies and downloads them
=> ?
# verifytree 	verify that a local yum repository is consistent
=> smart check
# yum-builddep 	installs missing dependencies to build a specified package
=> smart build-dep (lp:~afb/smart/source)
# yum-complete-transaction 	finds incomplete or aborted yum transactions and attempts to complete them
# yum-debug-dump	Dump infomation about the systems yum configuration into a tarball
=> smart config --show | --yaml ?
# yum-debug-restore	Works with the tarball generated above
=> not implemented ?
# yum-groups-manager	generates the metadata for yum groups
=> not implemented
yumdownloader 	downloads packages from yum repositories including source RPMs 
# => smart download | source

But it's not a translation, smart is not bug-compatible
with APT and Yum and doesn't have all the features either.
However, since you have a repodata directory you should be
able to run yum directly on it externally (if possible) ?

> 2. How do distro developers who have only smart arrive at dependency graphs ?
> I'm about to install Fedora 15 tomorrow and will try the yum-utils
> tool called "repo-graph" to figure out the output that this utility
> gives.

There's a few options to the "smart-query" output, that can be
used to create dependency graphs. Especially graphviz and dotty:

smart query --show-requires --show-providedby \
            --format=graphviz --output=graph.dot

--anders




More information about the Smart mailing list