This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=b8f9e1c3ce86818d14ccad403e6ad2e6b52e6b12

commit b8f9e1c3ce86818d14ccad403e6ad2e6b52e6b12
Author: Guillem Jover <[email protected]>
AuthorDate: Sat Jun 26 23:05:54 2021 +0200

    libdpkg: Set the default database directory relative to the system root
    
    When we have set the system root directory, and then end up having to
    set the database directory to its default value, we need to set it
    relative to that root directory.
    
    Stable-Candidate: 1.20.x
---
 lib/dpkg/dbdir.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/dpkg/dbdir.c b/lib/dpkg/dbdir.c
index 2a0eefad8..fecd4842f 100644
--- a/lib/dpkg/dbdir.c
+++ b/lib/dpkg/dbdir.c
@@ -27,6 +27,7 @@
 
 #include <dpkg/dpkg.h>
 #include <dpkg/dpkg-db.h>
+#include <dpkg/fsys.h>
 
 static const char *db_dir = ADMINDIR;
 
@@ -52,7 +53,7 @@ dpkg_db_set_dir(const char *dir)
                if (env)
                        db_dir = env;
                else
-                       db_dir = ADMINDIR;
+                       db_dir = dpkg_fsys_get_path(ADMINDIR);
        } else {
                db_dir = dir;
        }

-- 
Dpkg.Org's dpkg

Reply via email to