[Bug 1176337] Re: rpm size estimation does not account hardlinks?

Jeff Johnson n3npq at mac.com
Fri Jun 21 08:29:18 CEST 2013


A proper fix is harder than it seems: there is no tag in metadata that
keeps track of stat(2) st->st_nlink found in the build root.

Instead, RPMTAG_FILEINODES is used to compute the no. of hardlinks.

There are bigger problems with space calculation than not accounting
for hardlink sizes, mostly due to 5% root reserved space estimation.

Finally the error message is difficult to understand because of "needs"
ised in the sense of "... needs an additional ..." amount of space beyond
what is thought to be available (with a heuristic/imperfect adjustment to
account for root reserved space).

-- 
You received this bug notification because you are subscribed to PLD
Linux.
https://bugs.launchpad.net/bugs/1176337

Title:
  rpm size estimation does not account hardlinks?

Status in rpm package manager:
  Confirmed
Status in PLD Linux Distribution:
  New

Bug description:
  # poldek -u git-core

  There are 3 packages to install (2 marked by dependencies):
  I git-core-1.8.2.1-1.i686
  D perl-Error-0.17016-1.noarch  perl-Git-1.8.2.1-1.i686
  This operation will use 11.1MB of disk space.
  Need to get 2.5MB of archives.
  Executing rpm --upgrade -vh --root / --define _check_dirname_deps 1...
  Preparing...                ########################################### [100%]
  error: Install/Erase problems:
          installing package git-core-1.8.2.1-1.i686 needs 61MB on the / filesystem
  12:52:22 root[load: 0.22]@vagrant-pld /etc/etckeeper# df
  Filesystem      Type      Size  Used Avail Use% Mounted on
  rootfs          rootfs   1020M  908M  112M  90% /

  
  now i growed disk and tried again:

  # df /
  Filesystem      Type  Size  Used Avail Use% Mounted on
  /dev/sys/rootfs xfs   1.4G  909M  512M  64% /

  
  # poldek -u git-core
  ...
  Processing dependencies...
  git-core-1.8.2.1-1.i686 marks perl-Git-1.8.2.1-1.i686 (cap perl(Git))
   perl-Git-1.8.2.1-1.i686 marks perl-Error-0.17016-1.noarch (cap perl(Error))
  Package git-core-1.8.2.1-1.i686 suggests installation of:
  1. git-core-cvs
  2. git-core-svn
  3. rsync
  Try to install them? (y - all, n - nothing, s - select some of)? [N/y/s] n
  There are 3 packages to install (2 marked by dependencies):
  I git-core-1.8.2.1-1.i686
  D perl-Error-0.17016-1.noarch  perl-Git-1.8.2.1-1.i686
  This operation will use 11.1MB of disk space.
  Need to get 2.5MB of archives.

  Executing rpm --upgrade -vh --root / --define _check_dirname_deps 1...
  Preparing...                ########################################### [100%]
     1:perl-Error             ########################################### [ 33%]
     2:perl-Git               ########################################### [ 67%]
     3:git-core               ########################################### [100%]

  # df /
  Filesystem      Type  Size  Used Avail Use% Mounted on
  /dev/sys/rootfs xfs   1.4G  919M  501M  65% /

  git core is a package with files having 112 hardlinks

  # rpm -q poldek rpm
  poldek-0.30.0-1.rc7.2.i686
  rpm-5.4.10-50.i686

To manage notifications about this bug go to:
https://bugs.launchpad.net/rpm/+bug/1176337/+subscriptions


More information about the pld-bugs mailing list