packages: pear-autoup.sh - use pear list-upgrades info which prefers packag...
glen
glen at pld-linux.org
Fri Aug 20 14:43:58 CEST 2010
Author: glen Date: Fri Aug 20 12:43:58 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- use pear list-upgrades info which prefers package preferred state
---- Files affected:
packages:
pear-autoup.sh (1.3 -> 1.4)
---- Diffs:
================================================================
Index: packages/pear-autoup.sh
diff -u packages/pear-autoup.sh:1.3 packages/pear-autoup.sh:1.4
--- packages/pear-autoup.sh:1.3 Thu Aug 19 20:08:30 2010
+++ packages/pear-autoup.sh Fri Aug 20 14:43:53 2010
@@ -9,16 +9,32 @@
[ -f pear.ls ] || poldek -q --skip-installed --cmd 'ls php-pear-* | desc'
[ -f pear.pkgs ] || awk '/^Source.package:/{print $3}' < pear.ls | sort -u | sed -re 's,-[^-]+-[^-]+.src.rpm$,,' > pear.pkgs
+[ -f pear.installed ] || { sudo poldek --update --upa; sed -e 's,^,install ,' pear.pkgs | sudo poldek; touch pear.installed; }
+[ -f pear.upgrades ] || pear list-upgrades > pear.upgrades
# filter out tests, see https://bugs.launchpad.net/poldek/+bug/620362
sed -i -e '/-tests/d' pear.pkgs
# more packages affected
sed -i -e '/php-pear-Auth_Container_ADOdb/d' pear.pkgs
sed -i -e '/php-pear-DB_DataObject-cli/d' pear.pkgs
+# not pear pkg
+sed -i -e '/^php-pear$/d' pear.pkgs
+
+# test that php is working
+php -r 'echo "ok\n";'
for pkg in $(cat pear.pkgs); do
+ # check if there's update in channel
+ pearpkg=${pkg#php-pear-}
+ ver=$(awk -vpkg=$pearpkg '$2 == pkg {print $5}' pear.upgrades)
+ [ "$ver" ] || continue
+
+ # skip already processed packages
[ -d $pkg ] && continue
- ./builder -bb -u $pkg --define "_unpackaged_files_terminate_build 1" || {
+
+ # try upgrading with specified version
+ # pldnotify.awk uses "pear remote-info" which does not respect preferred package states
+ ./builder -bb -u $pkg --upgrade-version $ver --define "_unpackaged_files_terminate_build 1" || {
cat >&2 <<-EOF
$pkg failed
@@ -28,7 +44,7 @@
}
# check for bad versions (which needs macros
- ver=$(awk '/^Version:/{print $2; exit}' $pkg/$pkg.spec);
+ ver=$(awk '/^Version:/{print $2; exit}' $pkg/$pkg.spec)
case "$ver" in
*RC* | *a* | *b* | *alpha* | *beta* | *dev*)
cat >&2 <<-EOF
@@ -40,5 +56,4 @@
exit 1
;;
esac
-
done
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/pear-autoup.sh?r1=1.3&r2=1.4&f=u
More information about the pld-cvs-commit
mailing list