Do not record directory sizes in packages

Directory size is an install-time filesystem specific implementation
detail, build-time just doesn't have a clue. If we want to try taking
directory sizes into account, this needs to happen in the disk space
checking at install time.

It also helps making builds a bit more reproducable (PR #229)

(cherry picked from commit 2cf7096ba534b065feb038306c792784458ac9c7)
This commit is contained in:
Panu Matilainen 2017-06-06 14:13:19 +03:00 committed by Gleb Fotengauer-Malinovskiy
parent 1b8549bf5d
commit 0bf0dd0809

View File

@ -1687,6 +1687,8 @@ static rpmRC addFile1(FileList fl, const char * diskPath, struct stat * statp)
flp->fl_mode = fileMode;
flp->fl_uid = fileUid;
flp->fl_gid = fileGid;
if (S_ISDIR(fileMode))
flp->fl_size = 0;
flp->fileURL = xstrdup(cpioPath);
flp->diskURL = xstrdup(diskPath);