Manage Debian packages with the Smart Package Manager
All the Extras
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
-
Systemd Fixes Bug While Facing New Challenger in GNU Shepherd
The systemd developers have fixed a really nasty bug amid the release of the new GNU Shepherd init system.
-
AlmaLinux 10.0 Beta Released
The AlmaLinux OS Foundation has announced the availability of AlmaLinux 10.0 Beta ("Purple Lion") for all supported devices with significant changes.
-
Gnome 47.2 Now Available
Gnome 47.2 is now available for general use but don't expect much in the way of newness, as this is all about improvements and bug fixes.
-
Latest Cinnamon Desktop Releases with a Bold New Look
Just in time for the holidays, the developer of the Cinnamon desktop has shipped a new release to help spice up your eggnog with new features and a new look.
-
Armbian 24.11 Released with Expanded Hardware Support
If you've been waiting for Armbian to support OrangePi 5 Max and Radxa ROCK 5B+, the wait is over.
-
SUSE Renames Several Products for Better Name Recognition
SUSE has been a very powerful player in the European market, but it knows it must branch out to gain serious traction. Will a name change do the trick?
-
ESET Discovers New Linux Malware
WolfsBane is an all-in-one malware that has hit the Linux operating system and includes a dropper, a launcher, and a backdoor.
-
New Linux Kernel Patch Allows Forcing a CPU Mitigation
Even when CPU mitigations can consume precious CPU cycles, it might not be a bad idea to allow users to enable them, even if your machine isn't vulnerable.
-
Red Hat Enterprise Linux 9.5 Released
Notify your friends, loved ones, and colleagues that the latest version of RHEL is available with plenty of enhancements.
-
Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.