added PACCONF, PACDB and PACROOT defines
This commit is contained in:
parent
44fc71396f
commit
48c6090098
2 changed files with 7 additions and 6 deletions
|
@ -121,7 +121,7 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
if(config->root == NULL) {
|
if(config->root == NULL) {
|
||||||
config->root = strdup("/");
|
config->root = strdup(PACROOT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* add a trailing '/' if there isn't one */
|
/* add a trailing '/' if there isn't one */
|
||||||
|
@ -143,14 +143,14 @@ int main(int argc, char *argv[])
|
||||||
if(config->configfile == NULL) {
|
if(config->configfile == NULL) {
|
||||||
config->configfile = strdup(PACCONF);
|
config->configfile = strdup(PACCONF);
|
||||||
}
|
}
|
||||||
if(parseconfig(config) == -1) {
|
if(parseconfig(config->configfile, config) == -1) {
|
||||||
cleanup(1);
|
cleanup(1);
|
||||||
}
|
}
|
||||||
if(config->dbpath == NULL) {
|
if(config->dbpath == NULL) {
|
||||||
config->dbpath = strdup("var/lib/pacman");
|
config->dbpath = strdup(PACDB);
|
||||||
}
|
}
|
||||||
if(config->cachedir == NULL) {
|
if(config->cachedir == NULL) {
|
||||||
config->cachedir = strdup("var/cache/pacman");
|
config->cachedir = strdup(PACCACHE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set library parameters */
|
/* set library parameters */
|
||||||
|
|
|
@ -21,9 +21,10 @@
|
||||||
#ifndef _PM_PACMAN_H
|
#ifndef _PM_PACMAN_H
|
||||||
#define _PM_PACMAN_H
|
#define _PM_PACMAN_H
|
||||||
|
|
||||||
#ifndef PACCONF
|
#define PACROOT "/"
|
||||||
|
#define PACDB "var/lib/pacman"
|
||||||
|
#define PACCACHE "var/cache/pacman"
|
||||||
#define PACCONF "/etc/pacman.conf"
|
#define PACCONF "/etc/pacman.conf"
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Operations */
|
/* Operations */
|
||||||
#define PM_OP_MAIN 1
|
#define PM_OP_MAIN 1
|
||||||
|
|
Loading…
Add table
Reference in a new issue