[csw-devel] SF.net SVN: gar:[9454] csw/mgar/gar/v2/lib/python/package_checks.py
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Tue Mar 30 10:06:31 CEST 2010
Revision: 9454
http://gar.svn.sourceforge.net/gar/?rev=9454&view=rev
Author: wahwah
Date: 2010-03-30 08:06:31 +0000 (Tue, 30 Mar 2010)
Log Message:
-----------
mGAR v2: checkpkg, CheckVendorURL: Moved the regex to the top section of the file, used a regex to split the VENDOR field.
Modified Paths:
--------------
csw/mgar/gar/v2/lib/python/package_checks.py
Modified: csw/mgar/gar/v2/lib/python/package_checks.py
===================================================================
--- csw/mgar/gar/v2/lib/python/package_checks.py 2010-03-30 07:54:59 UTC (rev 9453)
+++ csw/mgar/gar/v2/lib/python/package_checks.py 2010-03-30 08:06:31 UTC (rev 9454)
@@ -75,7 +75,10 @@
# Check ldd -r only for Perl modules
SYMBOLS_CHECK_ONLY_FOR = r"^CSWpm.*$"
+# Valid URLs in the VENDOR field in pkginfo
+VENDORURL_RE = r"^(http|ftp)s?\://.+\..+$"
+
def CatalognameLowercase(pkg_data, error_mgr, logger, messenger):
catalogname = pkg_data["basic_stats"]["catalogname"]
if catalogname != catalogname.lower():
@@ -130,12 +133,14 @@
error_mgr.ReportError("pkginfo-description-not-starting-with-uppercase",
desc)
+
def CheckVendorURL(pkg_data, error_mgr, logger, messenger):
- vendorurl = pkg_data["pkginfo"]["VENDOR"].split(" ")[0]
- vendorurl_re = r"^(http|ftp)s?\://.+\..+$"
- if not re.match(vendorurl_re, vendorurl):
- error_mgr.ReportError("pkginfo-bad-vendorurl", vendorurl, "Solution: add VENDOR_URL to GAR Recipe")
+ vendorurl = opencsw.WS_RE.split(pkg_data["pkginfo"]["VENDOR"])[0]
+ if not re.match(VENDORURL_RE, vendorurl):
+ error_mgr.ReportError("pkginfo-bad-vendorurl", vendorurl,
+ "Solution: add VENDOR_URL to GAR Recipe")
+
def CheckCatalogname(pkg_data, error_mgr, logger, messenger):
pkginfo = pkg_data["pkginfo"]
catalogname = pkginfo["NAME"].split(" ")[0]
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