|
|
Log in / Subscribe / Register

Distributions

DNF replacing yum

By Nathan Willis
April 15, 2015

Fedora has been planning to replace the yum package manager for quite some time. The designated replacement, DNF, is a rewrite that offers several advantages, including faster and better dependency resolution. But users (arguably Linux users in particular) tend to get attached to their tools, so the prospect of switching over all at once can be a hard sell. The Fedora Engineering Steering Committee (FESCo) decided in June 2014 that the switch would finally take place in Fedora 22. Now that Fedora 22 is on the verge of release, though, the practical difficulties involved in changing such a low-level program have bubbled up to the surface again.

On April 1, FESCo member Kevin Fenzi outlined the changes in package management that would arrive in Fedora 22, noting that there had previously been some confusion about the plan. DNF will be installed by default, as will the transitional package dnf-yum, which turns /usr/bin/yum into a script that redirects to dnf. Nevertheless, users can still install yum manually, and the yum package will still be installed if the user installs anything that lists yum as a dependency. In addition, as Jan Silhan added, a migrate plugin has been developed that will migrate the machine's yum history and metadata to DNF.

But there is a bit more to it than that. The Fedora 22 "yum" package will also install dnf-yum as a dependency, and the yum package's executable will be /usr/bin/yum-deprecated (with /usr/bin/yum still just wrapping DNF). Furthermore, running yum will issue a warning message to the user:

    Yum command has been deprecated, use dnf instead.
    See 'man dnf' and 'man yum2dnf' for more information.
    To transfer transaction metadata from yum to DNF, run 'dnf migrate'

Below the warning, it will also notify the user that the yum command entered is being redirected to the corresponding DNF command.

Not everyone embraced this transition plan with enthusiasm, however. In reply to Fenzi, Nico Kadel-Garcia said the plan was "unnecessarily confusing" and that adding hooks for the /etc/alternatives framework would be better than renaming or redirecting binaries and making the two packages forcibly compete with each other. "This approach is old and effective for Java, for /usr/sbin/sendmail, and for numerous other tools. Why would you want to reinvent the wheel and prevent people from having either as needed?"

Jan Zelený argued that /etc/alternatives was meant to choose between active alternative tools, whereas yum is being deprecated and will be phased out. What followed next was a lengthy debate that focused largely on the relative merits of yum and DNF. Bruno Wolff questioned DNF's compatibility with yum (specifically with respect to yum's --skip-broken flag), saying that he would prefer to keep using yum than to undertake the workarounds that are necessary to make DNF behave like yum.

To that, Zelený replied that full compatibility between the two tools had never been promised:

From the very beginning, we were sending a clear message that we will be as compatible as possible in terms of CLI but we never wanted to have just another yum.

The ensuing discussion made a few viewpoints clear. First, not everyone involved has the same definition of "as compatible as possible." Zelený agreed only that the most common package-management use cases will be covered; some less-frequently-needed yum commands may never be implemented in DNF at all (in the FESCo ticket that deals with the transition plan, Josh Boyer pointed to a number of yum features that the DNF team had no plans to implement). While this is perhaps sensible from an engineering standpoint, others argued that this stance results in mixed messages for the user. As Przemek Klosowski said:

The updating problem is complex enough so that yum ecosystem is not handling it well. You are making an argument that dnf reimplemented this ecosystem in a qualitatively different, more correct way, that is so different that it merits a clean break, justifying the project name change. I am fine with that, but this leads to confusion when there are observable changes in behavior. The implication is that dnf is better and more correct, but on the other hand it's clear that dnf is still in development and exhibits faults. So, now we have a problem: if dnf behaves differently from yum, is it an improvement or a regression? We don't know, and it's not clear to me how to tell; every divergence is a potential bug in dnf, and therefore should be reported as such.

