Your message dated Wed, 7 Oct 2026 14:38:05 +0200
with message-id <[email protected]>
and subject line Re: openstack-pkg-tools: make pkgos_postrm generate
/usr/share/cruft/rules/ snippets ?
has caused the Debian Bug report #1136813,
regarding openstack-pkg-tools: make pkgos_postrm generate
/usr/share/cruft/rules/ snippets ?
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1136813: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1136813
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: openstack-pkg-tools
Version: 143
Severity: wishlist
Hi,
This is severity wishlist, just close it if you don't like it.
It seems that your pkgos_postrm and mine dh_cruft are
doing mostly much of the same thing: generating .postrm snippets
with extra team-specific heuristics.
dh-cruft is use for all the games of the Games Team who need it.
pkgos_postrm the same for OpenStack.
I'm not asking you to make all your packages rely on some other guy debhelper
script.
What I'm asking is wether you would consider generating the
/usr/share/cruft/rules/<package> files that register the dynamic files
unknown to dpkg ? These are needed by the cruft-ng analysis tool.
This is what the original proposal call "extrafiles":
https://lists.debian.org/debian-policy/1998/04/msg00089.html
I'm finally aiming for a version 1.00 of cruft-ng analysis software.
Fixing all the packages of OpenStack at once with little effort would be
awesome.
So each /usr/share/cruft/rules/${PKPRM_TEMPLATE_PREFIX} would contains:
/var/lib/${PKPRM_TEMPLATE_PREFIX}/
/var/log/${PKPRM_TEMPLATE_PREFIX}/
/var/lock is on a tmpfs an as such out of scope.
Greetings
Alexandre
------
https://sources.debian.org/src/cruft-ng/0.9.84/dh-cruft/dh_cruft
if ($var_games) {
push @purgelines, " if test -d
\${DPKG_ROOT:-}/var/games/";
push @purgelines, " then";
push @purgelines, " rmdir
--ignore-fail-on-non-empty \${DPKG_ROOT:-}/var/games/";
push @purgelines, " fi";
}
autoscript($package, "postrm", "postrm-cruft", { 'PURGE' =>
join("\n", @purgelines)});
-------------
$ cat pkgos_postrm
#!/bin/sh
# -*- mode: shell-script -*-
# Perform cleanups when removing a package
# Prototype: pkgos_postrm <template-prefix-name> <package-name> $@
# Example: pkgos_postrm neutron neutron-common $@
pkgos_dbc_postrm () {
local PKPRM_TEMPLATE_PREFIX PKPRM_PACKAGE_NAME
PKPRM_TEMPLATE_PREFIX=${1}
PKPRM_PACKAGE_NAME=${2}
shift
shift
if [ -f /usr/share/debconf/confmodule ] ; then
. /usr/share/debconf/confmodule
# If the package has the template, then it means we're having a
db,
# and therefore we can call the dbconfig-common clean function.
db_get ${PKPRM_TEMPLATE_PREFIX}/configure_db
if [ "$RET" = "true" ] ; then
if [ -f /usr/share/dbconfig-common/dpkg/postrm ] ; then
. /usr/share/dbconfig-common/dpkg/postrm
dbc_go ${PKPRM_PACKAGE_NAME} $@
else
rm -f
/etc/dbconfig-common/${PKPRM_PACKAGE_NAME}.conf
if which ucf >/dev/null 2>&1; then
ucf --purge
/etc/dbconfig-common/${PKPRM_PACKAGE_NAME}.conf
ucfr --purge ${PKPRM_PACKAGE_NAME}
/etc/dbconfig-common/${PKPRM_PACKAGE_NAME}.conf
fi
fi
fi
fi
rm -rf /var/lib/${PKPRM_TEMPLATE_PREFIX}
/var/log/${PKPRM_TEMPLATE_PREFIX} /var/lock/${PKPRM_TEMPLATE_PREFIX}
}
--- End Message ---
--- Begin Message ---
Hi Alexandre,
As much as I understand from:
"my original idea won't work."
there's nothing actionable in this bug. If I am mistaking, let me know,
and reopen this bug, then we'll see what to do.
Cheers,
Thomas Goirand (zigo)
--- End Message ---