This is an upsync fast hack to solve parse problems with some upstream
tarballs like a2ps (a2ps_4.13b.orig.tar.gz), liferea
(liferea_0.9.7b.orig.tar.gz), xfce4-notes-plugin
(xfce4-notes-plugin_0.10.0.xfld.orig.tar.gz), etc...

$upsync --help
Usage: /usr/bin/upsync <wc> <pkg> [-e archive] [-u version] [-n] [-f]
[[-d] [-v]] [-b branch]
                     [-D distro] [-c codename] [-z upstream_tar]

With "-z" (zap) we've to suply the upstream tarball name:

upsync /export/home/pedro/repository a2ps -b lasarux -z
a2ps_4.13b.orig.tar.gz

Pedro


--- /usr/bin/upsync.original	2006-01-04 08:26:24.236497000 +0000
+++ /usr/bin/upsync	2006-01-04 08:28:23.197050000 +0000
@@ -11,6 +11,7 @@
 branch=gnusolaris1
 distro_default=ubuntu
 codename_default=breezy
+zap=ok
 # ===============================================
 
 fatal() {
@@ -31,7 +32,7 @@
 
 usage() {
 	echo "Usage: $0 <wc> <pkg> [-e archive] [-u version] [-n] [-f] [[-d] [-v]] [-b branch]"
-	echo "                     [-D distro] [-c codename]"
+	echo "                     [-D distro] [-c codename] [-z upstream_tar]"
 	exit 1
 }
 
@@ -99,22 +100,26 @@
 }
 
 parse_upstream_tar() {
-	local tok="$archivetok\."
-	local major
-	if echo $1 | egrep ".*[0-9]-.*" > /dev/null; then
-		major=`echo $1 | sed -e "s/\(.*[0-9]\)-.*/\1/"`
-	fi
-	if catinfo|grep "$tok.*$1\.orig\.tar\.gz\"\?>.*" >/dev/null; then
-		echo $pkg"_"$1".orig.tar.gz"
-	elif catinfo|grep "$tok.*$1\.tar\.gz\"\?>.*" >/dev/null; then
-		echo $pkg"_"$1".tar.gz"
-	elif catinfo|grep "$tok.*"$pkg"_"$major"\.tar\.gz\"\?>.*" >/dev/null; then
-		echo $pkg"_"$major".tar.gz"
-	elif catinfo|grep "$tok.*"$pkg"_"$major"\.orig\.tar\.gz\"\?>.*" >/dev/null; then
-		echo $pkg"_"$major".orig.tar.gz"
-	else
-		echo ""
-	fi
+       if test "x$zap" != xok; then
+               echo $zap
+        else
+               local tok="$archivetok\."
+               local major
+               if echo $1 | egrep ".*[0-9]-.*" > /dev/null; then
+                       major=`echo $1 | sed -e "s/\(.*[0-9]\)-.*/\1/"`
+               fi
+               if catinfo|grep "$tok.*$1\.orig\.tar\.gz\"\?>.*" >/dev/null; then
+                       echo $pkg"_"$1".orig.tar.gz"
+               elif catinfo|grep "$tok.*$1\.tar\.gz\"\?>.*" >/dev/null; then
+                       echo $pkg"_"$1".tar.gz"
+               elif catinfo|grep "$tok.*"$pkg"_"$major"\.tar\.gz\"\?>.*" >/dev/null; then
+                       echo $pkg"_"$major".tar.gz"
+               elif catinfo|grep "$tok.*"$pkg"_"$major"\.orig\.tar\.gz\"\?>.*" >/dev/null; then
+                       echo $pkg"_"$major".orig.tar.gz"
+               else
+                       echo ""
+               fi
+        fi
 }
 
 parse_distro_diff() {
@@ -275,6 +280,7 @@
 	if test "x$1" = "x-b"; then branch=$2; shift; shift; fi
 	if test "x$1" = "x-D"; then distro=$2; shift; shift; fi
 	if test "x$1" = "x-c"; then codename=$2; shift; shift; fi
+	if test "x$1" = "x-z"; then zap=$2; shift; shift; fi
 done
 test ! -f /usr/bin/gnusol_load_dirs && fatal "/usr/bin/gnusol_load_dirs not found"
 test ! -f /usr/bin/wget && fatal "/usr/bin/wget not found"

_______________________________________________
GNU/Solaris Development mailing list
[email protected]

Reply via email to