[Frugalware-darcs] pacman-tools: revdep-rebuild: new -t $tree and --other options

VMiklos vmiklos at frugalware.org
Mon Jun 4 12:17:54 CEST 2007


Darcsweb-Url: http://darcs.frugalware.org/darcsweb/darcsweb.cgi?r=pacman-tools;a=darcs_commitdiff;h=20070604101709-e2957-3b9d281e6be12ec8e200349f70c9bc17ebe99a99.gz;

[revdep-rebuild: new -t $tree and --other options
VMiklos <vmiklos at frugalware.org>**20070604101709] {
hunk ./revdep-rebuild 4
+[ -e /etc/repoman.conf ] && . /etc/repoman.conf
+[ -e ~/.repoman.conf ] && . ~/.repoman.conf
hunk ./revdep-rebuild 9
-    [ -e /etc/repoman.conf ] && . /etc/repoman.conf;
-    [ -e ~/.repoman.conf ] && . ~/.repoman.conf;
-    echo $fst_root/$repos
+    echo $fst_root/$tree
hunk ./revdep-rebuild 23
+shift
hunk ./revdep-rebuild 25
-[ -z "$id" ] && die "usage: $0 <package id>"
+[ -z "$id" ] && die "usage: $0 <package id> [-t tree] [--other]"
+
+tree=$repos
+if [ "$1" == "-t" ]; then
+	tree=$2
+	shift 2
+fi
+
+method="Exact"
+if [ "$1" == "--other" ]; then
+	method="Other"
+	shift 2
+fi
hunk ./revdep-rebuild 41
-revdeps=$(lynx -source -dump http://frugalware.org/packages/$id|grep "Exact reverse depends:"|sed 's|<a href="[^"]*">\([^<]*\)</a>|\1|g;s|.*<td>\(.*\)</td>.*|\1|')
+revdeps=$(lynx -source -dump http://frugalware.org/packages/$id|grep "$method reverse depends:"|sed 's|<a href="[^"]*">\([^<]*\)</a>|\1|g;s|.*<td>\(.*\)</td>.*|\1|')
hunk ./revdep-rebuild 44
-echo "Rebuilding $count packages for $pkg-$ver"
+echo "Rebuilding $count packages in -$tree for $pkg-$ver"
hunk ./revdep-rebuild 54
-	bumppkg --rebuild "rebuilt with $pkg-$ver" --push || echo $i >>$log
+	bumppkg -t $tree --rebuild "rebuilt with $pkg-$ver" --push || echo $i >>$log
}


More information about the Frugalware-darcs mailing list