for BOSS, the baseurl in zypp repo file should be corrected.
to enable it, append the option like below:
--repourl="Tizen-main=http://download.example.com/x/y/z/"
--repourl="Tizen-base=http://download.example.com/z/y/x/"
Signed-off-by: Gui Chen <gui.chen@intel.com>
Change-Id: I9e7d395de15fed6b8f89899ff0721d3eb515ff45
"proxy": None,
"no_proxy": None,
"copy_kernel": False,
+ "repourl": {},
},
'chroot': {
"saveto": None,
dest='copy_kernel',
help='Copy kernel files from image /boot directory'
' to the image output directory.')
+ optparser.add_option('', '--repourl', action='append',
+ dest='repourl', default=[],
+ help=SUPPRESS_HELP)
return optparser
def preoptparse(self, argv):
if self.options.copy_kernel:
configmgr.create['copy_kernel'] = self.options.copy_kernel
+ if self.options.repourl:
+ for item in self.options.repourl:
+ try:
+ key, val = item.split('=')
+ except:
+ continue
+ configmgr.create['repourl'][key] = val
+
def main(self, argv=None):
if argv is None:
argv = sys.argv
self.target_arch = "noarch"
self._local_pkgs_path = None
self.pack_to = None
+ self.repourl = {}
# If the kernel is save to the destdir when copy_kernel cmd is called.
self._need_copy_kernel = False
kickstart.RPMMacroConfig(self._instroot).apply(self.ks)
kickstart.DesktopConfig(self._instroot).apply(ksh.desktop)
self.__save_repo_keys(repodata)
- kickstart.MoblinRepoConfig(self._instroot).apply(ksh.repo, repodata)
+ kickstart.MoblinRepoConfig(self._instroot).apply(ksh.repo, repodata, self.repourl)
except:
msger.warning("Failed to apply configuration to image")
raise
f.close()
@apply_wrapper
- def apply(self, ksrepo, repodata):
+ def apply(self, ksrepo, repodata, repourl):
for repo in ksrepo.repoList:
+ if repo.name in repourl:
+ repo.baseurl = repourl[repo.name]
if repo.save:
#self.__create_repo_file(repo, "/etc/yum.repos.d")
self.__create_repo_file(repo, "/etc/zypp/repos.d")