This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new Linux.com!

Linux.com

Feature: System Administration

Updating your system the Smart way

By Federico Kereki on November 08, 2007 (9:00:00 AM)

Share    Print    Comments   

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.

Federico Kereki is an Uruguayan systems engineer with more than 20 years' experience developing systems, doing consulting work, and teaching at universities.

Share    Print    Comments   

Comments

on Updating your system the Smart way

Note: Comments are owned by the poster. We are not responsible for their content.

How is this better than Synaptic?

Posted by: Anonymous [ip: 149.157.192.252] on November 08, 2007 11:04 AM
How is this better than the existing package manager on any system? "Smart" solution of dependencies is already looked after by every native package manager (urpmi, apt, yum, ...). Granted the same interface on different distributions is nice, but is that worth it considering the risk involved.

> Smart Package Manager works with all major distributions, replacing native tools and installing different types of packages."

Ouch! It replaces the distribution's own package manager? Would I be correct in saying this is an irreversible way to make your system completely unsupportable by the original distribution vendors? Can you easily undo this when you realise what a mess you've made?

To someone who understands package managers, switching from one to another when you switch distribution is not hard and if you don't understand package managers, you really shouldn't be considering replacing yours.

#

Updating your system the Smart way

Posted by: Anonymous [ip: 83.67.74.208] on November 08, 2007 11:54 AM
It doesn't replace the package manager; it installed the native packages for any given system. So, installing .debs on Fedora or something isn't possible.

It is supposed to offer better dependency resolution, and it's nice to use a single tool if you use a variety of distros.

But yeah, the "dependency hell" the author describes isn't a problem for users of virtually any distro, and it hasn't been for many years. I don't know why this still comes up as a problem.

#

Re: Updating your system the Smart way

Posted by: Anonymous [ip: 169.233.25.226] on November 08, 2007 02:30 PM
But yeah, the "dependency hell" the author describes isn't a problem for users of virtually any distro, and it hasn't been for many years.

Perhaps because that garners the attention of the geek crowd?

#

Updating your system the Smart way

Posted by: Anonymous [ip: 84.193.131.73] on November 08, 2007 02:30 PM
At this moment I have installed the new opensuse (v10.3).
Yast is still used as a means of installing programs and I find it to be very slow and it occasionally gives me dependency problems.
(they really should switch to apt-get/aptitude for rpm as default.......like Mandriva/PCLOS)
So....in this case Smart is definitely the better alternative ...
I don't know if it would be a better alternative for apt-get on deb based distros.
I'm pretty satisfied with apt-get and therefore haven't tried Smart on deb based distros.

#

Re: Updating your system the Smart way

Posted by: Anonymous [ip: 24.80.34.124] on November 10, 2007 03:59 PM
Mandriva still uses urpmi. There has never been an apt solution for the distro to the best of my knowledge. Unlike SuSE which needed an alternative, apt for rpm, urpmi is good enough that an apt solution would be little better if not redundant.



There's a lot of really good package managers out there. I think it's more important for most distro's to manage their repository servers well than to agonize over a package manager. Of course there are some like SuSE that still don't have it quite right with package managers and server management. If anything Smart is an appeal to standardization. All I can say is, "good luck on that one."

#

Updating your system the Smart way

Posted by: Anonymous [ip: 41.194.14.149] on November 08, 2007 03:08 PM
u are doing agreat job for we learners. thank you

#

Updating your system the Smart way

Posted by: Anonymous [ip: 145.62.32.131] on November 08, 2007 03:32 PM
Why would I use another package/update manager when I have apt? :-S

#

Does it really work with gentoo?

Posted by: Anonymous [ip: 198.8.4.25] on November 08, 2007 04:26 PM
I doubt it. Nothing about gentoo on the Smart web site
I guess you could argue gentoo is not a major distibution, but it is listed as a major distribution on distrowatch.
Why mention it in the article, if it doesn't work with gentoo?

#

Re: Does it really work with gentoo?

Posted by: Anonymous [ip: 70.55.125.193] on November 10, 2007 02:49 AM
Flexibility

