Bug 489235 - rpm installs packages but skips all content if %_install_langs is set
rpm installs packages but skips all content if %_install_langs is set
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
rawhide
All Linux
low Severity high
: ---
: ---
Assigned To: Panu Matilainen
Fedora Extras Quality Assurance
:
: 489720 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-08 20:38 EDT by Michal Jaegermann
Modified: 2009-03-12 10:27 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-03-12 10:24:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
rpm-4.7-install-fail (5.91 KB, text/plain)
2009-03-09 05:34 EDT, Lubomir Bulej
no flags Details
rpm-4.7-install-pass (5.91 KB, text/plain)
2009-03-09 05:36 EDT, Lubomir Bulej
no flags Details

  None (edit)
Description Michal Jaegermann 2009-03-08 20:38:10 EDT
Description of problem:

Due to yum bailing out in the middle of a transaction I ended up with a number of damaged packages.  For example:

# rpm -V upstart
.......T.  c /etc/event.d/logd
..5....T.    /sbin/init
S.5....T.    /sbin/logd
..5....T.    /sbin/reboot
..5....T.    /sbin/shutdown
S.5....T.    /sbin/telinit
missing     /usr/share/locale/ca/LC_MESSAGES/upstart.mo
missing     /usr/share/locale/en@boldquot/LC_MESSAGES/upstart.mo
missing     /usr/share/locale/en@quot/LC_MESSAGES/upstart.mo
missing     /usr/share/locale/sv/LC_MESSAGES/upstart.mo
.......T.  d /usr/share/man/man5/events.5.gz
.......T.  d /usr/share/man/man8/initctl.8.gz
.......T.  d /usr/share/man/man8/logd.8.gz
.......T.  d /usr/share/man/man8/runlevel.8.gz
.......T.  d /usr/share/man/man8/shutdown.8.gz
.......T.  d /usr/share/man/man8/telinit.8.gz

After 'rpm -Uvh --force  upstart-0.3.9-22.fc11.x86_64.rpm' repeated
verification shows exactly the same output as above.  Indeed /sbin/init,
for example, should be "135736 Mar  7 16:37" but despite a success from rpm
is still "138312 2009-01-23 18:05" and what was missing is missing.

With other packages one can get, for example:

   1:cpp                    ########################################### [100%]
install-info: No such file or directory for /usr/share/info/cpp.info.gz

as missing /usr/share/info/cpp.info.gz is still missing. Other postinstall scriptlets are failing because required executables are not there.

To get around the issue I had to do, for all affected packages,

  rpm2cpio package.rpm | (cd / && cpio -imd)

followed by a reinstallation to run scripts.  Only after that verifications got silent.

Version-Release number of selected component (if applicable):
rpm-4.7.0-0.beta1.1.fc11.x86_64

How reproducible:
none of damaged packages was fixed by a reinstallation
Comment 1 Michal Jaegermann 2009-03-08 21:07:45 EDT
See https://bugzilla.redhat.com/attachment.cgi?id=334455 attached to bug 489238 for details of failed verifications of newly "installed" packages.

Hm, what was really installed at all???
Comment 2 Michal Jaegermann 2009-03-08 23:01:45 EDT
> Hm, what was really installed at all???

OK.  So I tried the following safe experiment:

rpm -e fedora-release-notes
rpm -Uvh fedora-release-notes-10.0.0-1.noarch.rpm

After that every single file from that package is missing.  What gives? Running with -vvv shows "skipnstate" flag for every file and directory.  Does that mean what I guess it may mean?
Comment 3 Panu Matilainen 2009-03-09 04:13:56 EDT
Tar up the rpmdb and attach here please.
Comment 4 Lubomir Bulej 2009-03-09 05:03:03 EDT
Hello,

> OK.  So I tried the following safe experiment:
> 
> rpm -e fedora-release-notes
> rpm -Uvh fedora-release-notes-10.0.0-1.noarch.rpm
> 
> After that every single file from that package is missing.  What gives? Running
> with -vvv shows "skipnstate" flag for every file and directory.  Does that mean
> what I guess it may mean?  

I can confirm this bug, both on x86_64 and i586. After upgrade from rpm 4.6 to rpm 4.7 beta, all packages that I install using rpm (or yum, which uses librpm i guess) *seem* to be installed, but no files are put in the filesystem.
Comment 5 Panu Matilainen 2009-03-09 05:21:57 EDT
Tar up the rpmdb and attach here please. Also a log of rpm -Uvv / -evv of a case where it doesn't actually do anything would be useful.

Once you have backed up the rpmdb: does 'rpm --rebuilddb' clear up the situation?
Comment 6 Lubomir Bulej 2009-03-09 05:26:08 EDT
Hello again,

> 
> I can confirm this bug, both on x86_64 and i586. After upgrade from rpm 4.6 to
> rpm 4.7 beta, all packages that I install using rpm (or yum, which uses librpm
> i guess) *seem* to be installed, but no files are put in the filesystem.  

There was a related problem long time ago:

https://bugzilla.redhat.com/show_bug.cgi?id=8971

It turns out that if I remove my /etc/rpm/macros file, RPM behaves again.
I have the following in the /etc/rpm/macros file to prevent installation of unnecessary i18n/l10n files:

%_install_langs cs_CZ.UTF-8:cs_CZ:cs:en_US.UTF-8:en_US:en

Adding "C" locale to the _install_langs does not help. rpm 4.6 (and previous versions as well) worked without problems.


Best regards,
Lubomir
Comment 7 Panu Matilainen 2009-03-09 05:29:24 EDT
Yup, just noticed noticed it too: %_install_langs is broken in the beta. No need to attach rpmdbs or other logs as I now have a nice reproducer for it. Will fix shortly, in the meantime just comment out %_install_langs in configuration.
Comment 8 Lubomir Bulej 2009-03-09 05:34:29 EDT
Created attachment 334483 [details]
rpm-4.7-install-fail

Log of package installation, rpm 4.7, no files are installed (the files have skipnstate flag). This is with _install_langs set to "cs_CZ.UTF-8:cs_CZ:cs:en_US.UTF-8:en_US:en".
Comment 9 Lubomir Bulej 2009-03-09 05:36:54 EDT
Created attachment 334485 [details]
rpm-4.7-install-pass

Log of package installation, rpm 4.7, files successfully installed (the files don't have the skipnstate flag anymore). This is without _install_langs set.
Comment 10 Panu Matilainen 2009-03-09 09:22:56 EDT
Okay, should be fixed in rpm-4.7.0-0.beta1.3.fc11.

Leaving this open for a while in case somebody else happens to hit it before next rawhide push.
Comment 11 Michal Jaegermann 2009-03-09 15:47:37 EDT
> Okay, should be fixed in rpm-4.7.0-0.beta1.3.fc11.

AFAICS this indeed does solve the issue.  Thanks!

If affected by that bug one needs to be careful how this new rpm version is installed not to leave oneself without rpm executables. :-)
Comment 12 Panu Matilainen 2009-03-12 10:24:15 EDT
Ok, considering this done then.
Comment 13 Panu Matilainen 2009-03-12 10:27:40 EDT
*** Bug 489720 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.