From e6a21a0d6f0cf0baa471caa9bfbd1a3a92031cd4 Mon Sep 17 00:00:00 2001 From: unknown author <cooker@mandrivalinux.org> Date: Mon, 5 Jan 2009 13:29:57 +0000 Subject: [PATCH 05/36] mageia rpmrc rpmpopt --- Makefile.am | 1 + lib/Makefile.am | 1 + lib/poptALL.c | 5 +++++ lib/rpmrc.c | 2 +- rpmqv.c | 5 +++++ 5 files changed, 13 insertions(+), 1 deletions(-) diff --git a/Makefile.am b/Makefile.am index 587cfa7..1b29d08 100644 --- a/Makefile.am +++ b/Makefile.am @@ -35,6 +35,7 @@ AM_CPPFLAGS += -I$(top_srcdir)/misc AM_CPPFLAGS += @WITH_LIBELF_INCLUDE@ AM_CPPFLAGS += -DLOCALEDIR="\"$(localedir)\"" AM_CPPFLAGS += -DLIBRPMALIAS_FILENAME="\"rpmpopt-${VERSION}\"" +AM_CPPFLAGS += -DLIBVENDORALIAS_FILENAME="\"mageia/rpmpopt\"" pkginclude_HEADERS = nodist_pkginclude_HEADERS = diff --git a/lib/Makefile.am b/lib/Makefile.am index b378669..6b057a1 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -11,6 +11,7 @@ AM_CPPFLAGS += -DLOCALEDIR="\"$(localedir)\"" AM_CPPFLAGS += -DSYSCONFDIR="\"$(sysconfdir)\"" AM_CPPFLAGS += -DLOCALSTATEDIR="\"$(localstatedir)\"" AM_CPPFLAGS += -DLIBRPMALIAS_FILENAME="\"rpmpopt-${VERSION}\"" +AM_CPPFLAGS += -DLIBVENDORALIAS_FILENAME="\"mageia/rpmpopt\"" check_PROGRAMS = CLEANFILES = diff --git a/lib/poptALL.c b/lib/poptALL.c index 7bc3a92..3b146a2 100644 --- a/lib/poptALL.c +++ b/lib/poptALL.c @@ -343,6 +343,11 @@ rpmcliInit(int argc, char *const argv[], struct poptOption * optionsTable) (void) poptReadConfigFile(optCon, poptfile); free(poptfile); } + { + char *poptfile = rpmGenPath(rpmConfigDir(), LIBVENDORALIAS_FILENAME, NULL); + (void) poptReadConfigFile(optCon, poptfile); + free(poptfile); + } (void) poptReadDefaultConfig(optCon, 1); poptSetExecPath(optCon, rpmConfigDir(), 1); diff --git a/lib/rpmrc.c b/lib/rpmrc.c index 0818deb..ac6ec5c 100644 --- a/lib/rpmrc.c +++ b/lib/rpmrc.c @@ -417,7 +417,7 @@ static void setDefaults(void) const char *confdir = rpmConfigDir(); if (!defrcfiles) { defrcfiles = rstrscat(NULL, confdir, "/rpmrc", ":", - confdir, "/" RPMCANONVENDOR "/rpmrc", ":", + confdir, "/" "mageia" "/rpmrc", ":", SYSCONFDIR "/rpmrc", ":", "~/.rpmrc", NULL); } diff --git a/rpmqv.c b/rpmqv.c index 3840152..d10132d 100644 --- a/rpmqv.c +++ b/rpmqv.c @@ -266,6 +266,11 @@ int main(int argc, char *argv[]) (void) poptReadConfigFile(optCon, poptfile); free(poptfile); } + { + char *poptfile = rpmGenPath(rpmConfigDir(), LIBVENDORALIAS_FILENAME, NULL); + (void) poptReadConfigFile(optCon, poptfile); + free(poptfile); + } (void) poptReadDefaultConfig(optCon, 1); poptSetExecPath(optCon, rpmConfigDir(), 1); -- 1.6.4.4