Skip to content

Commit

Permalink
Don't create new name value as we have already done one during the co…
Browse files Browse the repository at this point in the history
…nfig and .ks file parsing.

Signed-off-by: Marko Saukko <marko.saukko@cybercom.com>
  • Loading branch information
Marko Saukko committed Dec 15, 2011
1 parent 959f66e commit ec03ff6
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 10 deletions.
8 changes: 6 additions & 2 deletions plugins/imager/fs_plugin.py
Expand Up @@ -51,13 +51,17 @@ def do_create(self, subcmd, opts, *args):
recording_pkgs = []
if len(creatoropts['record_pkgs']) > 0:
recording_pkgs = creatoropts['record_pkgs']

if creatoropts['release'] is not None:
if 'name' not in recording_pkgs:
recording_pkgs.append('name')
ksconf = misc.save_ksconf_file(ksconf, creatoropts['release'])
name = os.path.splitext(os.path.basename(ksconf))[0]
creatoropts['outdir'] = "%s/%s/images/%s/" % (creatoropts['outdir'], creatoropts['release'], name)

configmgr._ksconf = ksconf

# Called After setting the configmgr._ksconf as the creatoropts['name'] is reset there.
if creatoropts['release'] is not None:
creatoropts['outdir'] = "%s/%s/images/%s/" % (creatoropts['outdir'], creatoropts['release'], creatoropts['name'])

# try to find the pkgmgr
pkgmgr = None
Expand Down
8 changes: 6 additions & 2 deletions plugins/imager/livecd_plugin.py
Expand Up @@ -56,13 +56,17 @@ def do_create(self, subcmd, opts, *args):
recording_pkgs = []
if len(creatoropts['record_pkgs']) > 0:
recording_pkgs = creatoropts['record_pkgs']

if creatoropts['release'] is not None:
if 'name' not in recording_pkgs:
recording_pkgs.append('name')
ksconf = misc.save_ksconf_file(ksconf, creatoropts['release'])
name = os.path.splitext(os.path.basename(ksconf))[0]
creatoropts['outdir'] = "%s/%s/images/%s/" % (creatoropts['outdir'], creatoropts['release'], name)

configmgr._ksconf = ksconf

# Called After setting the configmgr._ksconf as the creatoropts['name'] is reset there.
if creatoropts['release'] is not None:
creatoropts['outdir'] = "%s/%s/images/%s/" % (creatoropts['outdir'], creatoropts['release'], creatoropts['name'])

# try to find the pkgmgr
pkgmgr = None
Expand Down
8 changes: 6 additions & 2 deletions plugins/imager/liveusb_plugin.py
Expand Up @@ -58,13 +58,17 @@ def do_create(self, subcmd, opts, *args):
recording_pkgs = []
if len(creatoropts['record_pkgs']) > 0:
recording_pkgs = creatoropts['record_pkgs']

if creatoropts['release'] is not None:
if 'name' not in recording_pkgs:
recording_pkgs.append('name')
ksconf = misc.save_ksconf_file(ksconf, creatoropts['release'])
name = os.path.splitext(os.path.basename(ksconf))[0]
creatoropts['outdir'] = "%s/%s/images/%s/" % (creatoropts['outdir'], creatoropts['release'], name)

configmgr._ksconf = ksconf

# Called After setting the configmgr._ksconf as the creatoropts['name'] is reset there.
if creatoropts['release'] is not None:
creatoropts['outdir'] = "%s/%s/images/%s/" % (creatoropts['outdir'], creatoropts['release'], creatoropts['name'])

# try to find the pkgmgr
pkgmgr = None
Expand Down
8 changes: 6 additions & 2 deletions plugins/imager/loop_plugin.py
Expand Up @@ -53,13 +53,17 @@ def do_create(self, subcmd, opts, *args):
recording_pkgs = []
if len(creatoropts['record_pkgs']) > 0:
recording_pkgs = creatoropts['record_pkgs']

if creatoropts['release'] is not None:
if 'name' not in recording_pkgs:
recording_pkgs.append('name')
ksconf = misc.save_ksconf_file(ksconf, creatoropts['release'])
name = os.path.splitext(os.path.basename(ksconf))[0]
creatoropts['outdir'] = "%s/%s/images/%s/" % (creatoropts['outdir'], creatoropts['release'], name)

configmgr._ksconf = ksconf

# Called After setting the configmgr._ksconf as the creatoropts['name'] is reset there.
if creatoropts['release'] is not None:
creatoropts['outdir'] = "%s/%s/images/%s/" % (creatoropts['outdir'], creatoropts['release'], creatoropts['name'])

# try to find the pkgmgr
pkgmgr = None
Expand Down
8 changes: 6 additions & 2 deletions plugins/imager/raw_plugin.py
Expand Up @@ -55,13 +55,17 @@ def do_create(self, subcmd, opts, *args):
recording_pkgs = []
if len(creatoropts['record_pkgs']) > 0:
recording_pkgs = creatoropts['record_pkgs']

if creatoropts['release'] is not None:
if 'name' not in recording_pkgs:
recording_pkgs.append('name')
ksconf = misc.save_ksconf_file(ksconf, creatoropts['release'])
name = os.path.splitext(os.path.basename(ksconf))[0]
creatoropts['outdir'] = "%s/%s/images/%s/" % (creatoropts['outdir'], creatoropts['release'], name)

configmgr._ksconf = ksconf

# Called After setting the configmgr._ksconf as the creatoropts['name'] is reset there.
if creatoropts['release'] is not None:
creatoropts['outdir'] = "%s/%s/images/%s/" % (creatoropts['outdir'], creatoropts['release'], creatoropts['name'])

# try to find the pkgmgr
pkgmgr = None
Expand Down

0 comments on commit ec03ff6

Please sign in to comment.