Bug 3350

Summary: akmods uses rpm causes yum warning
Product: Fedora Reporter: Henrique Martins <bugzilla-rpmfusion-2009>
Component: akmodsAssignee: Nicolas Chauvet <kwizart>
Status: RESOLVED FIXED    
Severity: enhancement CC: bugzilla-rpmfusion-2009, hobbes1069, kwizart
Priority: P5    
Version: 20   
Hardware: All   
OS: GNU/Linux   
namespace:
Attachments: replaces rpm with yum for install

Description Henrique Martins 2014-08-31 18:16:54 CEST
/usr/sbin/akmods calls rpm directly in a few places.
After akmods runs, yum will complain that "RPMDB was changed outside of yum", which is just a warning but would be nice to get rid of.
Not sure if all rpm uses in akmods can be safely replaced with yum calls.
Comment 1 Nicolas Chauvet 2014-08-31 18:33:08 CEST
This is a known issue, if you can get us an answer (with either yum or dnf)
We will be happy to apply the patch.
Comment 2 Nicolas Chauvet 2014-08-31 21:37:43 CEST
That's with steam-1.0.0.49-1.fc21.i686
Comment 3 Henrique Martins 2014-09-20 15:16:58 CEST
Created attachment 1326 [details]
replaces rpm with yum for install

Replaces 'rpm -U' with 'yum  -y install'.  

Worked when installing kernel-3.16.2-201.fc20.x86_64, i.e. rpm was built, installed, and a subsequent yum didn't complain about changes to the RPM database.

Changes the date format in the log from
  13 Sep 08:09:55
to
  2014/09/14 07:17:04

(Side note, can't seem to change the email on this account. Tried it some time ago, and after filing this bug, but never receive the email confirmation.)
Comment 4 Nicolas Chauvet 2014-10-19 12:29:06 CEST
Of cours(In reply to comment #3)
> Created attachment 1326 [details]
> replaces rpm with yum for install
> 
> Replaces 'rpm -U' with 'yum  -y install'.  
Of course this will not work !!! Have your seriously tested what you said ???
yum expects network connection, Even yum -C will not provides the same functionality as rpm does.
Comment 5 Henrique Martins 2014-11-13 15:25:09 CET
> Of course this will not work !!!

I have this in place in at least four machines from a couple of weeks before I posted the patch, to give it time to test with more than one kernel update.
It worked then, and it is still working, as I just yesterday updated all of them to kernel-3.17.2-200.fc20.x86_64.
And it does fix the problem this ticket is about, as rpm is not used to do the install.

> Have your seriously tested what you said ???

It works, for me, in all those machines.

You'll be the judge of the seriousness of what I described above.

> yum expects network connection,

Even though I already had it installed on, I just ran through this in one machine:
- downloaded kmod-VirtualBox-3.17.2-200.fc20.x86_64.x86_64 0:4.3.18-1.fc20.4.x86_64.rpm from rpmfusion.
- shutdown the network.
- verified I can't connect to anything over the network.
- yum -y erase kmod-VirtualBox-3.17.2-200.fc20.x86_64.x86_64 0:4.3.18-1.fc20.4
- yum -y install kmod-VirtualBox-3.17.2-200.fc20.x86_64.x86_64 0:4.3.18-1.fc20.4.x86_64.rpm
which proceeded to uninstall and install that rpm with no network connection.

I have yum-3.4.3-152.fc20.noarch.  If that is not supposed to work when I don't have a network connection and it just did it for me, we'd better let the yum people know of this "bug".
Comment 6 Nicolas Chauvet 2014-11-13 21:57:00 CET
Thx for answering back.
Dropping the question in #yum irc, it seems like yum install --disablerepo\* might do the things right.

I previously attempted to use yum install -C, but it even tries to download the metadata on package removal, so that would break users installing packages on reboot without network.

I will add the patch for devel with the date change and backport at a later step.
Thx for your contribution
Comment 7 Henrique Martins 2014-11-14 17:59:43 CET
You may be missing an equal sign on your yum command.
I'm working on patching a fedora rpm and just locally rebuilt it and installed it, after disabling the network, with:
  yum -y install --disablerepo='*' xxx.rpm
and it worked fine.
Comment 8 Nicolas Chauvet 2015-01-16 22:51:41 CET
fixed in f21
Comment 9 Richard 2015-04-11 21:01:09 CEST
I'm not sure this was the right decision... Although it gets rid of a harmless warning, it now causes failures on dnf only systems.