Bug 2634 - rpmbuild calculates wrong size when using %exclude
Summary: rpmbuild calculates wrong size when using %exclude
Alias: None
Product: Sisyphus
Classification: Development
Component: rpm-build (show other bugs)
Version: unstable
Hardware: all Linux
: P5 major
Assignee: placeholder@altlinux.org
QA Contact:
Depends on:
Blocks: 17186
  Show dependency tree
Reported: 2003-06-04 18:09 MSD by Sergey Vlasov
Modified: 2008-10-22 10:19 MSD (History)
6 users (show)

See Also:

0002634-dummy-0.0.1-alt1.src.rpm (2.22 KB, application/x-rpm)
2003-06-04 18:09 MSD, Sergey Vlasov
no flags Details
0002634-dummy-0.0.1-alt1.i586.rpm (2.23 KB, application/x-rpm)
2003-06-04 18:10 MSD, Sergey Vlasov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Vlasov 2003-06-04 18:09:46 MSD
When the %files section in spec contains %exclude, the Size: field in the binary package is wrong - apparently rpmbuild adds the excluded file size instead of subtracting it.

See the attached package for an example.


Comment 1 Dmitry V. Levin 2003-09-27 19:39:02 MSD
Bug was even worse compared to reported. 
Fixed in rpm-build-4.0.4-alt26 
Comment 2 at@altlinux.org 2008-06-15 04:21:20 MSD
This change apparently broke hardlink size count.

$ rpmquery --qf '%{SIZE}\n' git-core
Comment 3 at@altlinux.org 2008-10-22 10:19:02 MSD
Fixed in rpm-4.0.4-alt95 (Sisyphus and branch 4.1), backported to rpm-4.0.4-alt77.M40.2 (branch 4.0).  Also fixed in rpm5.org.

[at@people ~]$ rpm -qp --qf '%{VERSION}-%{RELEASE}.%{ARCH}\t%{SIZE}\n' /ALT/Sisyphus/files/*/RPMS/git-core-1*.rpm       4950949     5538565
[at@people ~]$ rpm -qp --qf '%{VERSION}-%{RELEASE}.%{ARCH}\t%{SIZE}\n' /ALT/4.1/files/*/RPMS/git-core-1*.rpm       72697349     77771185
[at@people ~]$ rpm -qp --qf '%{VERSION}-%{RELEASE}.%{ARCH}\t%{SIZE}\n' /ALT/4.0/files/*/RPMS/git-core-1*.rpm       64489878     69091050
[at@people ~]$