]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- backoport of rpm 4.0.4 %exclude feature
authorfilon <filon@sokrates.mimuw.edu.pl>
Sun, 26 May 2002 06:43:09 +0000 (06:43 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rpm-exclude.patch -> 1.1

rpm-exclude.patch [new file with mode: 0644]

diff --git a/rpm-exclude.patch b/rpm-exclude.patch
new file mode 100644 (file)
index 0000000..c9f3d62
--- /dev/null
@@ -0,0 +1,43 @@
+--- rpm-4.0.2/lib/rpmlib.h~    Sun May 26 07:47:04 2002
++++ rpm-4.0.2/lib/rpmlib.h     Sun May 26 07:55:51 2002
+@@ -320,6 +320,7 @@
+     RPMFILE_GHOST     = (1 << 6),     /*!< from %%ghost */
+     RPMFILE_LICENSE   = (1 << 7),     /*!< from %%license */
+-    RPMFILE_README    = (1 << 8)      /*!< from %%readme */
++    RPMFILE_README    = (1 << 8),     /*!< from %%readme */
++    RPMFILE_EXCLUDE   = (1 << 9)      /*!< from %%exclude */
+ } rpmfileAttrs;
+ #define       RPMFILE_MULTILIB_SHIFT          9
+ #define       RPMFILE_MULTILIB(N)             ((N) << RPMFILE_MULTILIB_SHIFT)
+--- rpm-4.0.2/build/files.c~   Sun May 26 07:47:04 2002
++++ rpm-4.0.2/build/files.c    Sun May 26 08:19:18 2002
+@@ -685,6 +685,7 @@
+       { "%dir",       0 },    /* XXX why not RPMFILE_DIR? */
+       { "%doc",       RPMFILE_DOC },
+       { "%ghost",     RPMFILE_GHOST },
++      { "%exclude",   RPMFILE_EXCLUDE },
+       { "%readme",    RPMFILE_README },
+       { "%license",   RPMFILE_LICENSE },
+       { "%multilib",  0 },
+@@ -986,12 +987,16 @@
+     clp = *cpioList = xmalloc(sizeof(**cpioList) * fl->fileListRecsUsed);
+     for (flp = fl->fileList, count = fl->fileListRecsUsed; count > 0; flp++, count--) {
+-      if ((count > 1) && !strcmp(flp->fileURL, flp[1].fileURL)) {
+-          rpmError(RPMERR_BADSPEC, _("File listed twice: %s\n"),
+-              flp->fileURL);
+-          fl->processingFailed = 1;
+-      }
++      if ((count > 1) && !strcmp(flp->fileURL, flp[1].fileURL))
++          if (!(flp[1].flags & RPMFILE_EXCLUDE)) {
++              rpmError(RPMERR_BADSPEC, _("File listed twice: %s\n"),
++                  flp->fileURL);
++              fl->processingFailed = 1;
++          }
++      /* Skip files that were marked with %exclude. */
++      if (flp->flags & RPMFILE_EXCLUDE) continue;
++      
+       if (flp->flags & RPMFILE_MULTILIB_MASK)
+           multiLibMask |=
+               (1 << ((flp->flags & RPMFILE_MULTILIB_MASK))
This page took 0.122787 seconds and 4 git commands to generate.