[SCM] Debian package checker branch, master, updated. 2.2.0-40-gd8f9e52
The following commit has been merged in the master branch:
commit 26b71b7c852fbc09d29b80abaf9410c5226f106e
Author: Russ Allbery <rra@debian.org>
Date: Sat Jan 31 16:58:40 2009 -0800
Further fixes to private/refresh-fonts-data
Honor the contents file as a second argument. Don't cd into the working
directory and instead qualify paths. Fix some problems I introduced in
the regex used to process the contents file and really handle the case
of multiple packages. Atomically replace the data file with the new
version rather than overwriting it.
diff --git a/data/files/fonts b/data/files/fonts
index 2995417..3029938 100644
--- a/data/files/fonts
+++ b/data/files/fonts
@@ -2,7 +2,7 @@
# package that contains the font. Only packages starting with ttf- or
# otf- are searched for fonts.
#
-# Last updated: 2009-01-31
+# Last updated: 2009-02-01
1015sn.ttf ttf-aenigma
1015snr.ttf ttf-aenigma
@@ -656,10 +656,10 @@ kinnari.otf otf-thai-tlwg
kinnari.ttf ttf-thai-tlwg
kirbyss.ttf ttf-aenigma
knot.ttf ttf-aenigma
-kochi-gothic-subst.ttf ttf-kochi-gothic,non-free/x11/ttf-kochi-gothic-naga10
-kochi-gothic.ttf ttf-kochi-gothic,non-free/x11/ttf-kochi-gothic-naga10
-kochi-mincho-subst.ttf ttf-kochi-mincho,non-free/x11/ttf-kochi-mincho-naga10
-kochi-mincho.ttf ttf-kochi-mincho,non-free/x11/ttf-kochi-mincho-naga10
+kochi-gothic-subst.ttf ttf-kochi-gothic
+kochi-gothic.ttf ttf-kochi-gothic
+kochi-mincho-subst.ttf ttf-kochi-mincho
+kochi-mincho.ttf ttf-kochi-mincho
konatu.ttf ttf-konatu
konatutohaba.ttf ttf-konatu
konecto1.ttf ttf-aenigma
diff --git a/private/refresh-fonts-data b/private/refresh-fonts-data
index c61810a..64ef307 100755
--- a/private/refresh-fonts-data
+++ b/private/refresh-fonts-data
@@ -43,7 +43,7 @@ INFO
fi
readonly lintian_data="$(readlink -f "$1")"
-readonly contents="$(readlink -f "$2")"
+contents="$(readlink -f "$2")"
[ -d "$lintian_data" ] || {
printf "%s is not a directory, aborting" "$lintian_data" >&2
@@ -60,11 +60,11 @@ mirror="${DEB_MIRROR:=http://i386-geomirror.debian.net/debian}"
WGET_ARGS="${WGET_ARGS:=-nv}"
wget() {
echo wget "$mirror"/"$1"
- /usr/bin/wget $WGET_ARGS "$mirror"/"$1"
+ /usr/bin/wget $WGET_ARGS -O "$workdir/$(basename "$1")" "$mirror"/"$1"
}
mkdir -p "$lintian_data/files"
-cat > "$lintian_data/files/fonts" <<EOF
+cat > "$workdir/fonts" <<EOF
# The list of known font filenames already packaged for Debian and the
# package that contains the font. Only packages starting with ttf- or
# otf- are searched for fonts.
@@ -73,8 +73,11 @@ cat > "$lintian_data/files/fonts" <<EOF
EOF
-cd "$workdir"
-wget dists/sid/Contents-i386.gz
-zcat Contents-i386.gz \
- | perl -n -w -E 'print lc $_ if (s,^.+/([\w-]+\.(?:[to]tf|pfb|pcf))\s+\w+/([to]tf-[^,]+(,.+)?)$,$1 $2,i);' \
- | sort >> "$lintian_data/files/fonts"
+if [ -z "$contents" ] ; then
+ wget dists/sid/Contents-i386.gz
+ contents="$workdir/Contents-i386.gz"
+fi
+zcat "$contents" \
+ | perl -n -w -E 'print lc $_ if (s%^.+/([\w-]+\.(?:[to]tf|pfb|pcf))\s+\w+/([to]tf-[^,]+)(,.+)?$%$1 $2%i);' \
+ | sort >> "$workdir/fonts"
+mv "$workdir/fonts" "$lintian_data/files/fonts"
--
Debian package checker
Reply to: