[csw-devel] SF.net SVN: gar:[16218] csw/mgar/gar/v2/lib/python/checkpkg2.py
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Sun Nov 20 20:27:59 CET 2011
Revision: 16218
http://gar.svn.sourceforge.net/gar/?rev=16218&view=rev
Author: wahwah
Date: 2011-11-20 19:27:59 +0000 (Sun, 20 Nov 2011)
Log Message:
-----------
checkpkg: Verify the --architecture flag values
The valid values are currently 'sparc' and 'i386'.
Modified Paths:
--------------
csw/mgar/gar/v2/lib/python/checkpkg2.py
Modified: csw/mgar/gar/v2/lib/python/checkpkg2.py
===================================================================
--- csw/mgar/gar/v2/lib/python/checkpkg2.py 2011-11-20 16:23:07 UTC (rev 16217)
+++ csw/mgar/gar/v2/lib/python/checkpkg2.py 2011-11-20 19:27:59 UTC (rev 16218)
@@ -13,6 +13,7 @@
import datetime
import database
+import common_constants
import package_stats
import struct_util
import checkpkg
@@ -37,6 +38,7 @@
They can be removed, as they don't take any effect anyway. If you're getting
errors at the same time, maybe you didn't specify the overrides correctly."""
+cc = common_constants
class Error(Exception):
"""Generic error."""
@@ -93,6 +95,10 @@
err_msg_list.append("Please specify --os-releases.")
if not options.arch:
err_msg_list.append("Please specify --architecture.")
+ if options.arch not in cc.PHYSICAL_ARCHITECTURES:
+ err_msg_list.append(
+ "Valid --architecture values are: %s, you passed: %r"
+ % (cc.PHYSICAL_ARCHITECTURES, options.arch))
if err_msg_list:
raise UsageError(" ".join(err_msg_list))
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