diff options
author | Chris Larson <clarson@kergoth.com> | 2004-09-18 06:12:07 +0000 |
---|---|---|
committer | Chris Larson <clarson@kergoth.com> | 2004-09-18 06:12:07 +0000 |
commit | 7bacc66cf2b8fa3469cfac7f5e658dc0278ab386 (patch) | |
tree | a3df3462cd4d56bb28cdaaf0deb0dcb23ebc60f9 | |
parent | 0374cbc1df961c1576490a7dbdb19c6f7081aa1a (diff) | |
download | bitbake-7bacc66cf2b8fa3469cfac7f5e658dc0278ab386.tar.gz |
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.
-rw-r--r-- | bin/oeimage | 8 |
1 files changed, 7 insertions, 1 deletions
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) |