]> git.pld-linux.org Git - packages/gentoo.git/blob - gentoo-home_etc.patch
- s/^Terminal=0/Terminal=false/ s/^Terminal=1/Terminal=true/ to conform
[packages/gentoo.git] / gentoo-home_etc.patch
1 diff -Nru gentoo-0.11.34/src/configure.c gentoo-0.11.34.new/src/configure.c
2 --- gentoo-0.11.34/src/configure.c      Sat Sep  7 08:59:47 2002
3 +++ gentoo-0.11.34.new/src/configure.c  Sat Mar 29 13:00:55 2003
4 @@ -169,18 +169,26 @@
5  void cfg_save_all(MainInfo *min)
6  {
7         gchar           *root = "GentooConfig", *home, rcname[PATH_MAX];
8 +       gchar           *config_dir;
9         FILE            *out;
10         guint           i;
11         const CfgModule *page;
12 -
13 -       if((home = getenv("HOME")) != NULL)
14 +       
15 +       if((config_dir = getenv("CONFIG_DIR")) != NULL)
16         {
17 -               strcpy(rcname, home);
18 -               strcat(rcname, "/" RCNAME);
19 +                       strcpy(rcname, config_dir);
20 +                       strcat(rcname, "/" CONFIG_DIR_RCNAME);
21         }
22         else
23 +       {
24 +               if((home = getenv("HOME")) != NULL)
25 +               {
26 +                       strcpy(rcname, home);
27 +                       strcat(rcname, "/" RCNAME);
28 +               }
29 +               else
30                 return;
31 -
32 +       }
33         cfg_modified_clear(min);
34         if((out = xml_put_open(rcname)) != NULL)
35         {
36 @@ -440,8 +448,11 @@
37         gchar   name[PATH_MAX] = "", *hpath;
38         guint32 i, flags = 0UL;
39  
40 -       if((hpath = getenv("HOME")) != NULL)
41 -               g_snprintf(name, sizeof name, "%s" G_DIR_SEPARATOR_S "%s", hpath, RCNAME);
42 +       if((hpath = getenv("CONFIG_DIR")) != NULL)
43 +               g_snprintf(name, sizeof name, "%s" G_DIR_SEPARATOR_S "%s", hpath, CONFIG_DIR_RCNAME);
44 +       else
45 +               if((hpath = getenv("HOME")) != NULL)
46 +                       g_snprintf(name, sizeof name, "%s" G_DIR_SEPARATOR_S "%s", hpath, RCNAME);
47  
48         /* Does the user seem to have a local config? */
49         if(!fut_can_read_named(name))
50 @@ -463,9 +474,12 @@
51         else
52         {
53                 gchar   homename[PATH_MAX] = "", syscfg[PATH_MAX], whine[2 * PATH_MAX];
54 -
55 -               if((hpath = getenv("HOME")) != NULL)
56 -                       g_snprintf(homename, sizeof homename, "%s/%s", hpath, RCNAME);
57 +               
58 +               if((hpath = getenv("CONFIG_DIR")) != NULL)
59 +                       g_snprintf(homename, sizeof homename, "%s/%s", hpath, CONFIG_DIR_RCNAME);
60 +               else
61 +                       if((hpath = getenv("HOME")) != NULL)
62 +                               g_snprintf(homename, sizeof homename, "%s/%s", hpath, RCNAME);
63  
64                 g_snprintf(syscfg, sizeof syscfg, PATH_CFG G_DIR_SEPARATOR_S "%s", RCNAME + 1);
65                 g_snprintf(whine, sizeof whine, _("Couldn't find any configuration file; checked\n"
66 diff -Nru gentoo-0.11.34/src/gentoo.h gentoo-0.11.34.new/src/gentoo.h
67 --- gentoo-0.11.34/src/gentoo.h Sun Sep  1 17:41:41 2002
68 +++ gentoo-0.11.34.new/src/gentoo.h     Sat Mar 29 12:56:24 2003
69 @@ -75,6 +75,7 @@
70  /* ----------------------------------------------------------------------------------------- */
71  
72  #define        RCNAME  ".gentoorc"
73 +#define CONFIG_DIR_RCNAME "gentoorc"
74  
75  /* ----------------------------------------------------------------------------------------- */
76  
This page took 0.242236 seconds and 3 git commands to generate.