Package: dpkg Version: 1.19.0.5 dpkg ignores DPKG_ADMINDIR environment variable because in main.c on line 207 admindir variable incorrectly intitialized with ADMINDIR define. The variable must be initialized with NULL. Otherwise DPKG_ADMINDIR is always ignored (see lib/dpkg/dbdir.c, function dpkg_db_set_dir.
Patch included :)
diff -Naur a/src/main.c b/src/main.c --- a/src/main.c 2017-11-03 01:28:26.000000000 +0300 +++ b/src/main.c 2018-05-25 19:46:03.519928871 +0300 @@ -204,7 +204,7 @@ int fc_script_chrootless = 0; int errabort = 50; -static const char *admindir = ADMINDIR; +static const char *admindir = NULL; const char *instdir= ""; struct pkg_list *ignoredependss = NULL;
-- Alexander Zhukov