]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm-etc_dir.patch
- fix symlinks processing during install.
[packages/rpm.git] / rpm-etc_dir.patch
index 6886740f95d51f67c583fdf81d8e39e067314e8a..300cee558234816ee0841f924ae1f3155b8345ef 100644 (file)
@@ -1,80 +1,74 @@
-diff -ur rpm-4.4.1/lib/rpmrc.c rpm-4.4.1-home_etc/lib/rpmrc.c
---- rpm-4.4.1/lib/rpmrc.c      2005-01-17 19:46:23.000000000 +0100
-+++ rpm-4.4.1-home_etc/lib/rpmrc.c     2005-06-17 14:28:10.000000000 +0200
-@@ -1,6 +1,8 @@
- /*@-bounds@*/
- #include "system.h"
-+#include <home_etc.h>
-+
- #include <stdarg.h>
- #if defined(__linux__) && defined(__powerpc__)
- #include <setjmp.h>
-@@ -1814,13 +1814,13 @@
-               rc = 1;
-               break;
-           }
+diff -Nru rpm-4.1/lib/rpmrc.c rpm-4.1.new/lib/rpmrc.c
+--- rpm-4.1/lib/rpmrc.c        Tue Aug 20 16:53:44 2002
++++ rpm-4.1.new/lib/rpmrc.c    Tue Mar 11 18:41:48 2003
+@@ -1756,27 +1756,39 @@
+       /* Expand ~/ to $HOME/ */
+       fn[0] = '\0';
+       if (r[0] == '~' && r[1] == '/') {
++                      const char * etc_dir = getenv("HOME_ETC");
+           const char * home = getenv("HOME");
+-          if (home == NULL) {
++                      if (etc_dir) {
++              if (strlen(etc_dir) > (sizeof(fn) - strlen(r))) {
++                                      rpmError(RPMERR_RPMRC, _("Cannot read %s, HOME_ETC is too large.\n"),r);
++                                      rc = 1;
++                                      break;
++              }
++              strcpy(fn, etc_dir);
++                              strncat(fn, "/", sizeof(fn) - strlen(fn));                              
++                r+=2;
++              
++                      } else {
++              if (home == NULL) {
+           /* XXX Only /usr/lib/rpm/rpmrc must exist in default rcfiles list */
+-              if (rcfiles == defrcfiles && myrcfiles != r)
+-                  continue;
+-              rpmError(RPMERR_RPMRC, _("Cannot expand %s\n"), r);
+-              rc = 1;
+-              break;
+-          }
 -          if (strlen(home) > (sizeof(fn) - strlen(r))) {
-+          if (strlen(_HE(home)) > (sizeof(fn) - strlen(r))) {
-               rpmError(RPMERR_RPMRC, _("Cannot read %s, HOME is too large.\n"),
+-              rpmError(RPMERR_RPMRC, _("Cannot read %s, HOME is too large.\n"),
++                      if (rcfiles == defrcfiles && myrcfiles != r)
++                      continue;
++                      rpmError(RPMERR_RPMRC, _("Cannot expand %s\n"), r);
++                      rc = 1;
++                      break;
++              }
++              if (strlen(home) > (sizeof(fn) - strlen(r))) {
++                      rpmError(RPMERR_RPMRC, _("Cannot read %s, HOME is too large.\n"),
                                r);
-               rc = 1;
-               break;
-           }
+-              rc = 1;
+-              break;
+-          }
 -          strcpy(fn, home);
-+          strcpy(fn, _HE(home));
-           r++;
-       }
-       strncat(fn, r, sizeof(fn) - (strlen(fn) + 1));
-diff -ur rpm-4.4.1/rpmio/macro.c rpm-4.4.1-home_etc/rpmio/macro.c
---- rpm-4.4.1/rpmio/macro.c    2005-01-26 04:39:58.000000000 +0100
-+++ rpm-4.4.1-home_etc/rpmio/macro.c   2005-06-17 14:25:02.415093480 +0200
-@@ -5,6 +5,8 @@
+-          r++;
+-      }
+-      strncat(fn, r, sizeof(fn) - (strlen(fn) + 1));
+-      fn[sizeof(fn)-1] = '\0';
+-
++                      rc = 1;
++                      break;
++              }
++              strcpy(fn, home);
++                r++;
++                      }
++              }
++              strncat(fn, r, sizeof(fn) - (strlen(fn) + 1));
++              fn[sizeof(fn)-1] = '\0';
+       /* Read another rcfile */
+       fd = Fopen(fn, "r.fpio");
+       if (fd == NULL || Ferror(fd)) {
+--- rpm-4.4.3/po/pl.po.orig    2005-11-18 22:46:19.577151784 +0100
++++ rpm-4.4.3/po/pl.po 2005-11-18 22:48:30.947180504 +0100
+@@ -3176,6 +3176,10 @@
+ msgid "bad option '%s' at %s:%d\n"
+ msgstr "b³êdna opcja '%s' w %s:%d\n"
  
- #include "system.h"
- #include <stdarg.h>
++#: lib/rpmrc.c:1796
++msgid "Cannot read %s, HOME_ETC is too large.\n"
++msgstr "Nie mo¿na odczytaæ %s, HOME_ETC jest zbyt du¿e.\n"
 +
-+#include <home_etc.h>
- #if !defined(isblank)
- #define       isblank(_c)     ((_c) == ' ' || (_c) == '\t')
-@@ -1731,7 +1731,7 @@
-       /* XXX Prepend the URL leader for globs that have stripped it off */
-       maxb = 0;
-       for (i = 0; i < gl.gl_pathc; i++) {
--          if ((nb = strlen(&(gl.gl_pathv[i][0]))) > maxb)
-+          if ((nb = strlen(_HE(&(gl.gl_pathv[i][0])))) > maxb)
-               maxb = nb;
-       }
-       
-@@ -1765,7 +1765,7 @@
-           const char * globFile = &(gl.gl_pathv[i][0]);
-           if (globRoot > globURL && globRoot[-1] == '/')
-               while (*globFile == '/') globFile++;
--          strcpy(globRoot, globFile);
-+          strcpy(globRoot, _HE(globFile));
- if (_debug)
- fprintf(stderr, "*** rpmGlob argv[%d] \"%s\"\n", argc, globURL);
-           argv[argc++] = xstrdup(globURL);
---- rpm-4.4.1/lib/Makefile.am~ 2005-06-17 15:08:29.901412560 +0200
-+++ rpm-4.4.1/lib/Makefile.am  2005-06-17 15:08:41.173698912 +0200
-@@ -44,7 +44,7 @@
- librpm_la_LDFLAGS = -release 4.4 $(LDFLAGS) \
-       $(top_builddir)/rpmdb/librpmdb.la \
-       $(top_builddir)/rpmio/librpmio.la \
--      -lpopt \
-+      -lpopt -lhome_etc \
-       @WITH_SELINUX_LIB@ \
-       @INTLLIBS@
---- rpm-4.4.1/rpmio/Makefile.am~       2005-06-17 15:08:29.902412408 +0200
-+++ rpm-4.4.1/rpmio/Makefile.am        2005-06-17 15:09:10.987166576 +0200
-@@ -37,7 +37,7 @@
-       @WITH_LUA_LIB@ \
-       $(top_builddir)/file/src/libmagic.la \
-       @WITH_ZLIB_LIB@ \
--      -lneon -lpthread
-+      -lneon -lpthread -lhome_etc
- librpmio_la_LIBADD = # $(BEECRYPTLOBJS)
- librpmio_la_DEPENDENCIES = # .created
+ #: lib/rpmrc.c:1797
+ #, c-format
+ msgid "Cannot expand %s\n"
This page took 0.044564 seconds and 4 git commands to generate.