]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- outdated
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 16 Jul 2005 13:36:25 +0000 (13:36 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rpm-home_etc.patch -> 1.2

rpm-home_etc.patch [deleted file]

diff --git a/rpm-home_etc.patch b/rpm-home_etc.patch
deleted file mode 100644 (file)
index 1c67b03..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-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,40 @@
-       /* Expand ~/ to $HOME/ */
-       fn[0] = '\0';
-       if (r[0] == '~' && r[1] == '/') {
-+                      const char * config_dir = getenv("CONFIG_DIR");
-           const char * home = getenv("HOME");
--          if (home == NULL) {
-+                      if (config_dir) {
-+              if (strlen(config_dir) > (sizeof(fn) - strlen(r))) {
-+                                      rpmError(RPMERR_RPMRC, _("Cannot read %s, CONFIG_DIR is too large.\n"),r);
-+                                      rc = 1;
-+                                      break;
-+              }
-+              strcpy(fn, config_dir);
-+                              strncat(fn, "/", sizeof(fn) - strlen(fn));                              
-+                r+=2;
-+              
-+                              if (r[0] == '.') r++;
-+                      } 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))) {
--              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;
--          }
--          strcpy(fn, home);
--          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)) {
-diff -Nru rpm-4.1/rpmio/macro.c rpm-4.1.new/rpmio/macro.c
---- rpm-4.1/rpmio/macro.c      Tue Sep 17 14:58:23 2002
-+++ rpm-4.1.new/rpmio/macro.c  Tue Mar 11 18:21:59 2003
-@@ -1614,15 +1614,23 @@
-       buf[0] = '\0';
-       if (mfile[0] == '~' && mfile[1] == '/') {
-           char *home;
--          if ((home = getenv("HOME")) != NULL) {
--              mfile += 2;
--              strncpy(buf, home, sizeof(buf));
--              strncat(buf, "/", sizeof(buf) - strlen(buf));
-+                      char *config_dir = getenv("CONFIG_DIR");
-+
-+                      if (config_dir) {
-+                              mfile += 2;
-+                              if (mfile[0] == '.') mfile++;
-+                              strncpy(buf, config_dir, sizeof(buf));
-+                              strncat(buf, "/", sizeof(buf) - strlen(buf));                           
-+                      } else {
-+              if ((home = getenv("HOME")) != NULL) {
-+                      mfile += 2;
-+                      strncpy(buf, home, sizeof(buf));
-+                      strncat(buf, "/", sizeof(buf) - strlen(buf));
-           }
-+              }
-       }
-       strncat(buf, mfile, sizeof(buf) - strlen(buf));
-       buf[sizeof(buf)-1] = '\0';
--
-       fd = Fopen(buf, "r.fpio");
-       if (fd == NULL || Ferror(fd)) {
-           if (fd) (void) Fclose(fd);
This page took 0.113413 seconds and 4 git commands to generate.