diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-10-29 15:21:52 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-10-29 15:24:07 +0000 |
commit | d69931da48b9cc5082feb46c654b9861f30244d9 (patch) | |
tree | d3466ef7df9a3e8e13673df4e301935659211871 /scripts | |
parent | 76751a03b1475f22499c488395274453096b9c38 (diff) | |
download | poky-d69931da48b9cc5082feb46c654b9861f30244d9.tar.gz |
scripts/oe-pkgdata-util: fix global name 'debug' is not defined
This global variable is no longer present, so pass in the value
specified via the command line.
(From OE-Core rev: fa90f92e52330a9bf5836c0832412af0927b19a9)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/oe-pkgdata-util | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/scripts/oe-pkgdata-util b/scripts/oe-pkgdata-util index 80cacc5b66..17e946e1e4 100755 --- a/scripts/oe-pkgdata-util +++ b/scripts/oe-pkgdata-util | |||
@@ -28,8 +28,7 @@ import re | |||
28 | import optparse | 28 | import optparse |
29 | from collections import defaultdict | 29 | from collections import defaultdict |
30 | 30 | ||
31 | 31 | def glob(args, usage, debug=False): | |
32 | def glob(args, usage): | ||
33 | if len(args) < 3: | 32 | if len(args) < 3: |
34 | usage() | 33 | usage() |
35 | sys.exit(1) | 34 | sys.exit(1) |
@@ -148,7 +147,7 @@ def glob(args, usage): | |||
148 | 147 | ||
149 | print("\n".join(mappedpkgs)) | 148 | print("\n".join(mappedpkgs)) |
150 | 149 | ||
151 | def read_value(args, usage): | 150 | def read_value(args, usage, debug=False): |
152 | if len(args) < 3: | 151 | if len(args) < 3: |
153 | usage() | 152 | usage() |
154 | sys.exit(1) | 153 | sys.exit(1) |
@@ -187,7 +186,7 @@ def read_value(args, usage): | |||
187 | qvar = "%s_%s" % (var, mappedpkg) | 186 | qvar = "%s_%s" % (var, mappedpkg) |
188 | print(readvar(revlink, qvar)) | 187 | print(readvar(revlink, qvar)) |
189 | 188 | ||
190 | def lookup_pkg(args, usage): | 189 | def lookup_pkg(args, usage, debug=False): |
191 | if len(args) < 2: | 190 | if len(args) < 2: |
192 | usage() | 191 | usage() |
193 | sys.exit(1) | 192 | sys.exit(1) |
@@ -219,7 +218,7 @@ def lookup_pkg(args, usage): | |||
219 | items.extend(mappings.get(pkg, [])) | 218 | items.extend(mappings.get(pkg, [])) |
220 | print '\n'.join(items) | 219 | print '\n'.join(items) |
221 | 220 | ||
222 | def lookup_recipe(args, usage): | 221 | def lookup_recipe(args, usage, debug=False): |
223 | if len(args) < 2: | 222 | if len(args) < 2: |
224 | usage() | 223 | usage() |
225 | sys.exit(1) | 224 | sys.exit(1) |
@@ -251,7 +250,7 @@ def lookup_recipe(args, usage): | |||
251 | items.extend(mappings.get(pkg, [])) | 250 | items.extend(mappings.get(pkg, [])) |
252 | print '\n'.join(items) | 251 | print '\n'.join(items) |
253 | 252 | ||
254 | def find_path(args, usage): | 253 | def find_path(args, usage, debug=False): |
255 | if len(args) < 2: | 254 | if len(args) < 2: |
256 | usage() | 255 | usage() |
257 | sys.exit(1) | 256 | sys.exit(1) |
@@ -306,7 +305,7 @@ Available commands: | |||
306 | 305 | ||
307 | parser.add_option("-d", "--debug", | 306 | parser.add_option("-d", "--debug", |
308 | help = "Report all SRCREV values, not just ones where AUTOREV has been used", | 307 | help = "Report all SRCREV values, not just ones where AUTOREV has been used", |
309 | action="store_true", dest="debug") | 308 | action="store_true", dest="debug", default=False) |
310 | 309 | ||
311 | options, args = parser.parse_args(sys.argv) | 310 | options, args = parser.parse_args(sys.argv) |
312 | args = args[1:] | 311 | args = args[1:] |
@@ -316,15 +315,15 @@ Available commands: | |||
316 | sys.exit(1) | 315 | sys.exit(1) |
317 | 316 | ||
318 | if args[0] == "glob": | 317 | if args[0] == "glob": |
319 | glob(args[1:], parser.print_help) | 318 | glob(args[1:], parser.print_help, options.debug) |
320 | elif args[0] == "lookup-pkg": | 319 | elif args[0] == "lookup-pkg": |
321 | lookup_pkg(args[1:], parser.print_help) | 320 | lookup_pkg(args[1:], parser.print_help, options.debug) |
322 | elif args[0] == "lookup-recipe": | 321 | elif args[0] == "lookup-recipe": |
323 | lookup_recipe(args[1:], parser.print_help) | 322 | lookup_recipe(args[1:], parser.print_help, options.debug) |
324 | elif args[0] == "find-path": | 323 | elif args[0] == "find-path": |
325 | find_path(args[1:], parser.print_help) | 324 | find_path(args[1:], parser.print_help, options.debug) |
326 | elif args[0] == "read-value": | 325 | elif args[0] == "read-value": |
327 | read_value(args[1:], parser.print_help) | 326 | read_value(args[1:], parser.print_help, options.debug) |
328 | else: | 327 | else: |
329 | parser.print_help() | 328 | parser.print_help() |
330 | sys.exit(1) | 329 | sys.exit(1) |