Hi Mario:
On Sun, 12 Jun 2011, Mario 'BitKoenig' Holbe wrote:
Package: tgif
Version: 1:4.2.3-1
upgrading or re-installing the tgif package constantly grows
/etc/default/tgif by always adding another "debconf block".
Yes, I see that now. One thing I had not tested...
In the postinst it seems like you are trying to avoid this with the sed
statement but you would probably like to use `sed -i' instead.
Probably you are correct
I'm just curious: why do you prefer an (obviously :)) error-prone
self-made legacy hack over ucf?
Something like
tempfile=$(mktemp -p /tmp tgif.XXXXXXXX)
cat >$tempfile <<-EOT
!
Tgif*InitialPaperSize: $paper
Tgif*GridSystem: $gridunits
!
EOT
ucf --debconf-ok $tempfile /etc/default/tgif
ucfr tgif /etc/default/tgif
rm -f $tempfile
in the postinst configure section, and
rm -f /etc/default/tgif
if which ucf >/dev/null; then
ucf --purge /etc/default/tgif
fi
if which ucfr >/dev/null; then
ucfr --purge tgif /etc/default/tgif
fi
in the postrm purge section should do the trick (both untested!) and
you get all the additional comfort ucf offers about dealing with
user-modified conf-files for free.
Because I was ignorant of ucf... Thanks for the tip. I will work on this
for the next release.
Carlo
--
Carlo U. Segre -- Professor of Physics
Associate Dean for Graduate Admissions, Graduate College
Illinois Institute of Technology
Voice: 312.567.3498 Fax: 312.567.3494
[email protected] http://phys.iit.edu/~segre [email protected]
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]