offload resolution to debiman
since debiman issue #79 has been resolved, it can now fallback
correctly from the fully specified URL we have:
https://github.com/Debian/debiman/issues/79
we remove the lookup loop completely because it is now unnecessary:
the first hit works with the new manpages.debian.org changes.
this change is not absolutely necessary: the first hit will work if
the manpage exists. it's in the degenerate case where a non-existing
manpage or a typo is requested that is optimized here.
Antoine Beaupré
6 years ago
|
0 |
debian-goodies (0.74) UNRELEASED; urgency=medium
|
|
1 |
|
|
2 |
* dman: Offload suite and locale resolution to debiman. This optimizes the
|
|
3 |
case where there is a typo or no actual manpage, as we only do one hit
|
|
4 |
on the webserver.
|
|
5 |
|
|
6 |
-- Antoine Beaupré <anarcat@debian.org> Wed, 07 Jun 2017 16:14:49 -0400
|
|
7 |
|
0 | 8 |
debian-goodies (0.73) experimental; urgency=low
|
1 | 9 |
|
2 | 10 |
* Fix syntax error in check-enhancements when querying a package which
|
65 | 65 |
mandir=`mktemp --tmpdir="${TMPDIR:-/tmp}" -d dman.XXXXXX`
|
66 | 66 |
trap "rm -rf $mandir" EXIT HUP INT QUIT TERM
|
67 | 67 |
man="$mandir/$PAGE"
|
68 | |
# be careful not to add too many entries in this loop, as each hit can
|
69 | |
# take some time for the rountrip
|
70 | |
for URL in "$BASE_URL/$DISTRIB_CODENAME/$PAGE$LOCDOT.gz" \
|
71 | |
"$BASE_URL/$DISTRIB_CODENAME/$PAGE.gz" \
|
72 | |
"$BASE_URL/$PAGE$LOCDOT.gz" \
|
73 | |
"$BASE_URL/$PAGE.gz" \
|
74 | |
|
75 | |
do
|
76 | |
if wget -O "$man" "$URL" 2>/dev/null; then
|
77 | |
man $MAN_ARGS -l "$man" || true
|
78 | |
exit 0
|
79 | |
else
|
80 | |
echo "$0: not found: $URL" 1>&1
|
81 | |
fi
|
82 | |
done
|
83 | |
|
84 | |
echo "$0: Could not fetch manpage from given locations." 1>&2
|
85 | |
exit 1
|
|
68 |
if wget -O "$man" "$BASE_URL/$DISTRIB_CODENAME/$PAGE$LOCDOT.gz" 2>/dev/null; then
|
|
69 |
man $MAN_ARGS -l "$man" || true
|
|
70 |
exit 0
|
|
71 |
else
|
|
72 |
echo "$0: not found: $URL" 1>&1
|
|
73 |
exit 1
|
|
74 |
fi
|