summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog1
-rw-r--r--dpkg-split/main.c7
2 files changed, 7 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index d1fe1245d..b741942a2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -66,6 +66,7 @@ dpkg (1.16.4) UNRELEASED; urgency=low
Closes: #675613, #676061, #676062, #676107, #676118, #676122
* Do not reset Multi-Arch field in the update log when removing the package.
Closes: #676496
+ * Fix dpkg-split to honour the DPKG_ADMINDIR environment variable.
[ Updated man page translations ]
* German (Helge Kreutzmann).
diff --git a/dpkg-split/main.c b/dpkg-split/main.c
index ee0c8ab9e..2bbb53080 100644
--- a/dpkg-split/main.c
+++ b/dpkg-split/main.c
@@ -107,7 +107,8 @@ static const char printforhelp[] = N_("Type dpkg-split --help for help.");
struct partqueue *queue= NULL;
off_t opt_maxpartsize = SPLITPARTDEFMAX;
-const char *opt_depotdir = ADMINDIR "/" PARTSDIR;
+static const char *admindir;
+const char *opt_depotdir;
const char *opt_outputfile = NULL;
int opt_npquiet = 0;
int opt_msdos = 0;
@@ -163,6 +164,10 @@ int main(int argc, const char *const *argv) {
standard_startup();
myopt(&argv, cmdinfos, printforhelp);
+ admindir = dpkg_db_set_dir(admindir);
+ if (opt_depotdir == NULL)
+ opt_depotdir = dpkg_db_get_path(PARTSDIR);
+
if (!cipaction) badusage(_("need an action option"));
setvbuf(stdout,NULL,_IONBF,0);