Add support for --installpkgs
This allows the user to add specific packages, or package globs, to the installer's root via lorax. For example, to build a server product with the correct product.img you would pass --installpkgs fedora-productimg-server This removes the need for the kickstart to use --exclude on the repo lines and makes it more explicit as to what is being built. This command mirrors the same command in lorax.
This commit is contained in:
parent
2221f66ff5
commit
c4dd0e75ed
@ -11,7 +11,7 @@ URL: https://fedorahosted.org/pungi
|
||||
Source0: https://fedorahosted.org/pungi/attachment/wiki/%{version}/%{name}-%{version}.tar.bz2
|
||||
Requires: createrepo >= 0.4.11
|
||||
Requires: yum => 3.4.3-28
|
||||
Requires: lorax
|
||||
Requires: lorax >= 22.1
|
||||
Requires: repoview
|
||||
Requires: python-lockfile
|
||||
|
||||
|
@ -115,6 +115,8 @@ def main():
|
||||
|
||||
if opts.lorax_conf:
|
||||
config.set("lorax", "conf_file", opts.lorax_conf)
|
||||
if opts.installpkgs:
|
||||
config.set("lorax", "installpkgs", " ".join(opts.installpkgs))
|
||||
|
||||
# Actually do work.
|
||||
mypungi = pypungi.Pungi(config, ksparser)
|
||||
@ -265,6 +267,9 @@ if __name__ == '__main__':
|
||||
help='Do not make a install DVD/CD only the netinstall image and the tree')
|
||||
parser.add_option("--lorax-conf", type="string",
|
||||
help='Path to lorax.conf file (optional)')
|
||||
parser.add_option("-i", "--installpkgs", default=[],
|
||||
action="append", metavar="STRING",
|
||||
help="Package glob for lorax to install before runtime-install.tmpl runs. (may be listed multiple times)")
|
||||
|
||||
parser.add_option("-c", "--config", dest="config",
|
||||
help='Path to kickstart config file')
|
||||
|
@ -1413,9 +1413,14 @@ class Pungi(pypungi.PungiBase):
|
||||
except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
|
||||
lorax.configure()
|
||||
|
||||
try:
|
||||
installpkgs = self.config.get('lorax', 'installpkgs').split(" ")
|
||||
except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
|
||||
installpkgs = None
|
||||
|
||||
lorax.run(self.ayum, product=product, version=version, release=release,
|
||||
variant=variant, bugurl=bugurl, isfinal=isfinal, domacboot=domacboot,
|
||||
workdir=workdir, outputdir=outputdir, volid=volid)
|
||||
workdir=workdir, outputdir=outputdir, volid=volid, installpkgs=installpkgs)
|
||||
|
||||
# write out the tree data for snake
|
||||
self.writeinfo('tree: %s' % self.mkrelative(self.topdir))
|
||||
|
Loading…
Reference in New Issue
Block a user