mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-29 22:26:31 +00:00
graph-depends: fix handling of "virtual" in exclude_list
The condition to determine if a virtual package should be excluded from the list due to "virtual" being passed in --exclude is under a loop iterating over each entry of the exclude_list, but it doesn't use the iterator of this list. Indeed, the condition contains: "virtual" in exclude_list which checks automatically if "virtual" was passed in the list. Due to this, there is no need for this check to be within the "for p in exclude_list" iteration. This commit fixes that by moving the check outside of the loop. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
7e1eec49a5
commit
7771bb93b2
@ -403,15 +403,14 @@ def print_pkg_deps(depth, pkg):
|
|||||||
return
|
return
|
||||||
if max_depth == 0 or depth < max_depth:
|
if max_depth == 0 or depth < max_depth:
|
||||||
for d in dict_deps[pkg]:
|
for d in dict_deps[pkg]:
|
||||||
|
if dict_version.get(d) == "virtual" \
|
||||||
|
and "virtual" in exclude_list:
|
||||||
|
continue
|
||||||
add = True
|
add = True
|
||||||
for p in exclude_list:
|
for p in exclude_list:
|
||||||
if fnmatch(d,p):
|
if fnmatch(d,p):
|
||||||
add = False
|
add = False
|
||||||
break
|
break
|
||||||
if dict_version.get(d) == "virtual" \
|
|
||||||
and "virtual" in exclude_list:
|
|
||||||
add = False
|
|
||||||
break
|
|
||||||
if add:
|
if add:
|
||||||
outfile.write("%s -> %s\n" % (pkg_node_name(pkg), pkg_node_name(d)))
|
outfile.write("%s -> %s\n" % (pkg_node_name(pkg), pkg_node_name(d)))
|
||||||
print_pkg_deps(depth+1, d)
|
print_pkg_deps(depth+1, d)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user