1 |
From e6a21a0d6f0cf0baa471caa9bfbd1a3a92031cd4 Mon Sep 17 00:00:00 2001 |
2 |
From: unknown author <cooker@mandrivalinux.org> |
3 |
Date: Mon, 5 Jan 2009 13:29:57 +0000 |
4 |
Subject: [PATCH 05/36] mageia rpmrc rpmpopt |
5 |
|
6 |
--- |
7 |
Makefile.am | 1 + |
8 |
lib/Makefile.am | 1 + |
9 |
lib/poptALL.c | 5 +++++ |
10 |
lib/rpmrc.c | 2 +- |
11 |
rpmqv.c | 5 +++++ |
12 |
5 files changed, 13 insertions(+), 1 deletions(-) |
13 |
|
14 |
diff --git a/Makefile.am b/Makefile.am |
15 |
index 587cfa7..1b29d08 100644 |
16 |
--- a/Makefile.am |
17 |
+++ b/Makefile.am |
18 |
@@ -35,6 +35,7 @@ AM_CPPFLAGS += -I$(top_srcdir)/misc |
19 |
AM_CPPFLAGS += @WITH_LIBELF_INCLUDE@ |
20 |
AM_CPPFLAGS += -DLOCALEDIR="\"$(localedir)\"" |
21 |
AM_CPPFLAGS += -DLIBRPMALIAS_FILENAME="\"rpmpopt-${VERSION}\"" |
22 |
+AM_CPPFLAGS += -DLIBVENDORALIAS_FILENAME="\"mageia/rpmpopt\"" |
23 |
|
24 |
pkginclude_HEADERS = |
25 |
nodist_pkginclude_HEADERS = |
26 |
diff --git a/lib/Makefile.am b/lib/Makefile.am |
27 |
index b378669..6b057a1 100644 |
28 |
--- a/lib/Makefile.am |
29 |
+++ b/lib/Makefile.am |
30 |
@@ -11,6 +11,7 @@ AM_CPPFLAGS += -DLOCALEDIR="\"$(localedir)\"" |
31 |
AM_CPPFLAGS += -DSYSCONFDIR="\"$(sysconfdir)\"" |
32 |
AM_CPPFLAGS += -DLOCALSTATEDIR="\"$(localstatedir)\"" |
33 |
AM_CPPFLAGS += -DLIBRPMALIAS_FILENAME="\"rpmpopt-${VERSION}\"" |
34 |
+AM_CPPFLAGS += -DLIBVENDORALIAS_FILENAME="\"mageia/rpmpopt\"" |
35 |
|
36 |
check_PROGRAMS = |
37 |
CLEANFILES = |
38 |
diff --git a/lib/poptALL.c b/lib/poptALL.c |
39 |
index 7bc3a92..3b146a2 100644 |
40 |
--- a/lib/poptALL.c |
41 |
+++ b/lib/poptALL.c |
42 |
@@ -343,6 +343,11 @@ rpmcliInit(int argc, char *const argv[], struct poptOption * optionsTable) |
43 |
(void) poptReadConfigFile(optCon, poptfile); |
44 |
free(poptfile); |
45 |
} |
46 |
+ { |
47 |
+ char *poptfile = rpmGenPath(rpmConfigDir(), LIBVENDORALIAS_FILENAME, NULL); |
48 |
+ (void) poptReadConfigFile(optCon, poptfile); |
49 |
+ free(poptfile); |
50 |
+ } |
51 |
(void) poptReadDefaultConfig(optCon, 1); |
52 |
poptSetExecPath(optCon, rpmConfigDir(), 1); |
53 |
|
54 |
diff --git a/lib/rpmrc.c b/lib/rpmrc.c |
55 |
index 0818deb..ac6ec5c 100644 |
56 |
--- a/lib/rpmrc.c |
57 |
+++ b/lib/rpmrc.c |
58 |
@@ -417,7 +417,7 @@ static void setDefaults(void) |
59 |
const char *confdir = rpmConfigDir(); |
60 |
if (!defrcfiles) { |
61 |
defrcfiles = rstrscat(NULL, confdir, "/rpmrc", ":", |
62 |
- confdir, "/" RPMCANONVENDOR "/rpmrc", ":", |
63 |
+ confdir, "/" "mageia" "/rpmrc", ":", |
64 |
SYSCONFDIR "/rpmrc", ":", |
65 |
"~/.rpmrc", NULL); |
66 |
} |
67 |
diff --git a/rpmqv.c b/rpmqv.c |
68 |
index 3840152..d10132d 100644 |
69 |
--- a/rpmqv.c |
70 |
+++ b/rpmqv.c |
71 |
@@ -266,6 +266,11 @@ int main(int argc, char *argv[]) |
72 |
(void) poptReadConfigFile(optCon, poptfile); |
73 |
free(poptfile); |
74 |
} |
75 |
+ { |
76 |
+ char *poptfile = rpmGenPath(rpmConfigDir(), LIBVENDORALIAS_FILENAME, NULL); |
77 |
+ (void) poptReadConfigFile(optCon, poptfile); |
78 |
+ free(poptfile); |
79 |
+ } |
80 |
(void) poptReadDefaultConfig(optCon, 1); |
81 |
poptSetExecPath(optCon, rpmConfigDir(), 1); |
82 |
|
83 |
-- |
84 |
1.6.4.4 |
85 |
|