[Oval-commits] r73 - trunk/tools/oval/parser

Pavel Vinogradov blaze-guest at alioth.debian.org
Thu Jul 12 07:09:28 UTC 2007


Author: blaze-guest
Date: 2007-07-12 07:09:28 +0000 (Thu, 12 Jul 2007)
New Revision: 73

Modified:
   trunk/tools/oval/parser/dsa.py
Log:
Rewrite fileurl regexp t proper handle cases when package name not equals to dir name.

Modified: trunk/tools/oval/parser/dsa.py
===================================================================
--- trunk/tools/oval/parser/dsa.py	2007-07-11 19:23:26 UTC (rev 72)
+++ trunk/tools/oval/parser/dsa.py	2007-07-12 07:09:28 UTC (rev 73)
@@ -92,7 +92,8 @@
 		# TODO: Packages do _NOT_ include epochs 
 		# (that should be fixed)
 		if data.has_key("package") and deb_ver:
-			urlpatern = re.compile (r'fileurl [\w:/.]+%s/(.*?)\.deb' % re.escape(data["package"]))
+			#urlpatern = re.compile (r'fileurl [\w:/.]+/([^/]*?)\.deb[ >]')
+			urlpatern = re.compile (r'fileurl [\w:/.\-+]+/([\w\-.+~]+)\.deb[^i]')
 			result = urlpatern.search (line)
 			if result:
 				(package, version, architecture) = result.groups()[0].split("_")




More information about the Oval-commits mailing list