POSTIN
/bin/sh
[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c /usr/share/info >/dev/null 2>&1
POSTUN
/bin/sh
[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c /usr/share/info >/dev/null 2>&1
Triggers
poldek <=
0.18.3-5
/bin/sh
if [ -f /etc/poldek.conf ]; then
sed -i -e '/^promoteepoch:.*yes/s/^/#/' /etc/poldek.conf
fi
# otherwise don't touch
poldek <=
0.18.7-1
/bin/sh
if [ -f /etc/poldek.conf ]; then
sed -i -e 's://ftp.pld-linux.org://ftp.ac.pld-linux.org:g' /etc/poldek.conf
fi
poldek <
0.19.0-1.20050613.22.0
/bin/sh
if [ -f /etc/poldek.conf.rpmsave ]; then
awk '/^source/ {
name = $3;
path = $4;
auto = "yes";
autoup = "yes";
type = "pdir";
pri = "";
if (sub(",noauto", "", name)) {
auto = "no";
}
# process pri=\d+
if (match(name, /,pri=[0-9]+/)) {
pri = substr(name, RSTART + 5, RLENGTH - 5);
name = substr(name, 1, RSTART - 1) substr(name, RSTART + RLENGTH);
}
# skip ac sources. already in new config.
if (name !~ /^ac(-(ready|test|supported|updates-(general|security)))?$/) {
print "";
print "[source]";
print "name = " name;
print "type = " type;
print "path = " path;
print "auto = " auto;
print "autoup = " autoup;
if (pri) {
print "pri = " pri;
}
}
}' < /etc/poldek.conf.rpmsave >> /etc/poldek/source.conf
echo "Converted old custom sources from /etc/poldek.conf.rpmsave to new poldek format in /etc/poldek/source.conf"
# copy hold=
hold=$(grep ^hold /etc/poldek.conf.rpmsave)
if [ "$hold" ]; then
sed -i -e "/^#hold =/s/^.*/$hold/" /etc/poldek/poldek.conf
fi
fi