Bug 2634

Summary: rpmbuild calculates wrong size when using %exclude
Product: Sisyphus Reporter: Sergey Vlasov <vsu>
Component: rpm-buildAssignee: placeholder <placeholder>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P5 CC: arseny, glebfm, imz, ldv, placeholder, vt
Version: unstable   
Hardware: all   
OS: Linux   
Bug Depends on:    
Bug Blocks: 17186    
Attachments:
Description Flags
0002634-dummy-0.0.1-alt1.src.rpm
none
0002634-dummy-0.0.1-alt1.i586.rpm none

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
77763224
$
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
1.6.0.2-alt1.i586       4950949
1.6.0.2-alt1.x86_64     5538565
[at@people ~]$ rpm -qp --qf '%{VERSION}-%{RELEASE}.%{ARCH}\t%{SIZE}\n' /ALT/4.1/files/*/RPMS/git-core-1*.rpm
1.5.5.5-alt1.i586       72697349
1.5.5.5-alt1.x86_64     77771185
[at@people ~]$ rpm -qp --qf '%{VERSION}-%{RELEASE}.%{ARCH}\t%{SIZE}\n' /ALT/4.0/files/*/RPMS/git-core-1*.rpm
1.5.4.5-alt3.i586       64489878
1.5.4.5-alt3.x86_64     69091050
[at@people ~]$