]> git.pld-linux.org Git - packages/rpm-build-tools.git/blobdiff - pear-autoup.sh
- more pkgs check early
[packages/rpm-build-tools.git] / pear-autoup.sh
index fa185307acf7fab1d3054f4d369f5b8a1dd5ec0d..659c3834968cae2b87acf15704dd9fe8c059ac7d 100644 (file)
@@ -7,9 +7,23 @@
 
 set -e
 
-[ -s pear.ls ] || poldek -q --skip-installed --cmd 'ls php-pear-* | desc' > pear.ls
+# test that php is working
+php -r 'echo "PHP is working OK\n";'
+
+# test that pear is working
+pear info PEAR >/dev/null
+
+# needed pkgs for upgrade test
+rpm -q php-packagexml2cl
+
+[ -s pear.ls ] || { poldek --upa; poldek -q -Q --skip-installed --cmd 'ls php-pear-*' > pear.ls; }
+[ -s pear.desc ] || {
+       for pkg in $(cat pear.ls); do
+               poldek -q --skip-installed --cmd "desc $pkg"
+       done
+} > pear.desc
 [ -s pear.pkgs ] || {
-       awk '/^Source.package:/{print $3}' < pear.ls | sort -u | sed -re 's,-[^-]+-[^-]+.src.rpm$,,' > pear.pkgs
+       awk '/^Source.package:/{print $3}' < pear.desc | sed -re 's,-[^-]+-[^-]+.src.rpm$,,' | sort -u > pear.pkgs
 
        # filter out tests, see https://bugs.launchpad.net/poldek/+bug/620362
        sed -i -e '/-tests/d' pear.pkgs
@@ -20,12 +34,13 @@ set -e
        sed -i -e '/^php-pear$/d' pear.pkgs
 }
 
-[ -f pear.installed ] || { sudo poldek  --update --upa; sed -e 's,^,install ,' pear.pkgs | sudo poldek; touch pear.installed; }
+[ -f pear.installed ] || {
+       sudo poldek  --update --upa
+       sed -e 's,^,install ,' pear.pkgs | sudo poldek
+       touch pear.installed
+}
 [ -s pear.upgrades ] || pear list-upgrades > pear.upgrades
 
-# test that php is working
-php -r 'echo "PHP is working OK\n";'
-
 for pkg in $(cat pear.pkgs); do
        # check if there's update in channel
        pearpkg=${pkg#php-pear-}
This page took 0.053969 seconds and 4 git commands to generate.