diff options
author | Guillem Jover <guillem@debian.org> | 2011-03-13 19:56:01 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2011-03-14 07:21:56 +0100 |
commit | dcac09fadeaea420267c85d430ed7668f3e37ba7 (patch) | |
tree | aab6e7e1b7408a610ca6d8eaa9c92f3eb956ffd3 /dselect/method.cc | |
parent | e0ae796d8cde360c5bf9b46b49998f6efa3b8c82 (diff) | |
download | dpkg-dcac09fadeaea420267c85d430ed7668f3e37ba7.tar.gz |
Make admindir file local everywhere
The interface to get and set the database directory is dpkg_db_get_dir()
and dpkg_db_set_dir().
Diffstat (limited to 'dselect/method.cc')
-rw-r--r-- | dselect/method.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/dselect/method.cc b/dselect/method.cc index bfff741b4..82488ced2 100644 --- a/dselect/method.cc +++ b/dselect/method.cc @@ -179,8 +179,8 @@ static urqresult runscript(const char *exepath, const char *name) { strcpy(coption->meth->pathinmeth,exepath); command_init(&cmd, coption->meth->path, name); - command_add_args(&cmd, exepath, admindir, coption->meth->name, - coption->name, NULL); + command_add_args(&cmd, exepath, dpkg_db_get_dir(), + coption->meth->name, coption->name, NULL); ur = falliblesubprocess(&cmd); command_destroy(&cmd); } else { @@ -205,7 +205,7 @@ static urqresult rundpkgauto(const char *name, const char *dpkgmode) { struct command cmd; command_init(&cmd, DPKG, name); - command_add_args(&cmd, DPKG, "--admindir", admindir, "--pending", + command_add_args(&cmd, DPKG, "--admindir", dpkg_db_get_dir(), "--pending", dpkgmode, NULL); cursesoff(); @@ -244,8 +244,8 @@ urqresult urq_setup(void) { strcpy(coption->meth->pathinmeth,METHODSETUPSCRIPT); command_init(&cmd, coption->meth->path, _("query/setup script")); - command_add_args(&cmd, METHODSETUPSCRIPT, admindir, coption->meth->name, - coption->name, NULL); + command_add_args(&cmd, METHODSETUPSCRIPT, dpkg_db_get_dir(), + coption->meth->name, coption->name, NULL); ur = falliblesubprocess(&cmd); command_destroy(&cmd); if (ur == urqr_normal) writecurrentopt(); |