]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- hardlink-fixes patch:
authorJakub Bogusz <qboosh@pld-linux.org>
Tue, 25 Dec 2001 22:07:27 +0000 (22:07 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  - install time: make sure that directory exists when creating hardlink in it
  - build time: checkHardLinks() now tries to fix %%lang() marks of directories
    that contain %%lang()-marked hardlinks - so built rpms should be installable
    by older rpm versions too
- release 46

Changed files:
    rpm-hardlink-fixes.patch -> 1.1
    rpm.spec -> 1.266

rpm-hardlink-fixes.patch [new file with mode: 0644]
rpm.spec

diff --git a/rpm-hardlink-fixes.patch b/rpm-hardlink-fixes.patch
new file mode 100644 (file)
index 0000000..3c5433e
--- /dev/null
@@ -0,0 +1,67 @@
+diff -Nur rpm-4.0.2.orig/build/files.c rpm-4.0.2/build/files.c
+--- rpm-4.0.2.orig/build/files.c       Fri Jan 19 02:47:25 2001
++++ rpm-4.0.2/build/files.c    Tue Dec 25 21:17:42 2001
+@@ -911,6 +911,37 @@
+       ilp = fl->fileList + i;
+       ilp->flags &= ~RPMFILE_SPECFILE;
+     }
++
++    /* try to fix lang marks for lang-marked dirs that contain lang-marked
++     * hardlinks */
++    for (i = 0; i < fl->fileListRecsUsed; i++) {
++      char *te;
++
++      ilp = fl->fileList + i;
++      if(!S_ISDIR(ilp->fl_mode) || !ilp->langs[0])
++          continue;
++      te = nlangs;
++      *te = '\0';
++      for (j = i + 1; j < fl->fileListRecsUsed; j++) {
++          jlp = fl->fileList + j;
++          if (!S_ISREG(jlp->fl_mode) || jlp->fl_nlink <= 1)
++              continue;
++          if (strncmp(jlp->fileURL, ilp->fileURL, strlen(ilp->fileURL)))
++              continue;
++          if (!strcmp(ilp->langs, jlp->langs))
++              continue;
++          if (te == nlangs)
++              te = stpcpy(te, ilp->langs);
++          *te++ = '|';
++          te = stpcpy(te, jlp->langs);
++      }
++
++      if (te == nlangs)
++          continue;
++
++      free((void *)ilp->langs);
++      ilp->langs = xstrdup(nlangs);
++    }
+ }
+ /**
+diff -Nur rpm-4.0.2.orig/lib/cpio.c rpm-4.0.2/lib/cpio.c
+--- rpm-4.0.2.orig/lib/cpio.c  Wed Jan  3 20:29:11 2001
++++ rpm-4.0.2/lib/cpio.c       Tue Dec 25 20:52:41 2001
+@@ -670,7 +670,7 @@
+ static int createLinks(struct hardLink * li, /*@out@*/ const char ** failedFile)
+       /*@modifies fileSystem, *failedFile, li->files, li->linksLeft @*/
+ {
+-    int i;
++    int i,rc;
+     struct stat sb;
+     for (i = 0; i < li->nlink; i++) {
+@@ -685,6 +685,13 @@
+           }
+       }
++      rc = checkDirectory(li->files[i]);
++      if (rc) {
++          if (failedFile)
++              *failedFile = xstrdup(li->files[i]);
++          return rc;
++      }
++
+       if (link(li->files[li->createdPath], li->files[i])) {
+           if (failedFile)
+               *failedFile = xstrdup(li->files[i]);
index 40e207c312a841845fc7d216ee05da283e3342a6..d276fe0b918e9f28952dfae9e38807fcdc5e431a 100644 (file)
--- a/rpm.spec
+++ b/rpm.spec
@@ -3,7 +3,7 @@ Summary(de):    Red Hat (und jetzt auch PLD) Packet-Manager
 Summary(pl):   Aplikacja do zarz±dzania pakietami
 Name:          rpm
 Version:       4.0.2
-Release:       45
+Release:       46
 License:       GPL
 Group:         Base
 Group(de):     Gründsätzlich
@@ -51,6 +51,7 @@ Patch23:      %{name}-non-english-man-pages.patch
 Patch24:       %{name}-progress-nontty.patch
 Patch25:       %{name}-am_ac.patch
 Patch26:       %{name}-python-macros.patch
+Patch27:       %{name}-hardlink-fixes.patch
 Patch37:        %{name}-short_circuit.patch
 Patch38:        %{name}-section_test.patch
 BuildRequires: gettext-devel >= 0.10.38-3
@@ -300,6 +301,7 @@ construir pacotes usando o RPM.
 %patch24 -p1
 %patch25 -p1
 %patch26 -p0
+%patch27 -p1
 %patch31 -p1
 %patch36 -p1
 %patch37 -p1
This page took 0.057008 seconds and 4 git commands to generate.