craigwblake / redline

Pure Java Rpm Library
http://redline-rpm.org
MIT License
128 stars 97 forks source link

Symlink size must be set properly in rpm header. #78

Closed charkins closed 9 years ago

charkins commented 9 years ago

The size for a symlink was previously set to zero in the rpm header. This was not a problem on older versions of rpm, but triggers an error on rpm 4.12.0.1 on Fedora 21.

This is a one line change that adds the length of the string in getSizes(). The instanceof String check happens after the check for a directory, so it will only execute for symlinks (no other type of entry is added to sources map with a String value). The first commit made a similar change in getTotalSize(), but after comparing to an rpmbuild built rpm, it appears that they do not include the size of symlinks in the total size in the header.

See also: https://bugzilla.redhat.com/show_bug.cgi?id=1224555

craigwblake commented 9 years ago

Thanks for contribution and the review.