aboutsummaryrefslogtreecommitdiff
path: root/config.dot/pbuilder/hooks/E01apt-preferences.link
diff options
context:
space:
mode:
Diffstat (limited to 'config.dot/pbuilder/hooks/E01apt-preferences.link')
-rwxr-xr-xconfig.dot/pbuilder/hooks/E01apt-preferences.link17
1 files changed, 17 insertions, 0 deletions
diff --git a/config.dot/pbuilder/hooks/E01apt-preferences.link b/config.dot/pbuilder/hooks/E01apt-preferences.link
new file mode 100755
index 0000000..ec0887f
--- /dev/null
+++ b/config.dot/pbuilder/hooks/E01apt-preferences.link
@@ -0,0 +1,17 @@
+#!/bin/sh
+# See https://wiki.ubuntu.com/PbuilderHowto#Using_backport_repositories_in_pbuilder
+set -e
+
+WHEEZY_VERSION_REGEX='^7\.[0-9]\+$'
+
+if $(cat "/etc/debian_version" | grep -q -e "$WHEEZY_VERSION_REGEX"); then
+cat > "/etc/apt/preferences" << EOF
+Package: debhelper
+Pin: release a=wheezy-backports
+Pin-Priority: 999
+
+Package: lintian
+Pin: release a=wheezy-backports
+Pin-Priority: 999
+EOF
+fi