[csw-devel] SF.net SVN: gar:[2417] csw/mgar/gar/v1

wbonnet at users.sourceforge.net wbonnet at users.sourceforge.net
Sun Nov 30 23:47:09 CET 2008


Revision: 2417
          http://gar.svn.sourceforge.net/gar/?rev=2417&view=rev
Author:   wbonnet
Date:     2008-11-30 22:47:09 +0000 (Sun, 30 Nov 2008)

Log Message:
-----------
Update upstream notification

Modified Paths:
--------------
    csw/mgar/gar/v1/bin/mail2maintainer
    csw/mgar/gar/v1/bin/upstream_watch
    csw/mgar/gar/v1/gar.lib.mk

Modified: csw/mgar/gar/v1/bin/mail2maintainer
===================================================================
--- csw/mgar/gar/v1/bin/mail2maintainer	2008-11-30 22:21:26 UTC (rev 2416)
+++ csw/mgar/gar/v1/bin/mail2maintainer	2008-11-30 22:47:09 UTC (rev 2417)
@@ -23,7 +23,7 @@
 function get_package_maintainer
 {
 	_PACKAGE="$1"
-	_MAINTAINER="`wget -q http://securebar.secure-tunnel.com/cgi-bin/nph-freebar.cgi/110110/http/www.opencsw.org/packages.php/$_PACKAGE -O- | grep Maintainer | sed -e "s,.*/maintainers/\([^\'\\\"]*\).*,\1,g"`"
+	_MAINTAINER="`wget -q http://www.opencsw.org/packages.php/$_PACKAGE -O- | grep Maintainer | sed -e "s,.*/maintainers/\([^\'\\\"]*\).*,\1,g"`"
 	
 	echo "$_MAINTAINER"
 }

Modified: csw/mgar/gar/v1/bin/upstream_watch
===================================================================
--- csw/mgar/gar/v1/bin/upstream_watch	2008-11-30 22:21:26 UTC (rev 2416)
+++ csw/mgar/gar/v1/bin/upstream_watch	2008-11-30 22:47:09 UTC (rev 2417)
@@ -14,7 +14,6 @@
 use Env;
 use Getopt::Long;
 
-
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 # Function : compare_versions
 # Purpose  : Compare version number of two software
@@ -91,7 +90,7 @@
 	$http_proxy_cmd = "set http:proxy $ENV{HTTP_PROXY};" if exists $ENV{HTTP_PROXY};
 	$http_proxy_cmd = "set http:proxy $ENV{http_proxy};" if exists $ENV{http_proxy};
 
-	open (FH, "lftp -q -c \"set net:timeout 10; set net:max-retries 1; $ftp_proxy_cmd $http_proxy_cmd open $url/ && ls\" 2>/dev/null |");
+	open (FH, "lftp -q -c \"set net:timeout 10; set net:max-retries 16; $ftp_proxy_cmd $http_proxy_cmd open $url/ && ls\" 2>/dev/null |");
 
 	while (my $line = <FH>) {
 		my @cols = split (/\s+/, $line);

Modified: csw/mgar/gar/v1/gar.lib.mk
===================================================================
--- csw/mgar/gar/v1/gar.lib.mk	2008-11-30 22:21:26 UTC (rev 2416)
+++ csw/mgar/gar/v1/gar.lib.mk	2008-11-30 22:47:09 UTC (rev 2417)
@@ -105,9 +105,9 @@
 
 # check a new upstream files are available
 
-UW_ARGS = $(addprefix -u ,$(MASTER_SITES))
-ifneq ($(UFILES_REGEX),)
-	FILES2CHECK = $(shell http_proxy=$(http_proxy) ftp_proxy=$(ftp_proxy) $(GARBIN)/upstream_watch $(UW_ARGS) $(addsuffix ',$(addprefix ',$(UFILES_REGEX))))
+UW_ARGS = $(addprefix -u ,$(UPSTREAM_MASTER_SITES))
+ifneq ($(UFILES_REGEX), "")    
+	FILES2CHECK = $(shell http_proxy=$(http_proxy) ftp_proxy=$(ftp_proxy) $(GARBIN)/upstream_watch $(UW_ARGS) $(addsuffix ',$(addprefix ',$(UFILES_REGEX)))) 
 else
 	FILES2CHECK = ""
 endif
@@ -124,7 +124,7 @@
 			fi; \
 			$(MAKE) checknew-$$FILE >/dev/null; \
 		done; \
-		if [ -n "$$NEW_FILES" ]; then \
+		if [ ! "$$NEW_FILES" -eq "" ]; then \
 			{ echo ""; \
 			  echo "Hello dear $(GARNAME) maintainer,"; \
 			  echo ""; \
@@ -134,13 +134,25 @@
 			  echo "    $$NEW_FILES"; \
 			  echo ""; \
 			  echo "is/are available at the following url(s):"; \
-			  echo "    $(MASTER_SITES)"; \
+			  echo "    $(UPSTREAM_MASTER_SITES)"; \
 			  echo ""; \
 			  echo "Please consider updating your package." ; \
 			  echo ""; \
 			  echo "---"; \
 			  echo "upstream notification job"; } | $(GARBIN)/mail2maintainer -s '[svn] $(GARNAME) upstream update notification' $(GARNAME); \
-		fi; \
+	        else \
+    			if [ ! -n "$(UFILES_REGEX)" ]; then \
+				{ echo ""; \
+				  echo "Hello dear $(GARNAME) maintainer,"; \
+				  echo ""; \
+				  echo "The upstream notification job has detected that $(GARNAME) is not configured for automatic upstream file update detection."; \
+				  echo ""; \
+				  echo "Please consider updating your package. Documentation is available from this link : http://www.opencsw.org" ; \
+				  echo ""; \
+				  echo "---"; \
+				  echo "upstream notification job"; } | $(GARBIN)/mail2maintainer -s '[svn] $(GARNAME) upstream update notification' $(GARNAME); \
+    			fi; \
+       		fi; \
 	fi
 	
 
@@ -156,11 +168,15 @@
 			fi; \
 			$(MAKE) checknew-$$FILE >/dev/null; \
 		done; \
-		if [ -n "$$NEW_FILES" ]; then \
+		if [ ! "$$NEW_FILES" -eq "" ]; then \
 			echo "$(GARNAME): new upstream files available: $$NEW_FILES"; \
-		fi; \
+        else \
+    		if [ ! -n "$(UFILES_REGEX)" ]; then \
+                echo "$(GARNAME): Warning UFILES_REGEX is not set : $(UFILES_REGEX)" ; \
+    		fi; \
+        fi; \
 	fi
-	
+
 checknew-%:
 	@$(MAKECOOKIE)
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list