mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
Add LOGFILE as a define at compile time for pacman
It has always been a bit odd that logfile had to be specified in the config file, but no other paths did. Add LOGFILE as a preprocessor definition, and make a call to alpm_option_set_logfile() to set the default location so no logfile parameter is necessary in pacman.conf. Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
0686fec839
commit
11f99e0685
@ -2,6 +2,7 @@
|
|||||||
conffile = ${sysconfdir}/pacman.conf
|
conffile = ${sysconfdir}/pacman.conf
|
||||||
dbpath = ${localstatedir}/lib/pacman/
|
dbpath = ${localstatedir}/lib/pacman/
|
||||||
cachedir = ${localstatedir}/cache/pacman/pkg/
|
cachedir = ${localstatedir}/cache/pacman/pkg/
|
||||||
|
logfile = ${localstatedir}/log/pacman.log
|
||||||
|
|
||||||
bin_PROGRAMS = pacman
|
bin_PROGRAMS = pacman
|
||||||
|
|
||||||
@ -14,6 +15,7 @@ DEFS = -DLOCALEDIR=\"@localedir@\" \
|
|||||||
-DROOTDIR=\"$(ROOTDIR)\" \
|
-DROOTDIR=\"$(ROOTDIR)\" \
|
||||||
-DDBPATH=\"$(dbpath)\" \
|
-DDBPATH=\"$(dbpath)\" \
|
||||||
-DCACHEDIR=\"$(cachedir)\" \
|
-DCACHEDIR=\"$(cachedir)\" \
|
||||||
|
-DLOGFILE=\"$(logfile)\" \
|
||||||
@DEFS@
|
@DEFS@
|
||||||
INCLUDES = -I$(top_srcdir)/lib/libalpm
|
INCLUDES = -I$(top_srcdir)/lib/libalpm
|
||||||
|
|
||||||
|
@ -776,9 +776,10 @@ int main(int argc, char *argv[])
|
|||||||
/* Setup logging as soon as possible, to print out maximum debugging info */
|
/* Setup logging as soon as possible, to print out maximum debugging info */
|
||||||
alpm_option_set_logcb(cb_log);
|
alpm_option_set_logcb(cb_log);
|
||||||
alpm_option_set_dlcb(cb_dl_progress);
|
alpm_option_set_dlcb(cb_dl_progress);
|
||||||
/* define root and dbpath to reasonable defaults */
|
/* define paths to reasonable defaults */
|
||||||
alpm_option_set_root(ROOTDIR);
|
alpm_option_set_root(ROOTDIR);
|
||||||
alpm_option_set_dbpath(DBPATH);
|
alpm_option_set_dbpath(DBPATH);
|
||||||
|
alpm_option_set_logfile(LOGFILE);
|
||||||
|
|
||||||
/* Priority of options:
|
/* Priority of options:
|
||||||
* 1. command line
|
* 1. command line
|
||||||
|
Loading…
Reference in New Issue
Block a user