]> git.pld-linux.org Git - packages/gentoo.git/commitdiff
- s/CONFIG_DIR/ETC_DIR/
authorjuandon <witekfl@pld-linux.org>
Mon, 7 Apr 2003 12:21:34 +0000 (12:21 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- s/home_etc/etc_dir/

Changed files:
    gentoo-etc_dir.patch -> 1.1

gentoo-etc_dir.patch [new file with mode: 0644]

diff --git a/gentoo-etc_dir.patch b/gentoo-etc_dir.patch
new file mode 100644 (file)
index 0000000..dd40f40
--- /dev/null
@@ -0,0 +1,76 @@
+diff -Nru gentoo-0.11.34/src/configure.c gentoo-0.11.34.new/src/configure.c
+--- gentoo-0.11.34/src/configure.c     Sat Sep  7 08:59:47 2002
++++ gentoo-0.11.34.new/src/configure.c Sat Mar 29 13:00:55 2003
+@@ -169,18 +169,26 @@
+ void cfg_save_all(MainInfo *min)
+ {
+       gchar           *root = "GentooConfig", *home, rcname[PATH_MAX];
++      gchar           *etc_dir;
+       FILE            *out;
+       guint           i;
+       const CfgModule *page;
+-
+-      if((home = getenv("HOME")) != NULL)
++      
++      if((etc_dir = getenv("ETC_DIR")) != NULL)
+       {
+-              strcpy(rcname, home);
+-              strcat(rcname, "/" RCNAME);
++                      strcpy(rcname, etc_dir);
++                      strcat(rcname, "/" ETC_DIR_RCNAME);
+       }
+       else
++      {
++              if((home = getenv("HOME")) != NULL)
++              {
++                      strcpy(rcname, home);
++                      strcat(rcname, "/" RCNAME);
++              }
++              else
+               return;
+-
++      }
+       cfg_modified_clear(min);
+       if((out = xml_put_open(rcname)) != NULL)
+       {
+@@ -440,8 +448,11 @@
+       gchar   name[PATH_MAX] = "", *hpath;
+       guint32 i, flags = 0UL;
+-      if((hpath = getenv("HOME")) != NULL)
+-              g_snprintf(name, sizeof name, "%s" G_DIR_SEPARATOR_S "%s", hpath, RCNAME);
++      if((hpath = getenv("ETC_DIR")) != NULL)
++              g_snprintf(name, sizeof name, "%s" G_DIR_SEPARATOR_S "%s", hpath, ETC_DIR_RCNAME);
++      else
++              if((hpath = getenv("HOME")) != NULL)
++                      g_snprintf(name, sizeof name, "%s" G_DIR_SEPARATOR_S "%s", hpath, RCNAME);
+       /* Does the user seem to have a local config? */
+       if(!fut_can_read_named(name))
+@@ -463,9 +474,12 @@
+       else
+       {
+               gchar   homename[PATH_MAX] = "", syscfg[PATH_MAX], whine[2 * PATH_MAX];
+-
+-              if((hpath = getenv("HOME")) != NULL)
+-                      g_snprintf(homename, sizeof homename, "%s/%s", hpath, RCNAME);
++              
++              if((hpath = getenv("ETC_DIR")) != NULL)
++                      g_snprintf(homename, sizeof homename, "%s/%s", hpath, ETC_DIR_RCNAME);
++              else
++                      if((hpath = getenv("HOME")) != NULL)
++                              g_snprintf(homename, sizeof homename, "%s/%s", hpath, RCNAME);
+               g_snprintf(syscfg, sizeof syscfg, PATH_CFG G_DIR_SEPARATOR_S "%s", RCNAME + 1);
+               g_snprintf(whine, sizeof whine, _("Couldn't find any configuration file; checked\n"
+diff -Nru gentoo-0.11.34/src/gentoo.h gentoo-0.11.34.new/src/gentoo.h
+--- gentoo-0.11.34/src/gentoo.h        Sun Sep  1 17:41:41 2002
++++ gentoo-0.11.34.new/src/gentoo.h    Sat Mar 29 12:56:24 2003
+@@ -75,6 +75,7 @@
+ /* ----------------------------------------------------------------------------------------- */
+ #define       RCNAME  ".gentoorc"
++#define ETC_DIR_RCNAME "gentoorc"
+ /* ----------------------------------------------------------------------------------------- */
This page took 0.100776 seconds and 4 git commands to generate.