summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-06-04 10:37:00 -0400
committerDan McGee <dan@archlinux.org>2007-06-04 17:00:30 -0400
commitd9ff7bbcd2eef852f18ad65d79aa6b6f7c58535c (patch)
tree1f8fb2f1b794906300ca14ac68b592136a898de1 /src
parenta094deacf4f6abbef10c6acf38190d4fa9d34f0e (diff)
Remove hardcoded defines from libalpm
Remove any use of the former path variables defined by the Makefiles or config.h. These are now runtime configurable only with pacman.conf (or by using flags on the command line). Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/Makefile.am1
-rw-r--r--src/pacman/add.c2
-rw-r--r--src/pacman/pacman.c6
-rw-r--r--src/pacman/remove.c2
-rw-r--r--src/pacman/sync.c2
5 files changed, 6 insertions, 7 deletions
diff --git a/src/pacman/Makefile.am b/src/pacman/Makefile.am
index 5248abf3..3bccac22 100644
--- a/src/pacman/Makefile.am
+++ b/src/pacman/Makefile.am
@@ -8,7 +8,6 @@ bin_PROGRAMS = pacman pacman.static
DEFS = -DLOCALEDIR=\"@localedir@\" \
-DCONFFILE=\"$(conffile)\" \
- -DLOCKFILE=\"$(lockfile)\" \
@DEFS@
INCLUDES = -I$(top_srcdir)/lib/libalpm
diff --git a/src/pacman/add.c b/src/pacman/add.c
index ef84a398..526b236b 100644
--- a/src/pacman/add.c
+++ b/src/pacman/add.c
@@ -95,7 +95,7 @@ int pacman_add(alpm_list_t *targets)
if(pm_errno == PM_ERR_HANDLE_LOCK) {
/* TODO this and the 2 other places should probably be on stderr */
printf(_(" if you're sure a package manager is not already\n"
- " running, you can remove %s.\n"), LOCKFILE);
+ " running, you can remove %s.\n"), alpm_option_get_lockfile());
}
return(1);
}
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index f0ae3287..0b95ac15 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -520,7 +520,7 @@ int main(int argc, char *argv[])
(config->op_s_search || config->group || config->op_q_list || config->op_q_info
|| config->flags & PM_TRANS_FLAG_PRINTURIS))
|| (config->op == PM_OP_DEPTEST && config->op_d_resolve)
- || (strcmp(alpm_option_get_root(), ROOTDIR) != 0)) {
+ || (strcmp(alpm_option_get_root(), "/") != 0)) {
/* special case: PM_OP_SYNC can be used w/ config->op_s_search by any user */
/* special case: ignore root user check if -r is specified, fall back on
* normal FS checking */
@@ -551,10 +551,10 @@ int main(int argc, char *argv[])
if(config->verbose > 0) {
printf("Root : %s\n", alpm_option_get_root());
printf("Conf File : %s\n", config->configfile);
- printf("Lock File : %s\n", alpm_option_get_lockfile());
- printf("Root : %s\n", alpm_option_get_root());
printf("DBPath : %s\n", alpm_option_get_dbpath());
printf("CacheDir : %s\n", alpm_option_get_cachedir());
+ printf("Lock File : %s\n", alpm_option_get_lockfile());
+ printf("Log File : %s\n", alpm_option_get_logfile());
list_display("Targets :", pm_targets);
}
diff --git a/src/pacman/remove.c b/src/pacman/remove.c
index 9cdfb0d8..c76fc69a 100644
--- a/src/pacman/remove.c
+++ b/src/pacman/remove.c
@@ -86,7 +86,7 @@ int pacman_remove(alpm_list_t *targets)
alpm_strerror(pm_errno));
if(pm_errno == PM_ERR_HANDLE_LOCK) {
printf(_(" if you're sure a package manager is not already\n"
- " running, you can remove %s.\n"), LOCKFILE);
+ " running, you can remove %s.\n"), alpm_option_get_lockfile());
}
FREELIST(finaltargs);
return(1);
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 7d7de529..9f345c69 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -482,7 +482,7 @@ int pacman_sync(alpm_list_t *targets)
alpm_strerror(pm_errno));
if(pm_errno == PM_ERR_HANDLE_LOCK) {
printf(_(" if you're sure a package manager is not already\n"
- " running, you can remove %s.\n"), LOCKFILE);
+ " running, you can remove %s.\n"), alpm_option_get_lockfile());
}
return(1);
}