From 7bacc66cf2b8fa3469cfac7f5e658dc0278ab386 Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Sat, 18 Sep 2004 06:12:07 +0000 Subject: Add -n/--name option to oeimage, to allow us to force the IMAGE_NAME and thereby ensure it is what we expect it to be. --- bin/oeimage | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/oeimage b/bin/oeimage index fc848096e..3498ecddb 100644 --- a/bin/oeimage +++ b/bin/oeimage @@ -19,6 +19,7 @@ def usage(): print "" print " %s\t\t%s" % ("-r [arg], --root [arg]", "root directory (default=${IMAGE_ROOTFS})") print " %s\t\t%s" % ("-t [arg], --type [arg]", "image type (jffs2[default], cramfs)") + print " %s\t\t%s" % ("-n [arg], --name [arg]", "image name (override IMAGE_NAME variable)") print " %s\t\t%s" % ("-v, --version", "output version information and exit") sys.exit(0) @@ -39,7 +40,7 @@ def getopthash(l): import getopt try: - (opts, args) = getopt.getopt(sys.argv[1:], 'vr:t:e:', [ 'version', 'root=', 'type=', 'oefile=' ]) + (opts, args) = getopt.getopt(sys.argv[1:], 'vr:t:e:n:', [ 'version', 'root=', 'type=', 'oefile=', 'name=' ]) except getopt.GetoptError: usage() @@ -102,6 +103,11 @@ data.setVar('OVERRIDES', '%s:%s' % (overrides, type), localdata) data.update_data(localdata) data.setVar('OVERRIDES', overrides, localdata) +if '-n' in opthash: + data.setVar('IMAGE_NAME', opthash['-n'], localdata) +if '--name' in opthash: + data.setVar('IMAGE_NAME', opthash['--name'], localdata) + topdir = data.getVar('TOPDIR', localdata, 1) or os.getcwd() cmd = data.getVar('IMAGE_CMD', localdata, 1) -- cgit 1.2.3-korg