alexk / rpms / rpm

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