]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- search pear packages using php-pear dep to match other "pear" channels too
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 27 Feb 2011 12:47:16 +0000 (12:47 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    pear-autoup.sh -> 1.15

pear-autoup.sh

index bffb0ab0bcc6fabc832fcdfc1a1da557c508359a..ab64c258358d281665ce951b551df01857d3b100 100644 (file)
@@ -16,7 +16,7 @@ pear info PEAR >/dev/null
 # needed pkgs for upgrade test
 rpm -q php-packagexml2cl php-pear-PEAR_Command_Packaging
 
-[ -s pear.desc ] || { poldek --upa; poldek -q -Q --skip-installed --cmd 'desc php-pear-*' > pear.desc; }
+[ -s pear.desc ] || { poldek --upa; poldek -q -Q --skip-installed --cmd 'search -r php-pear | desc' > pear.desc; }
 [ -s pear.pkgs ] || {
        awk '/^Source.package:/{print $3}' < pear.desc | sed -re 's,-[^-]+-[^-]+.src.rpm$,,' | sort -u > pear.pkgs
 
@@ -42,9 +42,12 @@ rpm -q php-packagexml2cl php-pear-PEAR_Command_Packaging
 }
 [ -s pear.upgrades ] || pear list-upgrades > pear.upgrades
 
+subst=$(pear list-channels | awk -vORS="|" '/^[a-z]/{print $2}')
+subst="s/^php-(${subst%\|})-//"
+
 for pkg in $(cat pear.pkgs); do
        # check if there's update in channel
-       pearpkg=${pkg#php-pear-}
+       pearpkg=$(echo "$pkg" | sed -re "$subst")
        ver=$(awk -vpkg=$pearpkg '$2 == pkg {print $5}' pear.upgrades)
        [ "$ver" ] || continue
 
This page took 0.034535 seconds and 4 git commands to generate.