From: Wichert Akkerman Date: Sun, 1 Oct 2000 18:45:47 +0000 (+0000) Subject: main/main.c: call new myoptfile() X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=760e446133df6a2f6e28533c5c65a551a8d4db72;p=dpkg main/main.c: call new myoptfile() include/Makefile.in, include/dpkg.h.in: add dpkgconfdir --- diff --git a/ChangeLog b/ChangeLog index 4344a13f..f06817df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,8 @@ Sun Oct 1 20:09:42 CEST 2000 Wichert Akkerman * main/enquiry.c: fix the listpackage output logic * main/filesdb.c: fix error cleanup in ensure_statoverride * lib/myopt.c: add myoptfile() so we can read configuration files + * main/main.c: call new myoptfile() + * include/Makefile.in, include/dpkg.h.in: add dpkgconfdir Mon Sep 25 16:19:05 CEST 2000 Wichert Akkerman diff --git a/Makefile.conf.in b/Makefile.conf.in index b4d2e507..9dd2622f 100644 --- a/Makefile.conf.in +++ b/Makefile.conf.in @@ -32,6 +32,7 @@ man5dir = $(mandir)/man5 man8dir = $(mandir)/man8 sysconfdir = @sysconfdir@ +dpkgconfdir = $(sysconfdir)/dpkg alternativesdir = $(sysconfdir)/alternatives PERL = @PERL@ diff --git a/debian/changelog b/debian/changelog index 996570e5..7e0c3893 100644 --- a/debian/changelog +++ b/debian/changelog @@ -26,6 +26,7 @@ dpkg (1.7.0) unstable; urgency=low * Clean up fd handling in some places. Closes: Bug#69359,#69360,#69361 * Document -k option for dpkg-buildpackage. Closes: Bug#71808 * Install dummy shlibs.default and shlibs.override files + * Give dpkg a configurationfile -- Wichert Akkerman UNRELEASED diff --git a/include/Makefile.in b/include/Makefile.in index 1bd92ef6..65a3273e 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -17,6 +17,8 @@ cvslean:: clean rm -f Makefile dpkg.h: dpkg.h.in - sed 's,#ADMINDIR#,$(admindir),; s,#LIBDIR#,$(dpkglibdir),;' $< > $@ + sed -e 's,#CONFIGDIR#,$(dpkgconfdir),' \ + -e 's,#ADMINDIR#,$(admindir),' \ + -e 's,#LIBDIR#,$(dpkglibdir),; $< > $@ .PHONY: all install clean distclean diff --git a/include/dpkg.h.in b/include/dpkg.h.in index 81ec4d15..8bbc5ca8 100644 --- a/include/dpkg.h.in +++ b/include/dpkg.h.in @@ -67,6 +67,7 @@ #define LISTFILE "list" #define ADMINDIR "#ADMINDIR#" +#define CONFIGDIR "#CONFIGDIR#" #define STATUSFILE "status" #define AVAILFILE "available" #define LOCKFILE "lock" diff --git a/main/main.c b/main/main.c index c6ca3571..70054a29 100644 --- a/main/main.c +++ b/main/main.c @@ -415,6 +415,7 @@ int main(int argc, const char *const *argv) { } } + myfileopt(CONFIGDIR "/" DPKG, cmdinfos); myopt(&argv,cmdinfos); if (!cipaction) badusage(_("need an action option"));