michal-grzedzicki / rpms / rpm

Forked from rpms/rpm 5 months ago
Clone
5523e9
--- rpm-4.8.0/build/files.c.defattr-permissions	2015-02-23 10:45:47.043339687 +0100
5523e9
+++ rpm-4.8.0/build/files.c	2015-02-23 10:53:55.673480702 +0100
5523e9
@@ -1446,6 +1446,12 @@
5523e9
 	    if (fl->def.ar.ar_dmodestr) {
5523e9
 		fileMode &= S_IFMT;
5523e9
 		fileMode |= fl->def.ar.ar_dmode;
5523e9
+	    } else if (fl->def.ar.ar_fmodestr){
5523e9
+		rpmlog(RPMLOG_WARNING, _("%%defattr doesn't define directory "
5523e9
+		    "mode so file mode defined in %%defattr is used for "
5523e9
+		    "directory: %s\n"), diskPath);
5523e9
+		fileMode &= S_IFMT;
5523e9
+		fileMode |= fl->def.ar.ar_fmode;
5523e9
 	    }
5523e9
 	} else if (!S_ISLNK(fileMode) && fl->def.ar.ar_fmodestr) {
5523e9
 	    fileMode &= S_IFMT;
5523e9