]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm-ignore-missing-macro-files.patch
rename FORCE_RPMRC_GNU->APPEND_TARGET_ABI to better express intention
[packages/rpm.git] / rpm-ignore-missing-macro-files.patch
index 43c48e47ea60e19fbc3856d1f53464f0bd79a009..b7e7ed03b5fe586d2745fd53e3be896675246cbf 100644 (file)
@@ -1,51 +1,10 @@
 --- rpm-5.4.15/rpmio/macro.c~  2014-12-07 20:24:53.000000000 +0100
 +++ rpm-5.4.15/rpmio/macro.c   2014-12-07 20:44:45.739944044 +0100
-@@ -2965,7 +2965,17 @@
-           se = rpmMCExpand(mc, s, NULL);
-           rc = rpmGlob(se, &argc, &argv);
-           for(i = 0; i < argc; i++) {
--              rc |= rpmLoadMacroFile(mc, argv[i], nesting - 1);
-+              /* Skip backups, non existing files and %config leftovers. */
-+#define       _suffix(_s, _x) \
-+    (slen >= sizeof(_x) && !strcmp((_s)+slen-(sizeof(_x)-1), (_x)))
-+              if (!(_suffix(fn, "~")
-+                 || _suffix(fn, ".rpmnew")
-+                 || _suffix(fn, ".rpmorig")
-+                 || _suffix(fn, ".rpmsave"))
-+                 && !Access(argv[i], R_OK)
-+                 )
-+                  rc |= rpmLoadMacroFile(mc, argv[i], nesting - 1);
-+#undef _suffix
-               argv[i] = _free(argv[i]);
+@@ -1795,6 +1795,7 @@
+       for (path = files; *path; path++) {
+           if (rpmFileHasSuffix(*path, ".rpmnew") || 
+               rpmFileHasSuffix(*path, ".rpmsave") ||
++              rpmFileHasSuffix(*path, "~") ||
+               rpmFileHasSuffix(*path, ".rpmorig")) {
+               continue;
            }
-           argv = _free(argv);
---- rpm-5.4.15/macros/macros.in~       2014-12-07 21:43:59.000000000 +0100
-+++ rpm-5.4.15/macros/macros.in        2014-12-07 22:07:57.383101292 +0100
-@@ -1019,13 +1019,7 @@
- %{nil}
- #==============================================================================
--# XXX Caveat:
--# XXX With %{load:...} being interpreted immediately -- not lazily --
--# XXX within a macro init file, a failure to load causes immediate loading
--# XXX termination silently.
--# XXX
--# XXX So the order as well as the existence of the %{load:...} macros below
--# XXX are critically important.
-+# XXX If a file specified in %{load:...} does not exist, it will be skipped.
- # XXX
- # XXX Note also that loaded macro files can NOT recursively load other
- # XXX macro files; only a top-level (i.e. after --macros, or within a *.spec)
-@@ -1036,11 +1030,8 @@
- # XXX for configuring RPM itself.
- # XXX
- # XXX Simple example(s):
--# XXX If the file %{_usrlibrpm}/macros.d/selinux doesn't exist,
--# XXX then %{_usrlibrpm}/macros.rpmbuild will NOT be loaded.
--# XXX
- # XXX if the file %{_usrlibrpm}/macros.d/cmake attempts another
--# XXX %{load:...}, then loading will CEASE at that point in the file.
-+# XXX %{load:...}, then the statement will be IGNORED.
- #==============================================================================
- # ---- SELinux configuration macros.
- %{load:%{_usrlibrpm}/macros.d/selinux}
This page took 0.031557 seconds and 4 git commands to generate.