if dpkg --compare-versions "$2" lt-nl 3.4ubuntu3 \
As you may have noted, I had to rename "debian/postinst" to "debian/postinst.in" in order to be able to add the base URL from debian/rules during package build time. One could just repeat the URL in debian/postinst, which I found too error-prone. The following line in debian/rules generates postinst from postinst.in:
Okay, as this is a real showstopper here, I've just forked the package locally and applied the following changes to fix the issue:
First, I added a little snippet to postinst in order to pull in the override URL from debconf:
diff -u msttcorefonts- 3.4ubuntu3/ debian/ postinst msttcorefonts- hotfix/ debian/ postinst. in 3.4ubuntu3/ debian/ postinst 2012-04-07 22:49:32.000000000 +0200 hotfix/ debian/ postinst. in 2012-08-24 14:49:45.000000000 +0200
--- msttcorefonts-
+++ msttcorefonts-
@@ -6,10 +6,21 @@
db_get msttcorefonts/dldir
LOCALCOPY=$RET
-# FIXME: we don't have a way to use an alternate download source here.
+URLROOT=#URLROOT#
db_get msttcorefonts/dlurl
URLOVERRIDE=$RET
+if test -n "$URLOVERRIDE"; then /usr/share/ package- data-downloads/ ttf-mscorefonts -installer $REPLACE/ " <$DLFILE >$DLFILE.new \ /]+.exe) /Url: $REPLACE\1/\" <$DLFILE >$DLFILE.new" ttf-mscorefonts -installer. dlfile file=/var/ lib/update- notifier/ package- data-downloads/ ttf-mscorefonts -installer
+ DLFILE=
+ echo "substituting $URLOVERRIDE for corefonts download URL..."
+ SEARCH=$(echo "$URLROOT"|sed -e 's/\//\\\//g')
+ REPLACE=$(echo "$URLOVERRIDE"|sed -e 's/\//\\\//g')
+ sed -e "s/$SEARCH/
+ && mv $DLFILE.new $DLFILE
+ echo "dlurl sed -e \"s/^Url: .*(\/[^
+ cp $DLFILE /usr/local/
+fi
+
stamp_
if dpkg --compare-versions "$2" lt-nl 3.4ubuntu3 \
As you may have noted, I had to rename "debian/postinst" to "debian/ postinst. in" in order to be able to add the base URL from debian/rules during package build time. One could just repeat the URL in debian/postinst, which I found too error-prone. The following line in debian/rules generates postinst from postinst.in:
diff -u msttcorefonts- 3.4ubuntu3/ debian/ rules msttcorefonts- hotfix/ debian/ rules 3.4ubuntu3/ debian/ rules 2012-04-09 07:05:54.000000000 +0200 hotfix/ debian/ rules 2012-08-24 15:36:18.000000000 +0200
--- msttcorefonts-
+++ msttcorefonts-
@@ -6,6 +6,7 @@
dh $@
override_ dh_auto_ install: /'$$(echo $(URLROOT)|sed -e 's/\//\\\//g')'/' <debian/postinst.in >debian/postinst tmp/usr/ share/package- data-downloads
echo "Url: $(URLROOT)$$file"; \
+ sed -e 's/#URLROOT#
mkdir -p debian/
while read sum file; do \
Hope that somebody picks this up soon...