HOWTO: How to install Smart Package Manager for FC3
2005-04-05 Posted by xanax
Overview
Smart is a meta-package manager in the spirit of APT, YUM, URPMI and others.
It’s a cross-distribution tool that can manage RPM, DEB and Slackware packages but what makes Smart apart is a dependency-solving algorithm that outperforms other package managers. It currently supports several repository formats, including those used by APT, YUM and URPMI. By the way, in Smart, repositories are called “channels”.
Note: even if Smart can manage all these package formats, that doesn’t mean you will be able to install DEB packages on Fedora.
While cross-packaging system dependencies could be enabled easily, the packaging policies simply do not exist today.
While other softwares try to find a possible solution to satisfy the relations involved in some user-requested operation, and sometimes even fail to do so, Smart goes beyond it. In the kernel of Smart Package Manager lives an algorithm that will not only find a solution, if one is available, but will find the best solution. This is done by quickly weighting every possible solution with a pluggable policy, which redefines the term “best” depending on the operation goal (install, remove, upgrade, etc).
Smart can handle inconsistent states, downgrade packages when necessary and do better dependency-checking.
See the README page for some situations where Smart outperforms APT’s and YUM’s dependency-checking systems.
It is also able to handle broken systems: if you have unsatisfied dependencies, Smart won’t force you to fix the problem unless it is absolutely necessary to perform the operation you are requesting. Of course, if you really want Smart to fix the problem, you could run smart fix or choose “Fix all problems” in the GUI.
Smart features priorities. Those are a powerful way to easily handle integration of multiple channels and explicit user setups regarding preferred package versions. Basically, packages with higher priorities are considered a better option to be installed in the system, even when package versions state otherwise. Priorities may be individually assigned to all packages in given channels, to all packages with given names, and to packages with given names inside given channels. With custom priority setups, it becomes possible to avoid unwanted upgrades, force downgrades, select packages in given channels as preferential, and other kinds of interesting setups.
This behavior has many interesting consequences. In upgrades, for instance, while precedence is given to newer versions, intermediate versions may get selected if they result in a better global result for the system. Packages may even be reinstalled, if different packages with the same name-version pair have different relations, and the one not installed is a considered better option.
Smart has an easily-extensible, clean architecture. It is written in Python with some C code in performance-critical areas.
Smart was written by Gustavo Niemeyer of Conectiva, and it was first released to the public on December 04, 2004.
Among other things, Niemeyer maintains APT-RPM and Synaptic…
Installation
To install the program, download from the Dag Wieers Repository the following packages:
- smart
- smart-gui
- smart-update
- ksmarttray (if you use KDE)
During this article, we will assume (for the example) that your username is “mike” and that you use KDE.
So, create a new repertory in /home/mike/ called “smart”:
[mike@localhost]$ md /home/mike/smart ; cd /home/mike/smart [mike@localhost smart]$
To get the RPMs, simply download them with your web browser or use wget with the exact URL of the packages:
$ wget http://dag.wieers.com/packages/smart/smart-0.30.2-1.1.fc3.rf.i386.rpm $ wget http://dag.wieers.com/packages/smart/smart-gui-0.30.2-1.1.fc3.rf.i386.rpm $ wget http://dag.wieers.com/packages/smart/smart-update-0.30.2-1.1.fc3.rf.i386.rpm $ wget http://dag.wieers.com/packages/smart/ksmarttray-0.30.2-1.1.fc3.rf.i386.rpm
As you can see, wget downloaded them correctly:
[mike@localhost smart]$ ls ksmarttray-0.30.2-1.1.fc3.rf.i386.rpm smart-0.30.2-1.1.fc3.rf.i386.rpm smart-gui-0.30.2-1.1.fc3.rf.i386.rpm smart-update-0.30.2-1.1.fc3.rf.i386.rpm [mike@localhost smart]$
Now, to install them all at once:
[mike@localhost smart]$ su Password: [root@localhost smart]# rpm -Uvh *.rpm warning: ksmarttray-0.30.2-1.1.fc3.rf.i386.rpm: signature V3 DSA: NOKEY, key ID 6b8d79e6 Preparing... ########################################### [100%] 1:smart ########################################### [ 25%] 2:smart-update ########################################### [ 50%] 3:ksmarttray ########################################### [ 75%] 4:smart-gui ########################################### [100%] [root@localhost smart]#
Screenshots
After installing Smart, a shortcut will be added in the Menu / System Settings:

Here is the GUI:

The Edit / Channels window (the screenshot is reduced at 75%):

For KDE users, here is what ksmarttray looks like:
Commands
Smart Package Manager may be run in many different ways, depending on the interface in use and on the intended goal.
The following command would install the foobar package, for instance:
# smart install foobar
While the following command would install the foobar package, but with graphic output:
# smart --gui install foobar
To open the graphic interface in interactive mode, one may simply run:
# smart --gui
Similarly, the following command would open the shell interface:
# smart --shell
If you want to install a package from a remote URL, just use this command:
# smart install http://some.url/some/path/foo-1.1-1.i386.rpm
To remove a package from the system, type:
# smart remove foobar
Extensive help is available for all commands, by using the –help switch:
# smart --help # smart install --help # smart channel --help ...

FN Blog Login