I would venture a comment that it was a mistake to declare dnf a separate project, because it leads to a different approach to such differences. If it was an evolutionary change in yum, it would be natural to expect it to behave in a compatible way, and consequently detect and explain in more detail the divergent behavior. By declaring a clean break, you are basically saying that there is no need to explain the diffs, but the flip side of it is that unless I can clearly understand why the difference is for the better, I must suspect this to be a regression and report it.

The --skip-broken flag, first brought up in the thread by Wolff, is indicative in many respects of the irritation some users feel about the yum-to-DNF transition, but it has wider implications as well. A yum update operation that used --skip-broken would skip all updates for packages with broken dependencies. DNF skips such broken updates—silently—by default. As several in the thread pointed out, there are ways to get DNF to report the existence of broken packages, such as running dnf check-update after running an update.

To Steve Clark, however, that simply means that DNF requires more work to use. To Vít Ondruch, it means that dnf update is an unreliable command. Moreover, although the DNF team seemed to regard --skip-broken as a kludge used to work around situations that are best avoided in the first place (such as mixing packages from several different repositories or package maintainers pushing broken updates), a number of users found it naive to expect that users will not have to deal with broken packages. Tom Hughes noted that feedback about broken packages from yum is one of the main ways packagers learn about packaging problems.

Zelený capped off the discussion—at least for now—by inviting community members to work on DNF plugins to implement the functionality that they want. Perhaps predictably, that answer did not sit well with everyone who participated in the thread. But regardless of how the masses may feel about the differences between DNF and yum, the long-awaited transition appears to finally be underway.

In some respects, the push to migrate Fedora from yum to DNF even through a transition some will find painful is just the most recent example of a recurring issue for free-software projects. Whether it is a compiler, a compositor, or desktop panel, making a clean break from the past is rarely easy, but sometimes it must be done. This migration may prove to be a contentious one for Fedora, but eventually the distribution will emerge on the other side.

Comments (20 posted)

Brief items

Debian project leader election results

This year's Debian project election leader election has concluded, with Neil McGovern winning by a conclusive margin.

Full Story (comments: 1)

Linux Mint LMDE 2

Linux Mint Debian Edition 2 "Betsy" is available in Cinnamon and MATE editions. "Life on the LMDE side can be exciting. There are no point releases in LMDE 2, except for bug fixes and security fixes base packages stay the same, but Mint and desktop components are updated continuously. When ready, newly developed features get directly into LMDE 2, whereas they are staged for inclusion on the next upcoming Linux Mint 17.x point release. Consequently, Linux Mint users only run new features when a new point release comes out and they opt-in to upgrade to it. LMDE 2 users don’t have that choice, but they also don’t have to wait for new packages to mature and they usually get to run them first. It’s more risky, but more exciting." The release notes contain more details.

Comments (none posted)

Newsletters and articles of interest

Distribution newsletters

Comments (none posted)

SuperX OS Greases the Classic Linux Wheel (LinuxInsider)

LinuxInsider has a review of SuperX, a Debian/Ubuntu derivative with a customized KDE desktop. "What caught my eye in this KDE variant distro is its desktop responsiveness. Grace [SuperX 3.0] gives more priority to application performance. The Grace engine compresses unused memory pages within RAM rather than swapping them out to the swap partition. This makes the OS responsive even when the system memory is low. Commonly used applications are preloaded and cached in memory for faster startup of favorite applications."

Comments (none posted)

The five biggest changes in Ubuntu 15.04, Vivid Vervet (ZDNet)

Steven J. Vaughan-Nichols takes Ubuntu 15.04 for a test drive. He notes that most of the changes are under-the-hood and not user visible. "Ubuntu's developers decided that, even though they were a few days past the feature release freeze date, they would switch 15.04's default to systemd. The change will affect "Ubuntu desktop/server/cloud and the flavors like Kubuntu, but *NOT* ubuntu-touch."

Comments (2 posted)

Page editor: Rebecca Sobol
Next page: Development>>


Copyright © 2015, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds