Author: glen                         Date: Sat Oct 15 12:50:34 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- PEAR package version checks

---- Files affected:
SPECS:
   pldnotify.awk (1.51 -> 1.52) 

---- Diffs:

================================================================
Index: SPECS/pldnotify.awk
diff -u SPECS/pldnotify.awk:1.51 SPECS/pldnotify.awk:1.52
--- SPECS/pldnotify.awk:1.51    Wed May  4 23:11:05 2005
+++ SPECS/pldnotify.awk Sat Oct 15 14:50:29 2005
@@ -309,7 +309,7 @@
                        if ((addr ~ filenameexp) && !(addr ~ "[-_.0-9A-Za-z~]" 
filenameexp)) {
                                match(addr,filenameexp)
                                newfilename=substr(addr,RSTART,RLENGTH)
-                               if (DEBUG) print "Hipotetical new: " newfilename
+                               if (DEBUG) print "Hypothetical new: " 
newfilename
                                newfilename=fixedsub(prever,"",newfilename)
                                newfilename=fixedsub(postver,"",newfilename)
                                if (DEBUG) print "Version: " newfilename
@@ -333,8 +333,33 @@
                        print name "(" number ") [OLD] " oldversion " [NEW] " 
version
        }
 }
+
+# upgrade check for pear package using PEAR CLI
+function pear_upgrade(name, ver) {
+       pname = name;
+       sub(/^php-pear-/, "", pname);
+
+       pearcmd = "pear remote-info " pname " | awk '/^Latest/{print $NF}'"
+       if (DEBUG) {
+               print "pearcmd: " pearcmd
+       }
+       pearcmd | getline nver
+       close(pearcmd)
+
+       if (compare_ver(ver, nver)) {
+               print name " [OLD] " ver " [NEW] " nver
+       } else {
+               print name " seems ok: " ver
+       }
+
+       return
+}
        
 function process_data(name,ver,rel,src) {
+       if (name ~ /^php-pear-/) {
+               return pear_upgrade(name, ver);
+       }
+
 # this function checks if substitutions were valid, and if true:
 # processes each URL and tries to get current file list
        for (i in src) {
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/pldnotify.awk?r1=1.51&r2=1.52&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to