Updating your system the Smart way

148

Author: Federico Kereki

All Linux distributions have things in common, but many differ in software installation and updating. Gentoo Linux is based on Portage, SUSE uses YaST, Red Hat and Fedora opt for yum, Linspire prefers CNR…. Oh, and don’t forget the different package options: RPM, Debian, source, and more esoteric options. Smart Package Manager works with all major distributions, replacing native tools and installing different types of packages.

As an openSUSE user, I’ve tried YaST, Zen, zypper, apt-get, and Synaptic, but I finally settled down with Smart. My first step after every installation and update is to install it and getting rid of all alternatives.

Smart is currently at version 0.52 and is available under the General Public License (GPL).

Why “Smart”?

Smart’s name comes from the algorithms it uses to solve “dependency hell” problems, which result when you want to install a package that depends on other packages that in turn depend on more packages. If you try doing such an installation by hand, you’ll end up spending most of your time chasing down the dependencies. Smart not only tries to solve these problems automatically, but also seeks the best possible solution in terms of needed changes. For example, when upgrading a package, it might choose a not-so-new version if it’s better for the rest of the installed packages in your system.

Smart is also flexible regarding mirror supports. A mirror is an Internet nide that provides the same contents as in another Web place, called an origin. If you provide several alternative mirrors, Smart will decide which to use based on the history of previous downloads. It chooses the fastest mirrors with the fewest errors or problems. It can do parallel downloads, allows multiple connections to a site, and supports timestamp checking, download resuming, and cached files. It can deal with all the usual protocols: FTP, FTPS, HTTP, HTTPS, SCP, Telnet, LDAP.

Using Smart

Smart offers several interfaces geared toward different kinds of users. You can use a command-line interface, a shell interface (which eases performing multiple operations), or a Python-based graphic interface. Depending on your background, you might want to start with the former or the latter, but in the end, it’s likely you’ll go for the shell version. KDE users can also install ksmarttray and be notified about available updates.

The easiest way to install Smart is by using the standard repositories and tools of your favorite distribution. For example, openSUSE keeps Smart in the suser-guru repository, and you can install it with YaST. Failing that, check the downloads for specific distros on the Smart Web site, and if that also doesn’t help, you can download the source code from the site and make and install the software yourself.

What is a channel?

Once you have Smart installed, you can use it to install other applications. In Smart terminology, software repositories are called channels. You can learn about the possible channels by using the command smart channel –help, which shows that Smart can deal with repositories such as the following (some of distributions that use those formats are shown in parentheses):

apt-deb APT-DEB repositories
apt-rpm APT-RPM repositories
deb-dir DEB repositories (Debian, of course, and also Ubuntu)
red-carpet Red Carpet channel
rpm-dir RPM directory (Fedora)
rpm-hdl RPM header list
rpm-md RPM metadata
slack-site Slackware repositories (Slackware, obviously)
urpmi urpmi repositories (Mandriva)
yast2 YaST repositories (openSUSE)

To define channels using the graphic interface, go to Edit -> Channels. You’ll see a window that shows all the defined channels and allows you to add, remove, or change channels. The most direct way to add a channel is by going to New -> Provide Channel -> Information, picking the channel type, and then specifying the alias (short name), full name, priority, and URL for the repository. Click on Manual Updates to update the channel manually instead of automatically, click on Disabled to choose whether to use the channel or not, and click on Removable to choose whether the repository is in a removable media, such as a CD or DVD.

After having created or edited all your channels, click on the Update icon at the top left or navigate to File -> Update Channels. Should any of the channels not be available right then, the update process will stop until you close the warning window; if you use the shell version, Smart will go on to the next channel.

You can also perform these tasks with the command-line interface by using the smart channel –add mychannel type=theChannelType name=“theRepositoryName” baseurl=theChannelURL and smart update commands; you can find more on these with smart –help or man smart.

If you want to find appropriate channels, just search the Internet a bit, and remember that you’ll be able to use all the standard repositories for your distribution. Of course, you can also use repositories for other distributions, but don’t; better safe than sorry.

If you’re using openSUSE’s latest version (10.3), don’t miss the information on the official SUSE site. With it, you can add a lot of repositories in a short time. The site also contains information for previous versions.

Installing and upgrading software

Installing or upgrading installed software is a breeze. Using the graphical interface, you can search for a specific package (click on the looking-glass icon and type what you’re looking for) or just browse through the different groups of programs. After you find the desired package, click on it — that’s it. When you’re done making your picks, click on the gear icon (or select File -> Execute Changes), and Smart will download and install all your selections.

Two upgrade options in the View menu can help a bit: select both Hide Non-upgrades and Hide Old, and you’ll see just the latest updates to the software already in your box. If you feel adventurous, you can click on Edit -> Upgrade all, or you can choose just a few packages. Don’t worry about dependencies; Smart takes care of them for you, and you won’t have to do anything unless the program gets really stumped. In that case, the safest thing to do is probably to leave the update alone for the time being.

If you don’t want to use the GUI version, you can try smart install thePackageYouWant or smart upgrade all from the command line. Even better, use smart –shell and then use the search, install, upgrade, and commit commands; use help to learn more about them.

If you spend too much time searching for packages, solving dependencies by hand, and wasting time with updates, Smart is a simple way to keep your box up to date or to install new software. You can use it across several different distributions, so it helps you deal with packages in a consistent way instead of having to learn the idiosyncrasies of many different package managers.

Category:

  • System Administration