@ -721,11 +721,18 @@ def read_sources_file(filename, sources=None, intern=sys.intern):
section = get_field ( ' Section ' )
section = get_field ( ' Section ' )
if section :
if section :
section = intern ( section . strip ( ) )
section = intern ( section . strip ( ) )
build_deps_arch = " , " . join ( x for x in ( get_field ( ' Build-Depends ' ) , get_field ( ' Build-Depends-Arch ' ) )
if x is not None )
if build_deps_arch != ' ' :
build_deps_arch = sys . intern ( build_deps_arch )
else :
build_deps_arch = None
sources [ intern ( pkg ) ] = SourcePackage ( intern ( ver ) ,
sources [ intern ( pkg ) ] = SourcePackage ( intern ( ver ) ,
section ,
section ,
[ ] ,
[ ] ,
maint ,
maint ,
False ,
False ,
build_deps_arch ,
)
)
return sources
return sources
@ -789,14 +796,17 @@ def invalidate_excuses(excuses, valid, invalid):
# build the reverse dependencies
# build the reverse dependencies
revdeps = defaultdict ( list )
revdeps = defaultdict ( list )
revbuilddeps = defaultdict ( list )
for exc in excuses . values ( ) :
for exc in excuses . values ( ) :
for d in exc . deps :
for d in exc . deps :
revdeps [ d ] . append ( exc . name )
revdeps [ d ] . append ( exc . name )
for d in exc . arch_build_deps :
revbuilddeps [ d ] . append ( exc . name )
# loop on the invalid excuses
# loop on the invalid excuses
for ename in iter_except ( invalid . pop , KeyError ) :
for ename in iter_except ( invalid . pop , KeyError ) :
# if there is no reverse dependency, skip the item
# if there is no reverse dependency, skip the item
if ename not in revdeps :
if ename not in revdeps and ename not in revbuilddeps :
continue
continue
# if the dependency can be satisfied by a testing-proposed-updates excuse, skip the item
# if the dependency can be satisfied by a testing-proposed-updates excuse, skip the item
if ( ename + " _tpu " ) in valid :
if ( ename + " _tpu " ) in valid :
@ -807,11 +817,10 @@ def invalidate_excuses(excuses, valid, invalid):
rdep_verdict = PolicyVerdict . REJECTED_BLOCKED_BY_ANOTHER_ITEM
rdep_verdict = PolicyVerdict . REJECTED_BLOCKED_BY_ANOTHER_ITEM
# loop on the reverse dependencies
# loop on the reverse dependencies
if ename in revdeps :
for x in revdeps [ ename ] :
for x in revdeps [ ename ] :
if x in valid :
# if the item is valid and it is not marked as `forced', then we invalidate it
# if the item is valid and it is marked as `forced', skip the item
if x in valid and not excuses [ x ] . forced :
if excuses [ x ] . forced :
continue
# otherwise, invalidate the dependency and mark as invalidated and
# otherwise, invalidate the dependency and mark as invalidated and
# remove the depending excuses
# remove the depending excuses
@ -823,6 +832,20 @@ def invalidate_excuses(excuses, valid, invalid):
if excuses [ x ] . policy_verdict . value < rdep_verdict . value :
if excuses [ x ] . policy_verdict . value < rdep_verdict . value :
excuses [ x ] . policy_verdict = rdep_verdict
excuses [ x ] . policy_verdict = rdep_verdict
if ename in revbuilddeps :
for x in revbuilddeps [ ename ] :
# if the item is valid and it is not marked as `forced', then we invalidate it
if x in valid and not excuses [ x ] . forced :
# otherwise, invalidate the dependency and mark as invalidated and
# remove the depending excuses
excuses [ x ] . invalidate_build_dep ( ename )
valid . discard ( x )
invalid . add ( x )
excuses [ x ] . addhtml ( " Invalidated by build-dependency " )
if excuses [ x ] . policy_verdict . value < rdep_verdict . value :
excuses [ x ] . policy_verdict = rdep_verdict
def compile_nuninst ( binaries_t , inst_tester , architectures , nobreakall_arches ) :
def compile_nuninst ( binaries_t , inst_tester , architectures , nobreakall_arches ) :
""" Compile a nuninst dict from the current testing
""" Compile a nuninst dict from the current testing