SOURCES: rpm-skip-backups.patch (NEW) - totally ugly, but known to...

glen glen at pld-linux.org
Wed Apr 26 23:53:47 CEST 2006


Author: glen                         Date: Wed Apr 26 21:53:45 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- totally ugly, but known to work (based on apache-configdir_skip_backups.patch)

---- Files affected:
SOURCES:
   rpm-skip-backups.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/rpm-skip-backups.patch
diff -u /dev/null SOURCES/rpm-skip-backups.patch:1.1
--- /dev/null	Wed Apr 26 23:53:45 2006
+++ SOURCES/rpm-skip-backups.patch	Wed Apr 26 23:53:39 2006
@@ -0,0 +1,20 @@
+--- rpm-4.4.2/rpmio/macro.c~	2006-04-27 00:49:59.000000000 +0300
++++ rpm-4.4.2/rpmio/macro.c	2006-04-27 00:50:04.000000000 +0300
+@@ -2000,8 +2000,15 @@
+ 	    continue;
+ 
+ 	/* Read macros from each file. */
+-	for (i = 0; i < ac; i++)
+-	    (void) rpmLoadMacroFile(mc, av[i]);
++	for (i = 0; i < ac; i++) {
++	    size_t slen = strlen(av[i]);
++	    if ((av[i])[slen-1] != '~' &&
++		(slen < 8 || strcmp((av[i] + slen - 7), ".rpmnew")) &&
++		(slen < 9 || (strcmp((av[i] + slen - 8), ".rpmorig") &&
++			      strcmp((av[i] + slen - 8), ".rpmsave")))) {
++		(void) rpmLoadMacroFile(mc, av[i]);
++	    }
++	}
+ 	av = _free(av);
+     }
+     mfiles = _free(mfiles);
================================================================


More information about the pld-cvs-commit mailing list