#

Updating your system the Smart way

Posted by: Anonymous [ip: 67.88.249.34] on November 08, 2007 06:15 PM
This is a hard one, Debian got this fixed long ago while the RPM package managers have hacked together a solution. While I like the idea of SMART being unified, I love apt and aptitude so much. Why don't the other distro's start using apt and learn to love life. When I first tried Debian (comming from Red Hat), I could not believe how wonderful apt was and is the main reason why I have never looked back. Now with Ubuntu I can have my apt for servers (debian) and my apt for workstations (ubuntu) so I am satisfied. You other Distro's should try Smart since it looks like the power-at-be don't plan on switching to apt and deb packages, what a shame.

#

APT vs Smart

Posted by: Anonymous [ip: 89.8.56.11] on November 08, 2007 07:59 PM
What makes me curious is that I'm having difficulties with APT and broken packages in Ubuntu and haven't found a solution to the problem. Packages from the main Gutsy repo appears ok, but som recommended upgrades, Java, Screensaver and a few other packages keeps breaking and will not uninstall.

So if there is a chance that Smart handles dependencies better and more secure I certainly will try it. If it doesn't it will only cause another reinstall. I've had tons of them already.

Bring it on!

#

Smart "a good thing"

Posted by: Anonymous [ip: 71.243.60.161] on November 10, 2007 03:05 AM
Those of us that use apt-get/Symantic are fortunate. The RPM world is not as community minded in that their are commercial entites there looking for advantage and package management is an area where they can differentiate themselves and they do not always share what they learned.

If you stay withing the core applications, that is, default applications and a few others provided by your distro (e.g. Ubuntu) apt-get/Symantic may be all you'll ever need. If you venture out beyond the core applications Smart may be an new and improved option as Apptitude is for apt-get w/ it's Symantic front-end . Smart represents a convergence for Linux, one that is much needed in that the options today are endless and quality varies. Let's develop it to take Linux to the next level.

#

Smart and security?

Posted by: Anonymous [ip: 71.243.60.161] on November 10, 2007 03:27 AM
How does Smart handle distro specific security patches? If the repositories you point to are the same as the distros I would think you'd be ok, However, if the patch is there you may need to know it's there since you may loose the auto update notification of the native package manager I would think. This may not be a problem for KDE users using ksmarttray In that they would be notified about available patches/updates. But what about GNOME users?

#

Could you use SMART to solve pesky dependencies of one package?

Posted by: Anonymous [ip: 71.243.60.161] on November 10, 2007 03:50 AM
I know you shouldn't mix package managers on your system. This is to say, if you use apt-get do not use aptitude since the databases that register the installed apps would be different. But for an occasional troublesome application that apt-get can't solve, why not have SMART installed, analyze your system and install the "not-so-new version" for that one package.It may solves the one-time dependency without you digging manually and prove itself to you. What I'm saying is limit it's use to an advance dependency tool at this stage of it's development.

#

Re: Could you use SMART to solve pesky dependencies of one package?

Posted by: Anonymous [ip: 151.48.33.198] on November 10, 2007 02:37 PM
$ dpkg -l | grep aptitude
ii aptitude 0.4.4-1ubuntu3 terminal-based apt frontend

Seeing that is a frontend for apt, i doubt very much that aptitude will use different "databases" ... ;)

#

NIX - next generation package manager

Posted by: Anonymous [ip: 82.93.127.5] on November 10, 2007 10:05 PM
One thing to look at is a next generation package manager which is safe, allows for multiple versions of libraries and handles transactions and roll-back:

http://nix.cs.uu.nl/docs/papers.html

All existing package managers - including apt which will force you to upgrade your kernel once in a while - have their short comings and don't really solve dependency hell. NIX is different and should be studied closely.

#

At the very least smart is better than yum on OpenSUSE 10.3

