summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHaris Okanovic <haris.okanovic@ni.com>2015-05-21 18:27:30 -0500
committerAlejandro del Castillo <alejandro.delcastillo@ni.com>2015-09-29 10:48:18 -0500
commite022fd082ecdc3b7d993fcadd5f4625f5c1d97ea (patch)
treeee50dcd19f1ffdbc3c579a386f47f68c7b5a03b6
parent53274f087565fd45d8452c5367997ba6a682a37a (diff)
downloadopkg-utils-e022fd082ecdc3b7d993fcadd5f4625f5c1d97ea.tar.gz
opkg-utils-e022fd082ecdc3b7d993fcadd5f4625f5c1d97ea.tar.bz2
opkg-utils-e022fd082ecdc3b7d993fcadd5f4625f5c1d97ea.zip
opkg-utils: Fix crash on dependency error
Fix crash on exception in opkg-show-deps when generating an 'unsatisfied dependency' error. process_dep() function was referencing a missing parameter `pkg`. Signed-off-by: Haris Okanovic <haris.okanovic@ni.com> Acked-by: Brad Mouring <brad.mouring@ni.com> Cc: Alejandro del Castillo <alejandro.delcastillo@ni.com> Cc: Paul Barker <paul@paulbarker.me.uk> Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
-rwxr-xr-xopkg-show-deps4
1 files changed, 2 insertions, 2 deletions
diff --git a/opkg-show-deps b/opkg-show-deps
index 3c3be6a..4694579 100755
--- a/opkg-show-deps
+++ b/opkg-show-deps
@@ -58,7 +58,7 @@ def find_package(name):
return provider_hash[name]
return None
-def process_dep(dep):
+def process_dep(pkg, dep):
# Add a provider of the given dependency to the list of required packages
# unless a provider is already present in this list.
dep = re.sub("\s*\(.*\)", "", dep)
@@ -83,7 +83,7 @@ def recurse(pkg):
if pkg.depends:
deps = split_list(pkg.depends)
for dep in deps:
- process_dep(dep)
+ process_dep(pkg, dep)
for root in remaining_args:
pkgs = find_package(root)