[packages/rpm-build-tools] handle google chrome upgrades

glen glen at pld-linux.org
Sun Apr 7 16:45:01 CEST 2013


commit 48371291502eff0999319a2c9dda6b523cc64cc6
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sun Apr 7 17:44:49 2013 +0300

    handle google chrome upgrades

 pldnotify.awk | 12 ++++++++++++
 1 file changed, 12 insertions(+)
---
diff --git a/pldnotify.awk b/pldnotify.awk
index aa5cd8e..75f271f 100644
--- a/pldnotify.awk
+++ b/pldnotify.awk
@@ -628,6 +628,16 @@ function nodejs_upgrade(name, ver,   cmd, nver) {
 	return nver
 }
 
+function chrome_upgrade(name, ver,   cmd, sourceurl) {
+	sourceurl = "http://dl.google.com/linux/chrome/rpm/stable/x86_64/repodata/primary.xml.gz"
+	cmd = "curl -s " sourceurl " | zcat | perl -ne 'm{<name>google-chrome-" DEFS["state"] "</name>} and m{<version .*ver=.([\d.]+)} and print $1'"
+	d("CHROME " cmd);
+	cmd | getline nver
+	close(cmd)
+
+	return nver
+}
+
 function process_data(name, ver, rel, src,   nver) {
 	if (name ~ /^php-pear-/) {
 		nver = pear_upgrade(name, ver);
@@ -637,6 +647,8 @@ function process_data(name, ver, rel, src,   nver) {
 		nver = hudson_upgrade(name, ver);
 	} else if (name == "vim") {
 		nver = vim_upgrade(name, ver);
+	} else if (name == "google-chrome") {
+		nver = chrome_upgrade(name, ver);
 	} else if (name ~ "^nodejs-") {
 		nver = nodejs_upgrade(name, ver);
 	}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-tools.git/commitdiff/48371291502eff0999319a2c9dda6b523cc64cc6



More information about the pld-cvs-commit mailing list