Package: sks
Version: 1.1.3-1
Severity: minor
Tags: patch
User: [email protected]
Usertags: origin-ubuntu quantal ubuntu-patch
In Ubuntu, the attached patch was applied to achieve the following:
* Provide OLD_BDB versions for Ubuntu (LP: #1020034)
* Create /var/lib/sks/berkeley_db.active even when we aren't upgrading BDB
versions.
Because Ubuntu has already been on 5.1 for a while, I opted to
/var/lib/sks/berkeley_db.active if it doesn't exist and we didn't
upgrade the DB. Otherwise it'd only be created when we upgrade to
5.2/whatever comes next.
Thanks for considering the patch.
SR
diff -Nru sks-1.1.3/debian/changelog sks-1.1.3/debian/changelog
diff -Nru sks-1.1.3/debian/sks.postinst sks-1.1.3/debian/sks.postinst
--- sks-1.1.3/debian/sks.postinst 2012-06-20 10:41:30.000000000 +0200
+++ sks-1.1.3/debian/sks.postinst 2012-07-02 13:19:39.000000000 +0200
@@ -73,12 +73,20 @@
if [ -r /var/lib/sks/berkeley_db.active ]; then
OLD_BDB=$(cat /var/lib/sks/berkeley_db.active)
else
- if dpkg --compare-versions "$2" lt "1.1.1+dpkgv3-1"; then
- OLD_BDB=4.6
- elif dpkg --compare-versions "$2" lt "1.1.1+dpkgv3-6.1"; then
- OLD_BDB=4.7
- else
- OLD_BDB=4.7
+ if dpkg-vendor --derives-from Ubuntu; then
+ if dpkg --compare-versions "$2" lt "1.1.1+dpkgv3-6.1"; then
+ OLD_BDB=4.7
+ else
+ OLD_BDB=5.1
+ fi
+ else # Debian
+ if dpkg --compare-versions "$2" lt "1.1.1+dpkgv3-1"; then
+ OLD_BDB=4.6
+ elif dpkg --compare-versions "$2" lt "1.1.1+dpkgv3-6.1"; then
+ OLD_BDB=4.7
+ else
+ OLD_BDB=4.7
+ fi
fi
fi
@@ -136,6 +144,8 @@
# Note the active Berkeley DB version
cp -f /usr/lib/sks/berkeley_db.txt /var/lib/sks/berkeley_db.active
+ elif [ ! -e /var/lib/sks/berkeley_db.active ]; then
+ cp -f /usr/lib/sks/berkeley_db.txt /var/lib/sks/berkeley_db.active
fi
fi
fi