Package: libnss-docker Version: 0.02-1 Tags: patch Dear maintainer of libnss-docker,
the current postrm script of `libnss-docker` requires Perl. Maintscripts should not rely on the existence of Perl in future systems. The specific use of `perl` in this maintscript can be easily replaced with an equivalent `sed` invocation, as in the following patch (also available as a pull request at https://github.com/dex4er/deb-libnss-docker/pull/2 diff --git a/debian/libnss-docker.postrm b/debian/libnss-docker.postrm index 0cf8206..d0bdf43 100644 --- a/debian/libnss-docker.postrm +++ b/debian/libnss-docker.postrm @@ -16,14 +16,8 @@ remove_nss_entry() { log "Could not find /etc/nsswitch.conf." return fi - perl -i -pe ' - sub remove { - my $s = shift; - $s =~ s/\s+docker(\s+\[NOTFOUND=return\])?//g; - return $s; - } - s/^(hosts:)(.*)/$1.remove($2)/e; - ' /etc/nsswitch.conf + sed -E -i /etc/nsswitch.conf \ + -e 's/^(hosts:.*)(\s+docker(\s+\[NOTFOUND=return\])?)(.*)$/\1\4/g' } action="$1" -- Gioele Barabucci

