mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-28 21:56:31 +00:00
graph-depends: rename pkgutil.py to brpkgutil.py
pkgutil.py is also part of Python itself. Placing pkgutil.py as is in a folder with other scripts that require original pkgutil will break them. This is the case with scanpypi. So rename pkgutil.py to brpkgutil.py to avoid naming collision. Fixes: https://bugs.busybox.net/show_bug.cgi?id=9766 Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
00c2133865
commit
3b627c89dc
@ -26,7 +26,7 @@ import subprocess
|
|||||||
import argparse
|
import argparse
|
||||||
from fnmatch import fnmatch
|
from fnmatch import fnmatch
|
||||||
|
|
||||||
import pkgutil
|
import brpkgutil
|
||||||
|
|
||||||
# Modes of operation:
|
# Modes of operation:
|
||||||
MODE_FULL = 1 # draw full dependency graph for all selected packages
|
MODE_FULL = 1 # draw full dependency graph for all selected packages
|
||||||
@ -102,13 +102,13 @@ else:
|
|||||||
transitive = args.transitive
|
transitive = args.transitive
|
||||||
|
|
||||||
if args.direct:
|
if args.direct:
|
||||||
get_depends_func = pkgutil.get_depends
|
get_depends_func = brpkgutil.get_depends
|
||||||
arrow_dir = "forward"
|
arrow_dir = "forward"
|
||||||
else:
|
else:
|
||||||
if mode == MODE_FULL:
|
if mode == MODE_FULL:
|
||||||
sys.stderr.write("--reverse needs a package\n")
|
sys.stderr.write("--reverse needs a package\n")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
get_depends_func = pkgutil.get_rdepends
|
get_depends_func = brpkgutil.get_rdepends
|
||||||
arrow_dir = "back"
|
arrow_dir = "back"
|
||||||
|
|
||||||
# Get the colours: we need exactly three colours,
|
# Get the colours: we need exactly three colours,
|
||||||
@ -330,7 +330,7 @@ if check_only:
|
|||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
dict_deps = remove_extra_deps(dict_deps)
|
dict_deps = remove_extra_deps(dict_deps)
|
||||||
dict_version = pkgutil.get_version([pkg for pkg in allpkgs
|
dict_version = brpkgutil.get_version([pkg for pkg in allpkgs
|
||||||
if pkg != "all" and not pkg.startswith("root")])
|
if pkg != "all" and not pkg.startswith("root")])
|
||||||
|
|
||||||
# Print the attributes of a node: label and fill-color
|
# Print the attributes of a node: label and fill-color
|
||||||
|
Loading…
x
Reference in New Issue
Block a user