Poll: How users use DNF

Dear users of YUM and DNF,

I’m writing to you regarding a request for your feedback. I would be very grateful if you could send me a brief description of how you use YUM or DNF currently or how would you like to use it. I am particularly interested in the occurrences of “dnf/yum install” calls in your scripts. What does these scripts do and what do they expect when they call the “install” command in different situations? Or even your own aliases, plugins, workarounds and the other hacks that you always need to do your job properly would be very interesting.

Please share with me the use cases, not the description of the “install” command. Think twice before you share something because I believe it’s not as easy as it might seem. As an example I think it might be something like:

  • “I call YUM install, because I want to get given packages into my system and I don’t care whether it requires an upgrade or downgrade or what.” or
  • “I want to get them there but it should protect me against dangerous operations like downgrades” or
  • “I often make typos, so I expect that the program knows what I mean” or
  • “it would be nice if it would literally perform the installation; if any of the packages cannot be installed because of any reason, it should fail”.

Not something like: “that’s obvious that the install command should never downgrade packages”.

Please focus on the use cases. The real (non-hypothetical) use cases. Not on the command’s name as it might also result in a new command (while preserving the well-known install command together with an appropriate behaviour).

Thank you very much in advance.

8 thoughts on “Poll: How users use DNF

  1. Okay, so, the use case I’m running into issues with is in testing RPMs that aren’t part of a repository — either I’ve just built them, or else I have downloaded them from Koji to test (perhaps packages I’m not normally interested in but am helping QA).

    I don’t necessarily know or even really care about the possible state of any existing versions of these packages on my system (although it is a safe assumption that these are newer, and would like to know if it’s a downgrade). Even if it’s one package, I don’t want to have to check first if there happens to be an existing one installed. If it’s multiple packages, it becomes complicated because I may want to upgrade some and install others, depending on what the arbitrary state of my existing system is — and I don’t care about that state so much, only the end state. (Unless the packages cause conflicts, would prompt removal of other packages, or similar.)

  2. It’s just me or It sounds like you need stories for functional tests :D? Anyway… I write my 2 cents: feel free to ask me further details, if you wish.

    I usually need the “install” command when I know the name of the software in advance.

    For example, in a typical KDE live spin, I do a “yum/dnf install firefox, amarok, [...]“, when I exactly know what packages will fill my needs. I expect that the manager resolves dependencies and doesn’t proceed if something isn’t working properly (it sometimes happens when there are broken dependencies in Rawhide).

    I also make large use of “*” when I install packages which I need for both Python2 and Python3 (yum/dnf install python*django).

    When I don’t know nor remember packages’ names, I do some queries with “yum/dnf search” (often “grep” helps me).

    And… When I need to upgrade a package, “yum/dnf update” always come first to my mind. To be honest, I think I’ve never used “yum/dnf install” to upgrade anything.

    I apologize if I misunderstood the question.


  3. What I use dnf for:
    1. `dnf-automatic` for daily security updates
    2. `$ dnf –cacheonly check-updates` in ~/.bashrc every time I open a console/terminal
    3. `$ dnf upgrade` for updating, obviously

    `$ dnf install [pkgname]`
    `$ dnf remove [pkgname]`
    `$ dnf history list/undo/info`

  4. I mostly use dnf to search for, install and remove software by hand.

    One common use case is to search for some category keyword (e.g. “haskell”), look at the results and then install relevant packages (e.g. “haskell-platform”). It’s worth mentioning that sometimes there can be a lot of irrelevant results which have to be grep’d afterwards.

    Another very common scenario is the following: I try to install some package which name I think I know (e.g. “hugs”), but no such package is found. So I run the search with the same string (e.g. “dnf search hugs”), find out that the package name (e.g. “hugs98″), then run install again with the right name. I imagine some kind of name suggestion would be a great fit here.

    Also, I’d like to note that it’s quite tedious to type full commands, such as “search” and “install”, and I often accidentally hit instead of on the “Is this ok” confirmation dialog, which causes operation to be aborted (just to be invoked again immediately, of course).

    Hope this could be helpful, and thank you for your amazing work!

  5. At work I have use case – a script, which installs or downgrades packages to requested versions. Because I don’t want to do something like

    if requested_package < present_package:
    subprocess.check_call(['sudo', 'yum', '-y', 'downgrade', requested_package])
    subprocess.check_call(['sudo', 'yum', '-y', 'install', requested_package])

    I do:
    subprocess.check_call(['sudo', 'yum', '-y', 'remove', present_package])
    subprocess.check_call(['sudo', 'yum', '-y', 'install', requested_package])

    It also better handles potencial wrong %pre, %preun, %post and %postun scripts

    So I'd like to see someting like yum/dnf update-or-downgrade foo-1.2.3-4.elX, which would always install a package in given version, no matter what was the installed version of the package

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Current day month ye@r *