]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- tool to help updating pear packages
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 19 Aug 2010 14:22:53 +0000 (14:22 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    pear-autoup.sh -> 1.1

pear-autoup.sh [new file with mode: 0644]

diff --git a/pear-autoup.sh b/pear-autoup.sh
new file mode 100644 (file)
index 0000000..3d2b9f9
--- /dev/null
@@ -0,0 +1,44 @@
+#!/bin/sh
+# Try to update pear packages from current distro repos to latest in
+# pear.php.net.
+#
+# $Id$
+# Author: Elan Ruusamäe <glen@pld-linux.org>
+
+set -e
+
+[ -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
+
+# 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
+
+for pkg in $(cat pear.pkgs); do
+       [ -d $pkg ] && continue
+       ./builder -bb -u $pkg || {
+               cat >&2 <<-EOF
+
+               $pkg failed
+
+               EOF
+               exit 1
+       }
+
+       # check for bad versions (which needs macros
+       ver=$(awk '/^Version:/{print $2; exit}' $pkg/$pkg.spec);
+       case "$ver" in
+       *RC* | *a* | *b* | *alpha* | *beta*)
+               cat >&2 <<-EOF
+
+               Package $pkg contains bad version: $ver
+               Update it to use %subver macro instead.
+
+               EOF
+               exit 1
+               ;;
+       esac
+
+done
This page took 0.040322 seconds and 4 git commands to generate.