index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dave Reisner <dreisner@archlinux.org> | 2012-03-27 23:43:46 -0400 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-03-28 09:56:11 -0500 |
commit | 7f258619c6c0e9f441aacbabfc1a2f5980c5cb9b (patch) | |
tree | 974c6d08d39039131540b611f858aad229a16167 | |
parent | be0e0444040dc7d84e86c5b5e60b786441c4d97e (diff) |
-rw-r--r-- | scripts/makepkg.sh.in | 6 |
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 2d672a37..1faf591f 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1120,6 +1120,12 @@ write_pkginfo() { else local packager="Unknown Packager" fi + + # btrfs's delayed allocation causes the stat buffers from the kernel to "lie" + # to us momentarily and report 0 blocks allocated (which is how du calculates + # size). Sleeping for a second here is about the dirtiest thing possible, + # but avoids reporting entirely bogus install sizes. + sleep 1 local size="$(@DUPATH@ -sk)" size="$(( ${size%%[^0-9]*} * 1024 ))" |