Package: pciutils
Version: 1:3.15.0-1
Severity: normal

Hi Guillem,

I've finally push forward the old idea to have volatile files
registered in each individual package instead of having
a huge heuristic database in cruft-ng.

Here's your tiny slice of the cake :-)

I also give you a glimpse of the templated result:


    $ cat debian/pciutils/DEBIAN/postrm
    #!/bin/sh
    set -e
    # Automatically added by dh_cruft/0.9.80
    if [ "$1" = "purge" ]
    then
        # we need to glob, so no quotes
        rm -rf ${DPKG_ROOT:-}/usr/share/misc/pci.ids.new
        rm -rf ${DPKG_ROOT:-}/usr/share/misc/pci.ids.neww
        rm -rf ${DPKG_ROOT:-}/usr/share/misc/pci.ids.old
    fi
    # End automatically added section


Any help on how to improve dh-cruft is welcome.

I guess these tiny files would be swallowed by debputy later,
today's work make this day's work easier/automated.


Greetings

Alexandre





patch:

--- /dev/null
+++ b/debian/pciutils.purge
@@ -0,0 +1,3 @@
+/usr/share/misc/pci.ids.new
+/usr/share/misc/pci.ids.neww
+/usr/share/misc/pci.ids.old
--- a/debian/control
+++ b/debian/control
@@ -3,6 +3,7 @@ Section: admin
 Maintainer: Guillem Jover <[email protected]>
 Build-Depends:
  debhelper-compat (= 13),
+ dh-sequence-cruft,
  pci.ids (>= 0.0~2019.11.10-2) <!noudeb>,
  pkgconf,
  libkmod-dev [linux-any],
--- a/debian/pciutils.postrm
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-# postrm script for pciutils
-
-set -e
-
-case "$1" in
-purge)
-  for ext in new neww old
-  do
-    rm -f $DPKG_ROOT/usr/share/misc/pci.ids.$ext
-  done
-  ;;
-remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
-  ;;
-*)
-  echo "postrm called with unknown argument '$1'" >&2
-  exit 1
-  ;;
-esac
-
-#DEBHELPER#
-
-exit 0

Reply via email to