diff options
Diffstat (limited to 'bitbake/lib/bb/utils.py')
-rw-r--r-- | bitbake/lib/bb/utils.py | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py index 9776c48245..9a17c92414 100644 --- a/bitbake/lib/bb/utils.py +++ b/bitbake/lib/bb/utils.py | |||
@@ -23,7 +23,7 @@ digits = "0123456789" | |||
23 | ascii_letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" | 23 | ascii_letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" |
24 | separators = ".-" | 24 | separators = ".-" |
25 | 25 | ||
26 | import re, fcntl, os, types | 26 | import re, fcntl, os, types, bb |
27 | 27 | ||
28 | def explode_version(s): | 28 | def explode_version(s): |
29 | r = [] | 29 | r = [] |
@@ -435,10 +435,10 @@ def mkdirhier(dir): | |||
435 | directory already exists like os.makedirs | 435 | directory already exists like os.makedirs |
436 | """ | 436 | """ |
437 | 437 | ||
438 | debug(3, "mkdirhier(%s)" % dir) | 438 | bb.debug(3, "mkdirhier(%s)" % dir) |
439 | try: | 439 | try: |
440 | os.makedirs(dir) | 440 | os.makedirs(dir) |
441 | debug(2, "created " + dir) | 441 | bb.debug(2, "created " + dir) |
442 | except OSError, e: | 442 | except OSError, e: |
443 | if e.errno != 17: raise e | 443 | if e.errno != 17: raise e |
444 | 444 | ||
@@ -832,32 +832,32 @@ def ververify(myorigval,silent=1): | |||
832 | 832 | ||
833 | if len(myorigval) == 0: | 833 | if len(myorigval) == 0: |
834 | if not silent: | 834 | if not silent: |
835 | error("package version is empty") | 835 | bb.error("package version is empty") |
836 | __ververify_cache__[myorigval] = 0 | 836 | __ververify_cache__[myorigval] = 0 |
837 | return 0 | 837 | return 0 |
838 | myval = myorigval.split('.') | 838 | myval = myorigval.split('.') |
839 | if len(myval)==0: | 839 | if len(myval)==0: |
840 | if not silent: | 840 | if not silent: |
841 | error("package name has empty version string") | 841 | bb.error("package name has empty version string") |
842 | __ververify_cache__[myorigval] = 0 | 842 | __ververify_cache__[myorigval] = 0 |
843 | return 0 | 843 | return 0 |
844 | # all but the last version must be a numeric | 844 | # all but the last version must be a numeric |
845 | for x in myval[:-1]: | 845 | for x in myval[:-1]: |
846 | if not len(x): | 846 | if not len(x): |
847 | if not silent: | 847 | if not silent: |
848 | error("package version has two points in a row") | 848 | bb.error("package version has two points in a row") |
849 | __ververify_cache__[myorigval] = 0 | 849 | __ververify_cache__[myorigval] = 0 |
850 | return 0 | 850 | return 0 |
851 | try: | 851 | try: |
852 | foo = int(x) | 852 | foo = int(x) |
853 | except: | 853 | except: |
854 | if not silent: | 854 | if not silent: |
855 | error("package version contains non-numeric '"+x+"'") | 855 | bb.error("package version contains non-numeric '"+x+"'") |
856 | __ververify_cache__[myorigval] = 0 | 856 | __ververify_cache__[myorigval] = 0 |
857 | return 0 | 857 | return 0 |
858 | if not len(myval[-1]): | 858 | if not len(myval[-1]): |
859 | if not silent: | 859 | if not silent: |
860 | error("package version has trailing dot") | 860 | bb.error("package version has trailing dot") |
861 | __ververify_cache__[myorigval] = 0 | 861 | __ververify_cache__[myorigval] = 0 |
862 | return 0 | 862 | return 0 |
863 | try: | 863 | try: |
@@ -880,7 +880,7 @@ def ververify(myorigval,silent=1): | |||
880 | ep=string.split(myval[-1],"_") | 880 | ep=string.split(myval[-1],"_") |
881 | if len(ep)!= 2: | 881 | if len(ep)!= 2: |
882 | if not silent: | 882 | if not silent: |
883 | error("package version has more than one letter at then end") | 883 | bb.error("package version has more than one letter at then end") |
884 | __ververify_cache__[myorigval] = 0 | 884 | __ververify_cache__[myorigval] = 0 |
885 | return 0 | 885 | return 0 |
886 | try: | 886 | try: |
@@ -888,7 +888,7 @@ def ververify(myorigval,silent=1): | |||
888 | except: | 888 | except: |
889 | # this needs to be numeric, i.e. the "1" in "1_alpha" | 889 | # this needs to be numeric, i.e. the "1" in "1_alpha" |
890 | if not silent: | 890 | if not silent: |
891 | error("package version must have numeric part before the '_'") | 891 | bb.error("package version must have numeric part before the '_'") |
892 | __ververify_cache__[myorigval] = 0 | 892 | __ververify_cache__[myorigval] = 0 |
893 | return 0 | 893 | return 0 |
894 | 894 | ||
@@ -907,7 +907,7 @@ def ververify(myorigval,silent=1): | |||
907 | # if no _package_weights_ work, *then* we return 0 | 907 | # if no _package_weights_ work, *then* we return 0 |
908 | pass | 908 | pass |
909 | if not silent: | 909 | if not silent: |
910 | error("package version extension after '_' is invalid") | 910 | bb.error("package version extension after '_' is invalid") |
911 | __ververify_cache__[myorigval] = 0 | 911 | __ververify_cache__[myorigval] = 0 |
912 | return 0 | 912 | return 0 |
913 | 913 | ||
@@ -962,13 +962,13 @@ def pkgsplit(mypkg, silent=1): | |||
962 | myparts = string.split(mypkg,'-') | 962 | myparts = string.split(mypkg,'-') |
963 | if len(myparts) < 2: | 963 | if len(myparts) < 2: |
964 | if not silent: | 964 | if not silent: |
965 | error("package name without name or version part") | 965 | bb.error("package name without name or version part") |
966 | __pkgsplit_cache__[mypkg] = None | 966 | __pkgsplit_cache__[mypkg] = None |
967 | return None | 967 | return None |
968 | for x in myparts: | 968 | for x in myparts: |
969 | if len(x) == 0: | 969 | if len(x) == 0: |
970 | if not silent: | 970 | if not silent: |
971 | error("package name with empty name or version part") | 971 | bb.error("package name with empty name or version part") |
972 | __pkgsplit_cache__[mypkg] = None | 972 | __pkgsplit_cache__[mypkg] = None |
973 | return None | 973 | return None |
974 | # verify rev | 974 | # verify rev |
@@ -1008,7 +1008,7 @@ def pkgsplit(mypkg, silent=1): | |||
1008 | else: | 1008 | else: |
1009 | for x in myparts[:-1]: | 1009 | for x in myparts[:-1]: |
1010 | if ververify(x): | 1010 | if ververify(x): |
1011 | if not silent: error("package name has multiple version parts") | 1011 | if not silent: bb.error("package name has multiple version parts") |
1012 | __pkgsplit_cache__[mypkg] = None | 1012 | __pkgsplit_cache__[mypkg] = None |
1013 | return None | 1013 | return None |
1014 | myval = [string.join(myparts[:-1],"-"), myparts[-1],"r0"] | 1014 | myval = [string.join(myparts[:-1],"-"), myparts[-1],"r0"] |
@@ -1127,7 +1127,7 @@ def dep_opconvert(mysplit, myuse): | |||
1127 | try: | 1127 | try: |
1128 | mynew = dep_opconvert(mysplit[mypos+1],myuse) | 1128 | mynew = dep_opconvert(mysplit[mypos+1],myuse) |
1129 | except Exception, e: | 1129 | except Exception, e: |
1130 | error("unable to satisfy OR dependancy: " + string.join(mysplit," || ")) | 1130 | bb.error("unable to satisfy OR dependancy: " + string.join(mysplit," || ")) |
1131 | raise e | 1131 | raise e |
1132 | mynew[0:0] = ["||"] | 1132 | mynew[0:0] = ["||"] |
1133 | newsplit.append(mynew) | 1133 | newsplit.append(mynew) |