projects
/
grml-etc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
699350f
)
debian/preinst: fix maintainer-script-uses-dpkg-status-directly
1.0.11
author
Michael Prokop
<mika@grml.org>
Wed, 4 Jul 2007 10:32:36 +0000
(12:32 +0200)
committer
Michael Prokop
<mika@grml.org>
Wed, 4 Jul 2007 10:32:36 +0000
(12:32 +0200)
debian/changelog
patch
|
blob
|
history
debian/preinst
patch
|
blob
|
history
diff --git
a/debian/changelog
b/debian/changelog
index
5a5a95a
..
fd48ce0
100644
(file)
--- a/
debian/changelog
+++ b/
debian/changelog
@@
-2,6
+2,10
@@
grml-etc (1.0.11) unstable; urgency=low
* /etc/init.d/grml-reboot: cosmetic fix (drop an empty line of
output which seems unnecessary nowadays)
* /etc/init.d/grml-reboot: cosmetic fix (drop an empty line of
output which seems unnecessary nowadays)
+ * debian/preinst: change /var/lib/dpkg/status code to the usual
+ dpkg-query solution (as http://wiki.debian.org/DpkgConffileHandling
+ suggests) to make lintian happy
+ (hello maintainer-script-uses-dpkg-status-directly).
-- Michael Prokop <mika@grml.org> Sun, 01 Jul 2007 20:21:45 +0200
-- Michael Prokop <mika@grml.org> Sun, 01 Jul 2007 20:21:45 +0200
diff --git
a/debian/preinst
b/debian/preinst
index
615ed55
..
da3ff00
100755
(executable)
--- a/
debian/preinst
+++ b/
debian/preinst
@@
-4,7
+4,7
@@
# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2.
# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2.
-# Latest change:
Don Nov 02 20:58:57 CET 2006
[mika]
+# Latest change:
Mit Jul 04 12:31:26 CEST 2007
[mika]
################################################################################
set -e
################################################################################
set -e
@@
-28,9
+28,10
@@
rm_conffile() {
if [ -e "$CONFFILE" ]; then
md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`"
if [ -e "$CONFFILE" ]; then
md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`"
-
old_md5sum="`sed -n -e \"/^Conffiles:/,/^[^ ]/{\\\\' $CONFFILE'{s/.* //;p}}\" /var/lib/dpkg/status
`"
+
old_md5sum="`dpkg-query -W -f='${Conffiles}' grml-etc | sed -n -e \"\\\\' $CONFFILE'{s/ obsolete$//;s/.* //p}\"
`"
if [ "$md5sum" != "$old_md5sum" ]; then
if [ "$md5sum" != "$old_md5sum" ]; then
- echo "Conffile $CONFFILE has been modified, temporary moving to $CONFFILE.dpkg-bak ..."
+ echo "Obsolete conffile $CONFFILE has been modified by you."
+ echo "Saving as $CONFFILE.dpkg-bak ..."
mv -f "$CONFFILE" "$CONFFILE".dpkg-bak
fi
fi
mv -f "$CONFFILE" "$CONFFILE".dpkg-bak
fi
fi