Manage Debian packages with the Smart Package Manager
All the Extras

© Lead Image © Pei Ling Hoo , 123RF.com
The Smart Package Manager makes everyday tasks of handling RPM and DEB packages simple but has a full set of controls for experts.
Package managers simplify the often complex processes involved in managing software on a Linux system. Some package managers operate at the command line, others use a graphical interface, and still others are web-based tools; however, most package managers are designed to work with a specific package format. That means if you migrate from a system that uses the RPM format (e.g., Fedora or RHEL) to a system that uses DEB packages (e.g., Debian or Ubuntu), you need to get used to a whole different collection of package tools … unless you get Smart.
Smart Package Manager (SmartPM) is an innovative tool that has gained fame as a package management system that lets you manage different package formats through a single interface. According to the project website, SmartPM supports both Red Hat's RPM and Debian's DEB formats, as well as the Mandriva/Mageia URPMI format. Additionally, it manages tarballs for Slackware.
This versatility means you only need to learn one package manager to work on nearly any Linux system. (Keep in mind, however, that SmartPM is not intended to let users mix and match random formats on a single system. See the box titled "Not a Magic Bridge.")
Not a Magic Bridge
Although SmartPM supports several package formats, be aware that a multipackage system presents some limitations. The Smart Package Manager project is quick to point out that it is "not a magical bridge between every distribution in the planet." They add, "Instead, this is software offering better package management for these distributions when working with their native packages. Using multiple packaging systems at the same time (like rpm and dpkg) is possible but would require packages from those systems to follow the same packaging guidelines. As this is not the case at the moment, mixing package systems is not recommended" [1].
One look at the SmartPM documentation makes it clear that this vaunted package neutrality is only part of what makes SmartPM so smart. Another important feature is smart transactions. According to the SmartPM project, "While other software tries to find a possible solution to satisfy the relations involved in some user-requested operation, and sometimes even fails to do so, SmartPM 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.)" [2]. This smart transaction capability means that SmartPM might not choose the latest version of a package if it determines an older version will provide a better overall result for the system.
SmartPM also lets you assign priorities to packages or package sources, so you can give preferred formats an advantage. In SmartPM, external packages are accessed through channels. Each channel supports a specific package type (see Table 1), and you can assign priorities by channel or package name.
Table 1
SmartPM Channels
APT-DEB Repository |
APT-RPM Repository |
DPKG Installed Packages |
Mirror Information |
Red Carpet Channel |
RPM Directory |
RPM Header List |
RPM Metadata (YUM) |
RPM Installed Packages |
Slackware Repository |
Slackware Installed Packages |
URPMI Repository |
In addition to providing a universal GUI for managing Linux packages, SmartPM also has a powerful command-line interface for full control of the package management environment. In this article, I focus on using SmartPM with DEB-based distributions.
Installation
The program is available from the project website [1]. Alternatively, you can enter
sudo apt-get update sudo apt-get install smartpm
to install the python-smartpm
, smartpm-core
, and smartpm
packages.
Various operating modes are enabled when launching the program. The graphical user interface (GUI) can be accessed with the use of the --gui
option, whereas the interactive application for the console is launched by setting the --shell
flag.
This interface is similar to Apt and Aptitude. Adding the --gui
option to the call tells SmartPM to change to graphics mode before running.
Graphical Mode
Because you will be installing and changing base packages, you will need administrative privileges, so start SmartPM in GUI mode with:
sudo smart --gui
Otherwise, you will get the error Unable to create channel directory.
Interface
The graphical interface includes a menu bar and a row of buttons. The overview includes the software categories, information about the packages, and matching details. At the bottom of the window you will see the status bar with the total number of available and installed packages (Figure 1).
The File menu has options to upgrade channels and rebuild the cache. The File | Update Channels item updates the lists of package information. An individual update is possible by choosing File | Update Selected Channels (Figure 2). So far, only SmartPM offers this function, although it has been on the wishlist of extensions [3] for Apt and Aptitude for a long time.
The Edit menu lets you check packages for unresolved dependencies, manage repositories, select packages, and change priorities. Edit | Priorities lets you edit priorities you've already set up. Right-clicking a program and choosing Priority allows you to specify how the program evaluates sources. Figure 3 shows this for the gnome-sudoku package.
The Views menu lets you filter the display in the package selection list; for example, you can filter for non-upgradable, unlocked, or installed packages. Selecting Views | Tree Style lets you toggle between sorting by categories, package sources, or package groups.
The Help menu takes you to information about the program version and an overview of the icons used by SmartPM to indicate the status of a package. Important menu items are also implemented as buttons, such as correcting recent changes and updating all installed packages.
The text you enter in the search box on the right acts as a filter for the package list. Right-clicking the magnifying glass reveals two choices: Automatic and Description. Automatic searches file names for the text entered, whereas Description searches the package descriptions for the entered text. Figure 1 shows entries in which the smartpm
string occurs in the package name.
After selecting a package from the list, SmartPM shows you more details at the bottom of the window. In addition to general information, such as the status, priority, group, size, package source, and URL, you will find the description and the list of files that the package includes (Content).
The Changelog tab provides information on development, and you can see other packages on which the program depends or that are recommended for the program (Relations).
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.
News
-
Fedora 39 Beta is Now Available for Testing
For fans and users of Fedora Linux, the first beta of release 39 is now available, which is a minor upgrade but does include GNOME 45.
-
Fedora Linux 40 to Drop X11 for KDE Plasma
When Fedora 40 arrives in 2024, there will be a few big changes coming, especially for the KDE Plasma option.
-
Real-Time Ubuntu Available in AWS Marketplace
Anyone looking for a Linux distribution for real-time processing could do a whole lot worse than Real-Time Ubuntu.
-
KSMBD Finally Reaches a Stable State
For those who've been looking forward to the first release of KSMBD, after two years it's no longer considered experimental.
-
Nitrux 3.0.0 Has Been Released
The latest version of Nitrux brings plenty of innovation and fresh apps to the table.
-
Linux From Scratch 12.0 Now Available
If you're looking to roll your own Linux distribution, the latest version of Linux From Scratch is now available with plenty of updates.
-
Linux Kernel 6.5 Has Been Released
The newest Linux kernel, version 6.5, now includes initial support for two very exciting features.
-
UbuntuDDE 23.04 Now Available
A new version of the UbuntuDDE remix has finally arrived with all the updates from the Deepin desktop and everything that comes with the Ubuntu 23.04 base.
-
Star Labs Reveals a New Surface-Like Linux Tablet
If you've ever wanted a tablet that rivals the MS Surface, you're in luck as Star Labs has created such a device.
-
SUSE Going Private (Again)
The company behind SUSE Linux Enterprise, Rancher, and NeuVector recently announced that Marcel LUX III SARL (Marcel), its majority shareholder, intends to delist it from the Frankfurt Stock Exchange by way of a merger.