diff options
Diffstat (limited to 'scripts/opkg-query-helper.py')
| -rwxr-xr-x | scripts/opkg-query-helper.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/scripts/opkg-query-helper.py b/scripts/opkg-query-helper.py index b52284b325..ce89491f60 100755 --- a/scripts/opkg-query-helper.py +++ b/scripts/opkg-query-helper.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # OpenEmbedded opkg query helper utility # @@ -28,6 +28,7 @@ import re archmode = False filemode = False +vermode = False args = [] for arg in sys.argv[1:]: @@ -35,6 +36,8 @@ for arg in sys.argv[1:]: archmode = True elif arg == '-f': filemode = True + elif arg == '-v': + vermode = True else: args.append(arg) @@ -59,7 +62,13 @@ for line in fileinput.input(args): ver = line.split(": ")[1] elif line.startswith("Architecture:"): arch = line.split(": ")[1] - print("%s %s_%s_%s.ipk" % (pkg,pkg,ver,arch)) + print("%s %s_%s_%s.ipk %s" % (pkg,pkg,ver,arch,arch)) + elif vermode: + if line.startswith("Version:"): + ver = line.split(": ")[1] + elif line.startswith("Architecture:"): + arch = line.split(": ")[1] + print("%s %s %s" % (pkg,arch,ver)) else: if line.startswith("Depends:"): depval = line.split(": ")[1] |
