From 0bf0dd0809155f58bec3c4fd3976315848396d07 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Tue, 6 Jun 2017 14:13:19 +0300 Subject: [PATCH] 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) --- build/files.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/files.c b/build/files.c index 599b069..916b249 100644 --- a/build/files.c +++ b/build/files.c @@ -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);