packages: rpm-build-tools/adapter.sh, rpm-build-tools/adapter.awk, rpm-buil...

pawelz pawelz at pld-linux.org
Sun Apr 18 18:26:13 CEST 2010


Author: pawelz                       Date: Sun Apr 18 16:26:13 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
-

---- Files affected:
packages/rpm-build-tools:
   adapter.sh (1.8 -> 1.9) , adapter.awk (1.12 -> 1.13) , builder.sh (1.29 -> 1.30) , pldnotify.awk (1.11 -> 1.12) 

---- Diffs:

================================================================

================================================================
Index: packages/rpm-build-tools/adapter.awk
diff -u packages/rpm-build-tools/adapter.awk:1.12 packages/rpm-build-tools/adapter.awk:1.13
--- packages/rpm-build-tools/adapter.awk:1.12	Sat Apr  3 15:34:53 2010
+++ packages/rpm-build-tools/adapter.awk	Sun Apr 18 18:26:07 2010
@@ -767,6 +767,12 @@
 		if (l == "LGPLv2+") {
 			l = "LGPL v2+"
 		}
+		if (l == "GPLv3") {
+			l = "GPL v3"
+		}
+		if (l == "GPLv3+") {
+			l = "GPL v3+"
+		}
 		$0 = "License:\t" l;
 	}
 
@@ -807,6 +813,9 @@
 	if (field ~ /^url:$/)
 		$1 = "URL:"
 
+	if (field ~ /^patch/)
+		$1 = "Patch" substr(field, 6);
+
 	if (field ~ /^description:$/)
 		$1 = "\n%description\n"
 
@@ -1182,6 +1191,10 @@
 			continue;
 		if ($c ~ sysconfdir "/tmpwatch")
 			continue;
+		if ($c ~ sysconfdir "/acpi")
+			continue;
+		if ($c ~ sysconfdir "/apm")
+			continue;
 		gsub(sysconfdir, "%{_sysconfdir}", $c)
 	}
 
@@ -1286,6 +1299,10 @@
 	gsub("^gcc ", "%{__cc} ")
 	gsub("^rm --interactive=never ", "%{__rm} ")
 
+	# fedora
+	gsub("%{ruby_sitearch}", "%{ruby_sitearchdir}")
+	gsub("%{python_sitearch}", "%{py_sitedir}")
+
 	# mandrake specs
 	gsub("^%make$", "%{__make}")
 	gsub("^%make ", "%{__make} ")
@@ -1824,26 +1841,45 @@
 
 	# jpackages
 	sub(/^java-devel$/, "jdk", $2);
-	sub(/^log4j$/, "java-log4j", $2);
-	sub(/^logging-log4j$/, "java-log4j", $2);
+	sub(/^axis$/, "java-axis", $2);
+	sub(/^gnu-regexp$/, "java-gnu-regexp", $2);
+	sub(/^gnu.regexp$/, "java-gnu-regexp", $2);
+	sub(/^hamcrest$/, "java-hamcrest", $2);
+	sub(/^jaas$/, "java(jaas)", $2);
+	sub(/^jaf$/, "java(jaf)", $2);
+	sub(/^jakarta-ant$/, "ant", $2);
+	sub(/^jakarta-commons-httpclient$/, "java-commons-httpclient", $2);
 	sub(/^jakarta-log4j$/, "java-log4j", $2);
-	sub(/^oro$/, "java-oro", $2);
 	sub(/^jakarta-oro$/, "java-oro", $2);
-	sub(/^jakarta-ant$/, "ant", $2);
-	sub(/^xerces-j2$/, "java-xerces", $2);
-	sub(/^xerces-j$/, "java-xerces", $2);
+	sub(/^javamail$/, "java(javamail)", $2);
+	sub(/^jaxp$/, "java(jaxp)", $2);
+	sub(/^jaxp_parser_impl$/, "java(jaxp_parser_impl)", $2);
+	sub(/^jaxp_transform_impl$/, "java(jaxp_transform_impl)", $2);
+	sub(/^jce$/, "java(jce)", $2);
+	sub(/^jdbc-stdext$/, "java(jdbc-stdext)", $2);
+	sub(/^jmx$/, "java(jmx)", $2);
+	sub(/^jndi$/, "java(jndi)", $2);
+	sub(/^jsse$/, "java(jsse)", $2);
+	sub(/^jta$/, "java(jta)", $2);
 	sub(/^ldapjdk$/, "ldapsdk", $2);
