if len(mysplit) > 4 and mysplit[0] in portage.const.MANIFEST2_IDENTIFIERS:
mytype = mysplit[0]
myname = mysplit[1]
- mysize = int(mysplit[2])
+ try:
+ mysize = int(mysplit[2])
+ except ValueError:
+ return None
myhashes = dict(zip(mysplit[3::2], mysplit[4::2]))
myhashes["size"] = mysize
myentry = Manifest2Entry(type=mytype, name=myname, hashes=myhashes)
setconfigpaths.append(os.path.join(settings["PORTAGE_CONFIGROOT"],
USER_CONFIG_PATH, "sets.conf"))
return SetConfig(setconfigpaths, settings, trees)
-
-# adhoc test code
-if __name__ == "__main__":
- import portage
- sc = load_default_config(portage.settings, portage.db["/"])
- l, e = sc.getSets()
- for x in l:
- print(x+":")
- print("DESCRIPTION = %s" % l[x].getMetadata("Description"))
- for n in sorted(l[x].getAtoms()):
- print("- "+n)
- print()
return ("'%s'" % m.group(1)) + \
" call should be moved to src_prepare from line: %d"
+class BuiltWithUse(LineCheck):
+ repoman_check_name = 'ebuild.minorsyn'
+ ignore_line = re.compile(r'^\s*#')
+ re = re.compile('^.*built_with_use')
+ error = errors.BUILT_WITH_USE
+
# EAPI-4 checks
class Eapi4IncompatibleFuncs(LineCheck):
repoman_check_name = 'EAPI.incompatible'
return ("variable '$%s'" % m.group(1)) + \
" is gone in EAPI=4 on line: %d"
-
_constant_checks = tuple((c() for c in (
EbuildHeader, EbuildWhitespace, EbuildBlankLine, EbuildQuote,
EbuildAssignment, EbuildUselessDodoc,
IUseUndefined, InheritAutotools,
EMakeParallelDisabled, EMakeParallelDisabledViaMAKEOPTS, NoAsNeeded,
DeprecatedBindnowFlags, SrcUnpackPatches, WantAutoDefaultValue,
- SrcCompileEconf, Eapi4IncompatibleFuncs, Eapi4GoneVars)))
+ SrcCompileEconf, Eapi4IncompatibleFuncs, Eapi4GoneVars, BuiltWithUse)))
_here_doc_re = re.compile(r'.*\s<<[-]?(\w+)$')