37 lines
1.3 KiB
Diff
37 lines
1.3 KiB
Diff
diff -Nru autospec-1.4.7/lib/libapse.lib.in autospec-1.4.7.patched/lib/libapse.lib.in
|
|
--- autospec-1.4.7/lib/libapse.lib.in 2009-07-05 19:23:29.000000000 +0200
|
|
+++ autospec-1.4.7.patched/lib/libapse.lib.in 2009-07-12 14:16:29.000000000 +0200
|
|
@@ -319,19 +319,24 @@
|
|
|
|
local pcknameregexp=$(echo $pcknameverbatim | sed "\
|
|
s,%[{]*name[}]*,$specname,
|
|
- s,%[{]*version[}]*,[A-Za-z0-9._]*,
|
|
- s,%[{]*.*[}]*,[^[:space:]-]*,")
|
|
+ s,%[{]*version[}]*,\\\([A-Za-z0-9._]*\\\),
|
|
+ s,%[{]*.*[}]*,[A-Za-z0-9._]*,
|
|
+ s,\.gz$,.,
|
|
+ s,\.tgz$,.,
|
|
+ s,\.bz2$,.,
|
|
+ s,\.lzma$,.,")
|
|
|
|
if [ $? -eq 0 ]; then
|
|
- new_version=$(\
|
|
+
|
|
+ if [ "${pcknameregexp/(/}" = "${pcknameregexp}" ]; then
|
|
+ notify.warning "* "$"not parametric source0 name; cannot update"
|
|
+ else
|
|
+ new_version=$(\
|
|
grep -i "$pcknameregexp" $fcurlout | \
|
|
sed "\
|
|
-s,.*\($pcknameregexp\).*,\1,g
|
|
-s/\.[^0-9].*// # remove trailing stuff (.tar.gz, ...)
|
|
-s/.*-\([0-9]*.*\)/\1/ # <pck_name>-<pck_ver>
|
|
-s/.*_\([0-9]*.*\)/\1/ # <pck_name>_<pck_ver>
|
|
-s/[^0-9]*\([0-9]\..*\)/\1/g # <pck_name><pck_ver>" | \
|
|
+s,.*$pcknameregexp.*,\1,g" |
|
|
sort -t. -n -r -k1 -k2 -k3 -k4 -k5 -k6 -k7 -k8 -k9 -k10 | head -n1)
|
|
+ fi
|
|
fi
|
|
|
|
if [ "$new_version" ]; then
|