+	sub(/^log4j$/, "java-log4j", $2);
+	sub(/^logging-log4j$/, "java-log4j", $2);
+	sub(/^oro$/, "java-oro", $2);
+	sub(/^rhino$/, "java-rhino", $2);
 	sub(/^saxon-scripts$/, "saxon", $2);
+	sub(/^servlet$/, "java(servlet)", $2);
+	sub(/^uddi4j$/, "java-uddi4j", $2);
+	sub(/^wsdl4j$/, "java-wsdl4j", $2);
 	sub(/^xalan-j2$/, "java-xalan", $2);
 	sub(/^xalan-j$/, "java-xalan", $2);
-	sub(/^gnu-regexp$/, "java-gnu-regexp", $2);
-	sub(/^gnu.regexp$/, "java-gnu-regexp", $2);
-	sub(/^jakarta-commons-httpclient$/, "java-commons-httpclient", $2);
+	sub(/^xerces-j2$/, "java-xerces", $2);
+	sub(/^xerces-j$/, "java-xerces", $2);
+	sub(/^xml-commons-apis$/, "java-xml-commons-apis", $2);
 	sub(/^xml-commons-resolver$/, "java-xml-commons-resolver", $2);
-	sub(/^axis$/, "java-axis", $2);
-	sub(/^wsdl4j$/, "java-wsdl4j", $2);
-	sub(/^uddi4j$/, "java-uddi4j", $2);
-	sub(/^hamcrest$/, "java-hamcrest", $2);
+	sub(/^java\(Portlet\)$/, "java(portlet)", $2);
+	sub(/^java\(Servlet\)$/, "java(servlet)", $2);
+	sub(/^java\(JavaServerFaces\)$/, "java(javaserverfaces)", $2);
+	sub(/^java\(JSP\)$/, "java(jsp)", $2);
 
 	# redhat virtual
 	sub(/^tftp-server$/, "tftpdaemon", $2);
@@ -1854,6 +1890,7 @@
 	# fedora
 	sub(/^iscsi-initiator-utils$/, "open-iscsi", $2);
 	sub(/^gnome-python2-extras$/, "python-gnome-extras", $2);
+	sub(/^gnome-python2-gtkspell$/, "python-gnome-extras-gtkspell", $2);
 	sub(/^gtk2$/, "gtk+2", $2);
 	sub(/^gtk2-devel$/, "gtk+2-devel", $2);
 	sub(/^pygtk2-devel$/, "python-pygtk-devel", $2);
@@ -1867,6 +1904,9 @@
 	sub(/^python-imaging-tk$/, "python-PIL-tk", $2);
 	sub(/^initscripts$/, "rc-scripts", $2);
 	sub(/^libXft-devel$/, "xorg-lib-libXft-devel", $2);
+	sub(/^dbus-python$/, "python-dbus", $2);
+	sub(/^python-pygtk$/, "python-pygtk-gtk", $2);
+	sub(/^notify-python$/, "python-pynotify", $2);
 
 	# debian
 	sub(/^libgconf2-dev$/, "GConf2-devel", $2);

================================================================
Index: packages/rpm-build-tools/builder.sh
diff -u packages/rpm-build-tools/builder.sh:1.29 packages/rpm-build-tools/builder.sh:1.30
--- packages/rpm-build-tools/builder.sh:1.29	Mon Apr  5 17:06:57 2010
+++ packages/rpm-build-tools/builder.sh	Sun Apr 18 18:26:07 2010
@@ -33,10 +33,9 @@
 #	Try `basename --help' for more information.
 #	-- and the normal usage info --
 
