This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch master in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=e95082d78a4b11a411bb8c98dfc140ace452aa2b commit e95082d78a4b11a411bb8c98dfc140ace452aa2b (HEAD -> master) Author: Guillem Jover <guil...@debian.org> AuthorDate: Sat Sep 1 22:42:30 2018 +0200 dpkg-maintscript-helper: Check that DPKG_MAINTSCRIPT_PACKAGE is defined When we need the environment variablem check that it is defined, and error out otherwise. Closes: #907772 --- debian/changelog | 2 ++ scripts/dpkg-maintscript-helper.sh | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/debian/changelog b/debian/changelog index 5030f6a7a..6fea9b501 100644 --- a/debian/changelog +++ b/debian/changelog @@ -93,6 +93,8 @@ dpkg (1.19.1) UNRELEASED; urgency=medium from the database when no arguments are specified. Closes: #616342 * Add new dpkg-gensymbols -l option to avoid having to abuse LD_LIBRARY_PATH for cross-build paths. + * Check that DPKG_MAINTSCRIPT_PACKAGE is defined in dpkg-maintscript-helper. + Closes: #907772 * Architecture support: - Add support for riscv64 CPU. Closes: #822914 Thanks to Manuel A. Fernandez Montecelo <m...@debian.org> diff --git a/scripts/dpkg-maintscript-helper.sh b/scripts/dpkg-maintscript-helper.sh index 2e5d207bc..de6c863c2 100755 --- a/scripts/dpkg-maintscript-helper.sh +++ b/scripts/dpkg-maintscript-helper.sh @@ -46,6 +46,8 @@ rm_conffile() { [ -n "$1" ] || error "maintainer script parameters are missing" [ -n "$DPKG_MAINTSCRIPT_NAME" ] || \ error "environment variable DPKG_MAINTSCRIPT_NAME is required" + [ -n "$DPKG_MAINTSCRIPT_PACKAGE" ] || \ + error "environment variable DPKG_MAINTSCRIPT_PACKAGE is required" [ "${CONFFILE}" != "${CONFFILE#/}" ] || \ error "conffile '$CONFFILE' is not an absolute path" validate_optional_version "$LASTVERSION" @@ -156,6 +158,8 @@ mv_conffile() { [ -n "$1" ] || error "maintainer script parameters are missing" [ -n "$DPKG_MAINTSCRIPT_NAME" ] || \ error "environment variable DPKG_MAINTSCRIPT_NAME is required" + [ -n "$DPKG_MAINTSCRIPT_PACKAGE" ] || \ + error "environment variable DPKG_MAINTSCRIPT_PACKAGE is required" [ "${OLDCONFFILE}" != "${OLDCONFFILE#/}" ] || \ error "old-conffile '$OLDCONFFILE' is not an absolute path" [ "${NEWCONFFILE}" != "${NEWCONFFILE#/}" ] || \ @@ -262,6 +266,8 @@ symlink_to_dir() { [ -n "$DPKG_MAINTSCRIPT_NAME" ] || \ error "environment variable DPKG_MAINTSCRIPT_NAME is required" + [ -n "$DPKG_MAINTSCRIPT_PACKAGE" ] || \ + error "environment variable DPKG_MAINTSCRIPT_PACKAGE is required" [ -n "$PACKAGE" ] || error "cannot identify the package" [ -n "$SYMLINK" ] || error "symlink parameter is missing" [ "${SYMLINK#/}" = "$SYMLINK" ] && \ @@ -340,6 +346,8 @@ dir_to_symlink() { [ -n "$DPKG_MAINTSCRIPT_NAME" ] || \ error "environment variable DPKG_MAINTSCRIPT_NAME is required" + [ -n "$DPKG_MAINTSCRIPT_PACKAGE" ] || \ + error "environment variable DPKG_MAINTSCRIPT_PACKAGE is required" [ -n "$PACKAGE" ] || error "cannot identify the package" [ -n "$PATHNAME" ] || error "directory parameter is missing" [ "${PATHNAME#/}" = "$PATHNAME" ] && \ -- Dpkg.Org's dpkg