Poll: How users use DNF

Petr Spacek pspacek at redhat.com
Wed Dec 10 09:14:05 UTC 2014


On 9.12.2014 18:28, Radek Holy wrote:
> 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?
> 
> 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 *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).
> 
> I don't mind if you send it offlist (or to another list). I think there is no need to comment on anyone's use case. Every case is valid. Just not every case can be supported.
> 
> Thank you very much in advance.
> 

Hello,

my use cases are developer-oriented:

1) I need ability to install *precise* versions of packages. Typically this is
caused by need to examine coredump file received from a user.

Install command in yum behaves weirdly, there are all sorts of weird corner
cases where "yum install foo-2:3.4.5-666 bar-1:2.3-4" fails for some reason.

Imagine this situation:
- I always start with clean Fedora VM snapshot created a week (or month :-)
ago. It would be waste of bandwidth and time to reinstall it the every day.
- I copy&paste list of package from bug report to command line - it results in
command line:
$ yum install foo-2:3.4.5-666 bar-1:2.3-4

In this scenario, it could happen that package foo needs upgrade (because the
VM snapshot is 1 week old) and package bar needs downgrade at the same time
(because user who reported the bug did not upgrade bar package for whatever
reason).

In my opinion, if 'install' command receives N(E)VR specification then it
should respect it even if it means downgrade. And it should *scream* if it is
not possible install requested package version!

I'm not sure if there is a conflict with other requirements you received,
maybe I'm asking for dnf install-what-I-typed-in command :-)


2) Installing locally built RPMs:
I often rebuild packages with minimal changes, e.g. just with different CFLAGS
but with no changes to the actual source.

I get my new shiny packages in ~/rpmbuild
but
$ yum install ~/rpmbuild/RPMS/*/*
often fails to install them because system has newer or the same version of
the package installed already.

In this specific case, where yum install gets RPMs as parameters (instead of
names from repo) it should (re)install them even if it means downgrade.


3) Upgrading/Reinstalling locally built packages.
In cases where rebuild yields lots of packages it is handy to have ability to
reinstall/upgrade/downgrade only packages which are installed at the moment.

E.g. bind src rpm produces 15 different packages but my test system has only 8
of them installed. In this case running
$ yum install ~/rpmbuild/RPMS/*/*
is not useful because I would install a lot of unnecessary packages (which can
be sometime conflicting with others).

I would be happy if
$ yum reinstall ~/rpmbuild/RPMS/*/*
reinstalled/upgradeed/downgraded only packages which are actually installed
and ignored the rest.

Maybe it is a case for dnf reinstall-what-I-typed-in command.

Thank you for listening and have a nice day!

-- 
Petr^2 Spacek


More information about the devel mailing list