optparser.add_option('', '--local-pkgs-path', type='string', dest='local_pkgs_path', default=None, help='Path for local pkgs(rpms) to be installed')
optparser.add_option('', '--logfile', type='string', dest='logfile', default=None, help='Path of logfile')
optparser.add_option('', '--release', type='string', dest='release', default=None, help='Generate release package')
+ optparser.add_option('-A', '--arch', type='string', dest='arch', default=None, help='Specify repo architecture')
return optparser
def preoptparse(self, argv):
if self.options.release:
self.configmgr.create['release'] = self.options.release
+ if self.options.arch is not None:
+ self.configmgr.create['arch'] = self.options.arch
+
if self.options.logfile:
msger.set_interactive(False)
msger.set_logfile(self.options.logfile)
self.destdir = createopts['outdir']
- self.arch = createopts['arch']
+ target_arch = createopts['arch']
self._local_pkgs_path = createopts['local_pkgs_path']
else:
self.tmpdir = "/var/tmp/mic"
self.cachedir = "/var/tmp/mic/cache"
self.destdir = "."
- self.arch = "noarch"
+ target_arch = "noarch"
self._local_pkgs_path = None
self.__builddir = None
self._dep_checks.append("mkfs.btrfs")
break
- # make sure arch available
- if not self.arch:
- raise CreatorError("Architecture for creator is not available")
- if self.arch.startswith("arm"):
- if not self.set_target_arch(self.arch):
- raise CreatorError("Architecture %s is not support" % self.arch)
+ if target_arch.startswith("arm"):
+ if not self.set_target_arch(target_arch):
+ raise CreatorError('arch "%s" can not be supported' % target_arch)
else:
self.target_arch = None
- print self.arch, self.target_arch
# make sure the specified tmpdir and cachedir exist
if not os.path.exists(self.tmpdir):
vdso_fh.close()
if (int)(vdso_value) == 1:
msger.warning("vdso is enabled on your host, which might cause problems with arm emulations.\n"
- "\tYou can disable vdso with following command before starting image build:\n"
- "\techo 0 | sudo tee /proc/sys/vm/vdso_enabled")
+ "\tYou can disable vdso with following command before starting image build:\n"
+ "\techo 0 | sudo tee /proc/sys/vm/vdso_enabled")
return True