Posted by: Anonymous [ip: 190.128.150.144] on November 12, 2007 04:27 AM
I used yum on 10.2 because that way a could keep a rpm cache (and is also a simple CLI command) and after downloading on one machine I could move the rpm over the local network, USB stick and DVDRW, in order to update systems with low internet bandwidth o non networked machines. Yast did not help with this kind of situations. And in 10.3 I have dependencies problem with yum, while Yast worked ok, but could'nt cache the rpms. So I tried smart, it was such a pleasant surprise, despite the odd command line options (anything new is always odd :-)) Unlike yum, it worked out dependencies, both installing and upgrading beatifully. Unline yum when it update the repository database, is far quicker.

Until now it has worked better than yum and yast, the latter being verry slow adquiring upgrade info. And I'm looking forward to try smart on other rpm system and Slackware. After all, like most managers it use the native package database to work with. So far no problems.

The only downside, also shared by yum is that it does not handles patch.rpm's which are a life saving when with low bandwitdh.

#

At the very least smart is better than yum on OpenSUSE 10.3

Posted by: Anonymous [ip: 190.128.150.144] on November 12, 2007 04:29 AM
I used yum on 10.2 because that way a could keep a rpm cache (and is also a simple CLI command) and after downloading on one machine I could move the rpm over the local network, USB stick and DVDRW, in order to update systems with low internet bandwidth o non networked machines. Yast did not help with this kind of situations. And in 10.3 I have dependencies problem with yum, while Yast worked ok, but could'nt cache the rpms. So I tried smart, it was such a pleasant surprise, despite the odd command line options (anything new is always odd :-)) Unlike yum, it worked out dependencies, both installing and upgrading beatifully. Unline yum when it update the repository database, is far quicker.

Until now it has worked better than yum and yast, the latter being verry slow adquiring upgrade info. And I'm looking forward to try smart on other rpm system and Slackware. After all, like most managers it use the native package database to work with. So far no problems.

The only downside, also shared by yum is that it does not handles patch.rpm's which are a life saving when with low bandwitdh.

#

It works verry well for me

Posted by: Anonymous [ip: 190.128.150.144] on November 12, 2007 04:30 AM
I used yum on 10.2 because that way a could keep a rpm cache (and is also a simple CLI command) and after downloading on one machine I could move the rpm over the local network, USB stick and DVDRW, in order to update systems with low internet bandwidth o non networked machines. Yast did not help with this kind of situations. And in 10.3 I have dependencies problem with yum, while Yast worked ok, but could'nt cache the rpms. So I tried smart, it was such a pleasant surprise, despite the odd command line options (anything new is always odd :-)) Unlike yum, it worked out dependencies, both installing and upgrading beatifully. Unline yum when it update the repository database, is far quicker.

Until now it has worked better than yum and yast, the latter being verry slow adquiring upgrade info. And I'm looking forward to try smart on other rpm system and Slackware. After all, like most managers it use the native package database to work with. So far no problems.

The only downside, also shared by yum is that it does not handles patch.rpm's which are a life saving when with low bandwitdh.

#

Updating your system the Smart way

Posted by: Anonymous [ip: 170.215.110.118] on November 12, 2007 09:49 PM
I still have an occasional glitch in Mandriva (like LiquidWeather for SuperKaramaba) where it requires something that I cannot acquire via the normal software installer. In this case I'm hunting high and low for an MDV-RPM for PyQT. 99% of the time all is well. Frankly I'd rather have something like an AutoPackage or Windows installer where all of the dependencies are included with an installer and have Linux discard what was already installed. The initial download would be larger but I would be able to get what I needed the first time 'round. There is prob a good reason that it's done the way Mandriva does it but I don't know the answer. All in all though I am a VERY satisfied Linux user and have been for several years. I won't be paying any Microsoft taxes every again.

#

Updating your system the Smart way

Posted by: Anonymous [ip: 209.126.247.190] on December 19, 2007 04:38 PM
I've been using smart for over a year on a Fedora system I've upgraded from FC1 to Fedora 8. Smart is WAY better then yum. It "just works" when you need it to unlike yum that errors out every time you try to upgrade from one version to the next.

#

This story has been archived. Comments can no longer be posted.



 
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya