aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAmanda Brindle <amanda.r.brindle@intel.com>2018-01-23 12:42:37 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-29 08:49:42 +0000
commit3d2c87c4f4115b01534ab198c27682c7e4c5f31f (patch)
tree586cb1acecea437956fdbb595885c0158e7b060d /scripts
parenta4c1ede6876ad6b84ab2b3bece14bf0afdc9d6b7 (diff)
downloadopenembedded-core-3d2c87c4f4115b01534ab198c27682c7e4c5f31f.tar.gz
openembedded-core-3d2c87c4f4115b01534ab198c27682c7e4c5f31f.tar.bz2
openembedded-core-3d2c87c4f4115b01534ab198c27682c7e4c5f31f.zip
oe-pkgdata-util: Include colon when searching for variables
When searching for variables, include colon to ensure the script doesn't find a variable that starts with the same name. Signed-off-by: Amanda Brindle <amanda.r.brindle@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/oe-pkgdata-util16
1 files changed, 8 insertions, 8 deletions
diff --git a/scripts/oe-pkgdata-util b/scripts/oe-pkgdata-util
index 040854f644..78b3d7bcb8 100755
--- a/scripts/oe-pkgdata-util
+++ b/scripts/oe-pkgdata-util
@@ -256,7 +256,7 @@ def lookup_recipe(args):
with open(pkgdatafile, 'r') as f:
found = False
for line in f:
- if line.startswith('PN'):
+ if line.startswith('PN:'):
print("%s" % line.split(':', 1)[1].strip())
found = True
break
@@ -292,19 +292,19 @@ def package_info(args):
pe = ''
pr = ''
for line in f:
- if line.startswith('PKGV'):
+ if line.startswith('PKGV:'):
pkg_version = line.split(':', 1)[1].strip()
- elif line.startswith('PKGE'):
+ elif line.startswith('PKGE:'):
pkge = line.split(':', 1)[1].strip()
- elif line.startswith('PKGR'):
+ elif line.startswith('PKGR:'):
pkgr = line.split(':', 1)[1].strip()
- elif line.startswith('PN'):
+ elif line.startswith('PN:'):
recipe = line.split(':', 1)[1].strip()
- elif line.startswith('PV'):
+ elif line.startswith('PV:'):
recipe_version = line.split(':', 1)[1].strip()
- elif line.startswith('PE'):
+ elif line.startswith('PE:'):
pe = line.split(':', 1)[1].strip()
- elif line.startswith('PR'):
+ elif line.startswith('PR:'):
pr = line.split(':', 1)[1].strip()
elif line.startswith('PKGSIZE'):
pkg_size = line.split(':', 1)[1].strip()