-
-RCSID='$Id$'
-r=${RCSID#* * }
-rev=${r%% *}
+PROGRAM=${0##*/}
+APPDIR=$(d=$0; [ -L "$d" ] && d=$(readlink -f "$d"); dirname "$d")
+RCSID='$Id$' r=${RCSID#* * } rev=${r%% *}
 VERSION="v0.35/$rev"
 VERSIONSTRING="\
 Build package utility from PLD Linux CVS repository
@@ -214,6 +213,15 @@
 fi
 
 #
+# sanity checks
+#
+if [ -d $HOME/rpm/SOURCES ]; then
+	echo "ERROR: ~/rpm/{SPECS,SOURCES} structure is obsolete" >&2
+	echo "ERROR: get rid of your ~/rpm/SOURCES" >&2
+	exit 1
+fi
+
+#
 # are we using cvs-nserver ?
 #
 CVS_NSERVER=0
@@ -554,7 +562,7 @@
 
 get_icons() {
 	update_shell_title "get icons"
-	ICONS=$(awk '/^Icon:/ {print $2}' ${ASSUMED_NAME}/${SPECFILE})
+	ICONS=$(awk '/^Icon:/ {print $2}' $PACKAGE_DIR/${SPECFILE})
 	if [ -z "$ICONS" ]; then
 		return
 	fi
@@ -1380,6 +1388,27 @@
 	fi
 }
 
+# from relup.sh
+set_release() {
+	local specfile="$1"
+	local rel="$2"
+	local newrel="$3"
+	sed -i -e "
+		s/^\(%define[ \t]\+_\?rel[ \t]\+\)$rel\$/\1$newrel/
+		s/^\(Release:[ \t]\+\)$rel\$/\1$newrel/
+	" $specfile
+}
+
+set_version() {
+	local specfile="$1"
+	local ver="$2"
+	local newver="$3"
+	sed -i -e "
+		s/^\(%define[ \t]\+_\?ver[ \t]\+\)$ver\$/\1$newver/
+		s/^\(Version:[ \t]\+\)$ver\$/\1$newver/
+	" $specfile
+}
+
 build_package() {
 	update_shell_title "build_package"
 	if [ -n "$DEBUG" ]; then
@@ -1390,29 +1419,29 @@
 	cd "$PACKAGE_DIR"
 
 	if [ -n "$TRY_UPGRADE" ]; then
+		local TNOTIFY TNEWVER TOLDVER
 		update_shell_title "build_package: try_upgrade"
+
 		if [ -n "$FLOAT_VERSION" ]; then
-			TNOTIFY=$(./pldnotify.awk $SPECFILE -n) || exit 1
+			TNOTIFY=$($APPDIR/pldnotify.awk ${BE_VERBOSE:+-vDEBUG=1} $SPECFILE -n) || exit 1
 		else
-			TNOTIFY=$(./pldnotify.awk $SPECFILE) || exit 1
+			TNOTIFY=$($APPDIR/pldnotify.awk ${BE_VERBOSE:+-vDEBUG=1} $SPECFILE) || exit 1
 		fi
 
 		TNEWVER=$(echo $TNOTIFY | awk '{ match($4,/\[NEW\]/); print $5 }')
 
 		if [ -n "$TNEWVER" ]; then
 			TOLDVER=`echo $TNOTIFY | awk '{ print $3; }'`
-			echo "New version found, updating spec file to version " $TNEWVER
+			echo "New version found, updating spec file from $TOLDVER to version $TNEWVER"
 			if [ "$REVERT_BROKEN_UPGRADE" = "yes" ]; then
 				cp -f $SPECFILE $SPECFILE.bak
 			fi
 			chmod +w $SPECFILE
-			eval "perl -pi -e 's/Version:\t"$TOLDVER"/Version:\t"$TNEWVER"/gs' $SPECFILE"
-			eval "perl -pi -e 's/Release:\t[1-9]{0,4}/Release:\t0.1/' $SPECFILE"
+			set_release $SPECFILE $PACKAGE_RELEASE 0.1
+			set_version $SPECFILE $PACKAGE_VERSION $TNEWVER
 			parse_spec
 			NODIST="yes" get_files $SOURCES $PATCHES
 			update_md5 $SOURCES
-
-			unset TOLDVER TNEWVER TNOTIFY
 		fi
 	fi
 	cd "$PACKAGE_DIR"

================================================================
Index: packages/rpm-build-tools/pldnotify.awk
diff -u packages/rpm-build-tools/pldnotify.awk:1.11 packages/rpm-build-tools/pldnotify.awk:1.12
--- packages/rpm-build-tools/pldnotify.awk:1.11	Sat Apr  3 15:34:53 2010
+++ packages/rpm-build-tools/pldnotify.awk	Sun Apr 18 18:26:07 2010
@@ -15,6 +15,14 @@
 # - "SourceXDownload" support (use given URLs if present instead of cut-down SourceX URLs)
 # - "SourceXActiveFTP" support
 
+
+function d(s) {
+	if (!DEBUG) {
+		return
+	}
+	print s >> "/dev/stderr"
+}
+
 function fixedsub(s1,s2,t,	ind) {
 # substitutes fixed strings (not regexps)
 	if (ind = index(t,s1)) {
@@ -25,7 +33,7 @@
 
 function ispre(s) {
 	if ((s~"pre")||(s~"PRE")||(s~"beta")||(s~"BETA")||(s~"alpha")||(s~"ALPHA")||(s~"rc")||(s~"RC")) {
-		if (DEBUG) print "pre-version"
+		d("pre-version")
 		return 1
 	} else {
 		return 0
@@ -42,8 +50,8 @@
 	sub("^0*","",v2)
 	gsub("\.0*",".",v1)
 	gsub("\.0*",".",v2)
-	if (DEBUG) print "v1 == " v1
-	if (DEBUG) print "v2 == " v2
+	d("v1 == " v1)
+	d("v2 == " v2)
 	count=split(v1,v1a,"\.")
 	count2=split(v2,v2a,"\.")
 
@@ -53,9 +61,9 @@
 	for (i=1; i<=mincount; i++) {
 		if (v1a[i]=="") v1a[i]=0
 		if (v2a[i]=="") v2a[i]=0
-		if (DEBUG) print "i == " i
-		if (DEBUG) print "v1[i] == " v1a[i]
-		if (DEBUG) print "v2[i] == " v2a[i]
+		d("i == " i)
+		d("v1[i] == " v1a[i])
+		d("v2[i] == " v2a[i])
 		if ((v1a[i]~/[0-9]/)&&(v2a[i]~/[0-9]/)) {
 			if (length(v2a[i])>length(v1a[i]))
 				return 1
@@ -97,8 +105,8 @@
 		v2=(substr(v2,1,RSTART) "." substr(v2,RSTART+RLENGTH-1))
 	sub("^0*","",v1)
 	sub("^0*","",v2)
-	if (DEBUG) print "v1 == " v1
-	if (DEBUG) print "v2 == " v2
+	d("v1 == " v1)
+	d("v2 == " v2)
 	count=split(v1,v1a,"\.")
 	count2=split(v2,v2a,"\.")
 
@@ -108,9 +116,9 @@
 	for (i=1; i<=mincount; i++) {
 		if (v1a[i]=="") v1a[i]=0
 		if (v2a[i]=="") v2a[i]=0
-		if (DEBUG) print "i == " i
-		if (DEBUG) print "v1[i] == " v1a[i]
-		if (DEBUG) print "v2[i] == " v2a[i]
+		d("i == " i)
+		d("v1[i] == " v1a[i])
+		d("v2[i] == " v2a[i])
 		if ((v1a[i]~/[0-9]/)&&(v2a[i]~/[0-9]/)) {
 			if (i==2) {
 				if (0+("." v2a[i])>0+("." v1a[i]))
@@ -154,7 +162,7 @@
 function link_seen(link) {
 	for (seenlink in frameseen) {
 		if (seenlink == link) {
-			if (DEBUG) print "Link: [" link "] seen already, skipping..."
+			d("Link: [" link "] seen already, skipping...")
 			return 1
 		}
 	}
@@ -176,7 +184,7 @@
 		gsub(".*\/tarball\/", "", link)
 		link = link ".tar.gz"
 	}
-	if (DEBUG) print "POST FIXING URL [ " oldlink " ] to [ " link " ]"
+	d("POST FIXING URL [ " oldlink " ] to [ " link " ]")
 	return link
 }
 
@@ -192,65 +200,65 @@
 		gsub("^http://(download|dl).(sf|sourceforge).net/", "", url)
 		gsub("/.*", "", url)
 		url = "http://sourceforge.net/projects/" url "/files/"
-		if (DEBUG) print "sf url, mungled url to: " url
+		d("sf url, mungled url to: " url)
 	}
 
 	if (url ~ /^http:\/\/(.*)\.googlecode\.com\/files\//) {
 		gsub("^http://", "", url)
 		gsub("\..*", "", url)
 		url = "http://code.google.com/p/" url "/downloads/list"
-		if (DEBUG) print "googlecode url, mungled url to: " url
+		d("googlecode url, mungled url to: " url)
 	}
 
 	if (url ~ /^http:\/\/pecl.php.net\/get\//) {
 		gsub("-.*", "", filename)
 		url = "http://pecl.php.net/package/" filename
-		if (DEBUG) print "pecl.php.net url, mungled url to: " url
+		d("pecl.php.net url, mungled url to: " url)
 	}
 
 	if (url ~ /^(http|ftp):\/\/mysql.*\/Downloads\/MySQL-5.1\//) {
 		url = "http://dev.mysql.com/downloads/mysql/5.1.html#source"
-		 if (DEBUG) print "mysql 5.1 url, mungled url to: " url
+		 d("mysql 5.1 url, mungled url to: " url)
 	}
 
 	if (url ~/^(http|https):\/\/launchpad\.net\/(.*)\//) {
 		gsub("^(http|https):\/\/launchpad\.net\/", "", url)
 		gsub("\/.*/", "", url)
 		url = "https://code.launchpad.net/" url "/+download"
-		if (DEBUG) print "main launchpad url, mungled url to: " url
+		d("main launchpad url, mungled url to: " url)
 	}
 
 	if (url ~/^(http|https):\/\/edge\.launchpad\.net\/(.*)\//) {
 		gsub("^(http|https):\/\/edge\.launchpad\.net\/", "", url)
 		gsub("\/.*/", "", url)
 		url = "https://edge.launchpad.net/" url "/+download"
-		if (DEBUG) print "edge launchpad url, mungled url to: " url
+		d("edge launchpad url, mungled url to: " url)
 	}
 
 	if (url ~/^(http|https):\/\/github.com\/.*\/(.*)\/tarball\//) {
 		gsub("\/tarball\/.*", "/downloads", url)
-		if (DEBUG) print "github tarball url, mungled url to: " url
+		d("github tarball url, mungled url to: " url)
 	}
 
 
-	if (DEBUG) print "Retrieving: " url
+	d("Retrieving: " url)
 	cmd = "wget --user-agent \"Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2) Gecko/20100129 PLD/3.0 (Th) Iceweasel/3.6\" -nv -O - \"" url "\" -t 2 -T 45 --passive-ftp --no-check-certificate > " tmpfile " 2> " tmpfileerr
-	if (DEBUG) print "Execute: " cmd
+	d("Execute: " cmd)
 	errno = system(cmd)
-	if (DEBUG) print "Execute done"
+	d("Execute done")
 
 	if (errno==0) {
 		wholeodp = ""
-		if ( DEBUG ) print "Reading succeess response..."
+		d("Reading succeess response...")
 		while (getline oneline < tmpfile)
 			wholeodp=(wholeodp " " oneline)
-		# if ( DEBUG ) print "Response: " wholeodp
+#			d("Response: " wholeodp)
 	} else {
-		if ( DEBUG ) print "Reading failure response..."
+		d("Reading failure response...")
 		wholeerr = ""
 		while (getline oneline < tmpfileerr)
 			wholeerr=(wholeerr " " oneline)
-		if ( DEBUG ) print "Error Response: " wholeerr
+		d("Error Response: " wholeerr)
 	}
 
 	system("rm -f " tmpfile)
@@ -261,7 +269,7 @@
 
 	if ( errno==0) {
 		while (match(wholeodp, /<([aA]|[fF][rR][aA][mM][eE])[ \t][^>]*>/) > 0) {
-			if (DEBUG) print "Processing links..."
+			d("Processing links...")
 			odp=substr(wholeodp,RSTART,RLENGTH);
 			wholeodp=substr(wholeodp,RSTART+RLENGTH);
 
@@ -270,10 +278,10 @@
 				sub(/[sS][rR][cC]=[ \t]*/,"src=",odp);
 				match(odp,/src="[^"]+"/)
 				newurl=substr(odp,RSTART+5,RLENGTH-6)
-				if (DEBUG) print "Frame: " newurl
+				d("Frame: " newurl)
 				if (newurl !~ /\//) {
 					newurl=(urldir newurl)
-					if (DEBUG) print "Frame->: " newurl
+					d("Frame->: " newurl)
 				}
 
 				if (link_seen(newurl)) {
@@ -296,7 +304,7 @@
 				}
 
 				retval=(retval " " link)
-				if (DEBUG) print "href(\"\"): " link
+				d("href(\"\"): " link)
 			} else if (lowerodp ~ /href=[ \t]*'[^']*'/) {
 				sub(/[hH][rR][eE][fF]=[ \t]*'/,"href='",odp)
 				match(odp,/href='[^']*'/)
@@ -311,7 +319,7 @@
 				}
 
 				retval=(retval " " link)
-				if (DEBUG) print "href(''): " link
+				d("href(''): " link)
 			} else if (lowerodp ~ /href=[ \t]*[^ \t>]*/) {
 				sub(/[hH][rR][eE][fF]=[ \t]*/,"href=",odp)
 				match(odp,/href=[^ \t>]*/)
@@ -325,10 +333,10 @@
 				}
 
 				retval=(retval " " link)
-				if (DEBUG) print "href(): " link
+				d("href(): " link)
 			} else {
 				# <a ...> but not href - skip
-				if (DEBUG) print "skipping <a > without href: " odp
+				d("skipping <a > without href: " odp)
 			}
 		}
 	} else {
@@ -336,7 +344,7 @@
 	}
 
 
-	if (DEBUG) print "Returning: " retval
+	d("Returning: " retval)
 	return retval
 }
 
@@ -349,7 +357,11 @@
 			gsub("%" j , defs[j], var)
 		}
 		if (var==oldvar) {
-			if ( DEBUG ) for (i in defs) print i " == " defs[i]
+			if (DEBUG) {
+				for (i in defs) {
+					d(i " == " defs[i])
+				}
+			}
 			return var
 		}
 	}
@@ -367,7 +379,7 @@
 			mname=fields[3]
 			prefix=substr(url,1,length(origin))
 			if (prefix==origin){
-				if ( DEBUG ) print "Mirror fount at " mname
+				d("Mirror fount at " mname)
 				close("mirrors")
 				return mirror substr(url,length(origin)+1)
 			}
@@ -379,10 +391,10 @@
 
 function process_source(number,lurl,name,version) {
 # fetches file list, and compares version numbers
-	if ( DEBUG ) print "Processing " lurl
+	d("Processing " lurl)
 
 	if ( index(lurl,version)==0 ) {
-		if (DEBUG) print "There is no version number."
+		d("There is no version number.")
 		return 0
 	}
 
@@ -404,24 +416,24 @@
 		sub("(\.tar\.(bz|bz2|gz)|zip)$","",filename)
 	}
 
-	if ( DEBUG ) print "Will check a directory: " dir
-	if ( DEBUG ) print "and a file: " filename
+	d("Will check a directory: " dir)
+	d("and a file: " filename)
 
 	filenameexp=filename
 	gsub("\+","\\+",filenameexp)
 	sub(version,"[A-Za-z0-9.]+",filenameexp)
 	gsub("\.","\\.",filenameexp)
-	if ( DEBUG ) print "Expression: " filenameexp
+	d("Expression: " filenameexp)
 	match(filename,version)
 	prever=substr(filename,1,RSTART-1)
 	postver=substr(filename,RSTART+RLENGTH)
-	if ( DEBUG ) print "Before number: " prever
-	if ( DEBUG ) print "and after: " postver
+	d("Before number: " prever)
+	d("and after: " postver)
 	newurl=find_mirror(acc "://" host dir)
 	#print acc "://" host dir
 	#newurl=url[1]"://"url[2]url[3]url[4]
 	#newurl=acc "://" host dir filename
-	if ( DEBUG ) print "Looking at " newurl
+	d("Looking at " newurl)
 
 	references=0
 	finished=0
@@ -430,12 +442,12 @@
 	if( odp ~ "ERROR: ") {
 		print name "(" number ") " odp
 	} else {
-		if (DEBUG) print "WebPage downloaded"
+		d("WebPage downloaded")
 		c=split(odp,linki)
 		for (nr=1; nr<=c; nr++) {
 			addr=linki[nr]
 
-			if (DEBUG) print "Found link: " addr
+			d("Found link: " addr)
 
 			# github has very different tarball links that clash with this safe check
 			if (!(newurl ~/^(http|https):\/\/github.com\/.*\/tarball/)) {
@@ -447,21 +459,21 @@
 			if (addr ~ filenameexp) {
 				match(addr,filenameexp)
 				newfilename=substr(addr,RSTART,RLENGTH)
-				if (DEBUG) print "Hypothetical new: " newfilename
+				d("Hypothetical new: " newfilename)
 				newfilename=fixedsub(prever,"",newfilename)
 				newfilename=fixedsub(postver,"",newfilename)
-				if (DEBUG) print "Version: " newfilename
+				d("Version: " newfilename)
 				if (newfilename ~ /\.(asc|sig|pkg|bin|binary|built)$/) continue
 				# strip ending (happens when in directiory name as version matching mode)
 				sub("(\.tar\.(bz|bz2|gz)|zip)$","",newfilename)
 				if (NUMERIC) {
 					if ( compare_ver_dec(version, newfilename)==1 ) {
-						if (DEBUG) print "Yes, there is new one"
+						d("Yes, there is new one")
 						version=newfilename
 						finished=1
 					}
 				} else if ( compare_ver(version, newfilename)==1 ) {
-					if (DEBUG) print "Yes, there is new one"
+					d("Yes, there is new one")
 					version=newfilename
 					finished=1
 				}
@@ -480,9 +492,7 @@
 	sub(/^php-pear-/, "", pname);
 
 	pearcmd = "pear remote-info " pname " | awk '/^Latest/{print $NF}'"
-	if (DEBUG) {
-		print "pearcmd: " pearcmd
-	}
+	d("pearcmd: " pearcmd)
 	pearcmd | getline nver
 	close(pearcmd)
 
@@ -499,9 +509,7 @@
 	# %patchset_source -f ftp://ftp.vim.org/pub/editors/vim/patches/7.2/7.2.%03g 1 %{patchlevel}
 	mver = substr(ver, 0, 4)
 	vimcmd = "wget -q -O - ftp://ftp.vim.org/pub/editors/vim/patches/"mver"/MD5SUMS|grep -vF .gz|tail -n1|awk '{print $2}'"
-	if (DEBUG) {
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/rpm-build-tools/adapter.sh?r1=1.8&r2=1.9&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/rpm-build-tools/adapter.awk?r1=1.12&r2=1.13&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/rpm-build-tools/builder.sh?r1=1.29&r2=1.30&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/rpm-build-tools/pldnotify.awk?r1=1.11&r2=1.12&f=u



More information about the pld-cvs-commit mailing list