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=a73d10a26d4a7112ef2956ace0afd34b1f6877e3

commit a73d10a26d4a7112ef2956ace0afd34b1f6877e3
Author: Guillem Jover <[email protected]>
AuthorDate: Fri Aug 27 03:05:16 2021 +0200

    dpkg-db-backup: Honor the admindir set at configure time
    
    Instead of hardcoding the admindir, set it using the value specified by
    the configure script.
---
 scripts/Makefile.am       | 1 +
 scripts/dpkg-db-backup.sh | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 23f70b795..97e37bd84 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -167,6 +167,7 @@ do_perl_subst = $(AM_V_GEN) $(SED) \
        -e "s:our \$$PROGVERSION = .*;:our \$$PROGVERSION = 
'$(PACKAGE_VERSION)';:"
 
 do_shell_subst = $(AM_V_GEN) $(SED) \
+       -e "s:^ADMINDIR=.*$$:ADMINDIR='$(admindir)':" \
        -e "s:^PKGDATADIR_DEFAULT=.*$$:PKGDATADIR_DEFAULT='$(pkgdatadir)':" \
        -e "s:^version=['\"][^'\"]*[\"']:version=\"$(PACKAGE_VERSION)\":"
 
diff --git a/scripts/dpkg-db-backup.sh b/scripts/dpkg-db-backup.sh
index 228525bb1..f4a0a132a 100755
--- a/scripts/dpkg-db-backup.sh
+++ b/scripts/dpkg-db-backup.sh
@@ -15,6 +15,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+ADMINDIR=/var/lib/dpkg
 ROTATE=7
 
 while [ $# -ne 0 ]; do
@@ -26,7 +27,7 @@ while [ $# -ne 0 ]; do
   shift
 done
 
-dbdir=/var/lib/dpkg
+dbdir="$ADMINDIR"
 
 # Backup the N last versions of dpkg databases containing user data.
 if cd /var/backups ; then

-- 
Dpkg.Org's dpkg

Reply via email to