Fix msg usage in the moved utility functions.

(Bitbake rev: 686288444d22091dee66e20ec49b9c53f8c980b7)

Signed-off-by: Chris Larson <clarson@kergoth.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
Chris Larson 2009-07-19 10:07:00 -07:00 committed by Richard Purdie
parent f8c6db95d7
commit 8f83be3338
1 changed files with 15 additions and 15 deletions

View File

@ -23,7 +23,7 @@ digits = "0123456789"
ascii_letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" ascii_letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
separators = ".-" separators = ".-"
import re, fcntl, os, types import re, fcntl, os, types, bb
def explode_version(s): def explode_version(s):
r = [] r = []
@ -435,10 +435,10 @@ def mkdirhier(dir):
directory already exists like os.makedirs directory already exists like os.makedirs
""" """
debug(3, "mkdirhier(%s)" % dir) bb.debug(3, "mkdirhier(%s)" % dir)
try: try:
os.makedirs(dir) os.makedirs(dir)
debug(2, "created " + dir) bb.debug(2, "created " + dir)
except OSError, e: except OSError, e:
if e.errno != 17: raise e if e.errno != 17: raise e
@ -832,32 +832,32 @@ def ververify(myorigval,silent=1):
if len(myorigval) == 0: if len(myorigval) == 0:
if not silent: if not silent:
error("package version is empty") bb.error("package version is empty")
__ververify_cache__[myorigval] = 0 __ververify_cache__[myorigval] = 0
return 0 return 0
myval = myorigval.split('.') myval = myorigval.split('.')
if len(myval)==0: if len(myval)==0:
if not silent: if not silent:
error("package name has empty version string") bb.error("package name has empty version string")
__ververify_cache__[myorigval] = 0 __ververify_cache__[myorigval] = 0
return 0 return 0
# all but the last version must be a numeric # all but the last version must be a numeric
for x in myval[:-1]: for x in myval[:-1]:
if not len(x): if not len(x):
if not silent: if not silent:
error("package version has two points in a row") bb.error("package version has two points in a row")
__ververify_cache__[myorigval] = 0 __ververify_cache__[myorigval] = 0
return 0 return 0
try: try:
foo = int(x) foo = int(x)
except: except:
if not silent: if not silent:
error("package version contains non-numeric '"+x+"'") bb.error("package version contains non-numeric '"+x+"'")
__ververify_cache__[myorigval] = 0 __ververify_cache__[myorigval] = 0
return 0 return 0
if not len(myval[-1]): if not len(myval[-1]):
if not silent: if not silent:
error("package version has trailing dot") bb.error("package version has trailing dot")
__ververify_cache__[myorigval] = 0 __ververify_cache__[myorigval] = 0
return 0 return 0
try: try:
@ -880,7 +880,7 @@ def ververify(myorigval,silent=1):
ep=string.split(myval[-1],"_") ep=string.split(myval[-1],"_")
if len(ep)!= 2: if len(ep)!= 2:
if not silent: if not silent:
error("package version has more than one letter at then end") bb.error("package version has more than one letter at then end")
__ververify_cache__[myorigval] = 0 __ververify_cache__[myorigval] = 0
return 0 return 0
try: try:
@ -888,7 +888,7 @@ def ververify(myorigval,silent=1):
except: except:
# this needs to be numeric, i.e. the "1" in "1_alpha" # this needs to be numeric, i.e. the "1" in "1_alpha"
if not silent: if not silent:
error("package version must have numeric part before the '_'") bb.error("package version must have numeric part before the '_'")
__ververify_cache__[myorigval] = 0 __ververify_cache__[myorigval] = 0
return 0 return 0
@ -907,7 +907,7 @@ def ververify(myorigval,silent=1):
# if no _package_weights_ work, *then* we return 0 # if no _package_weights_ work, *then* we return 0
pass pass
if not silent: if not silent:
error("package version extension after '_' is invalid") bb.error("package version extension after '_' is invalid")
__ververify_cache__[myorigval] = 0 __ververify_cache__[myorigval] = 0
return 0 return 0
@ -962,13 +962,13 @@ def pkgsplit(mypkg, silent=1):
myparts = string.split(mypkg,'-') myparts = string.split(mypkg,'-')
if len(myparts) < 2: if len(myparts) < 2:
if not silent: if not silent:
error("package name without name or version part") bb.error("package name without name or version part")
__pkgsplit_cache__[mypkg] = None __pkgsplit_cache__[mypkg] = None
return None return None
for x in myparts: for x in myparts:
if len(x) == 0: if len(x) == 0:
if not silent: if not silent:
error("package name with empty name or version part") bb.error("package name with empty name or version part")
__pkgsplit_cache__[mypkg] = None __pkgsplit_cache__[mypkg] = None
return None return None
# verify rev # verify rev
@ -1008,7 +1008,7 @@ def pkgsplit(mypkg, silent=1):
else: else:
for x in myparts[:-1]: for x in myparts[:-1]:
if ververify(x): if ververify(x):
if not silent: error("package name has multiple version parts") if not silent: bb.error("package name has multiple version parts")
__pkgsplit_cache__[mypkg] = None __pkgsplit_cache__[mypkg] = None
return None return None
myval = [string.join(myparts[:-1],"-"), myparts[-1],"r0"] myval = [string.join(myparts[:-1],"-"), myparts[-1],"r0"]
@ -1127,7 +1127,7 @@ def dep_opconvert(mysplit, myuse):
try: try:
mynew = dep_opconvert(mysplit[mypos+1],myuse) mynew = dep_opconvert(mysplit[mypos+1],myuse)
except Exception, e: except Exception, e:
error("unable to satisfy OR dependancy: " + string.join(mysplit," || ")) bb.error("unable to satisfy OR dependancy: " + string.join(mysplit," || "))
raise e raise e
mynew[0:0] = ["||"] mynew[0:0] = ["||"]
newsplit.append(mynew) newsplit.append(mynew)