pungi-legacy: expose lorax's --rootfs-size argument
Merges: https://pagure.io/pungi/pull-request/1112 Fixes: https://pagure.io/pungi/issue/1107 Signed-off-by: Frédéric Pierret (fepitre) <frederic.pierret@qubes-os.org>
This commit is contained in:
parent
3fe4beb20c
commit
86314fdc83
@ -331,6 +331,11 @@ if __name__ == '__main__':
|
|||||||
help='Which files are the release notes -- GPL EULA')
|
help='Which files are the release notes -- GPL EULA')
|
||||||
parser.add_argument("--nomacboot", action="store_true", dest="nomacboot",
|
parser.add_argument("--nomacboot", action="store_true", dest="nomacboot",
|
||||||
help='disable setting up macboot as no hfs support ')
|
help='disable setting up macboot as no hfs support ')
|
||||||
|
|
||||||
|
parser.add_argument(
|
||||||
|
"--rootfs-size", dest="rootfs_size", action=SetConfig, default=False,
|
||||||
|
help='Size of root filesystem in GiB. If not specified, use lorax default value')
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--pungirc", dest="pungirc", default='~/.pungirc', action=SetConfig,
|
"--pungirc", dest="pungirc", default='~/.pungirc', action=SetConfig,
|
||||||
help='Read pungi options from config file ')
|
help='Read pungi options from config file ')
|
||||||
|
@ -65,6 +65,7 @@ class Config(SafeConfigParser):
|
|||||||
self.set('pungi', 'resolve_deps', "True")
|
self.set('pungi', 'resolve_deps', "True")
|
||||||
self.set('pungi', 'no_dvd', "False")
|
self.set('pungi', 'no_dvd', "False")
|
||||||
self.set('pungi', 'nomacboot', "False")
|
self.set('pungi', 'nomacboot', "False")
|
||||||
|
self.set('pungi', 'rootfs_size', "False")
|
||||||
|
|
||||||
# if missing, self.read() is a noop, else change 'defaults'
|
# if missing, self.read() is a noop, else change 'defaults'
|
||||||
if pungirc:
|
if pungirc:
|
||||||
|
@ -138,8 +138,6 @@ class PungiBase(object):
|
|||||||
self.config.get('pungi', 'variant'),
|
self.config.get('pungi', 'variant'),
|
||||||
self.tree_arch)
|
self.tree_arch)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def doLoggerSetup(self):
|
def doLoggerSetup(self):
|
||||||
"""Setup our logger"""
|
"""Setup our logger"""
|
||||||
|
|
||||||
@ -302,6 +300,9 @@ class Pungi(PungiBase):
|
|||||||
|
|
||||||
self.fulltree_excludes = set(self.ksparser.handler.fulltree_excludes)
|
self.fulltree_excludes = set(self.ksparser.handler.fulltree_excludes)
|
||||||
|
|
||||||
|
# rootfs image size
|
||||||
|
self.rootfs_size = self.config.get('pungi', 'rootfs_size')
|
||||||
|
|
||||||
def _add_yum_repo(self, name, url, mirrorlist=False, groups=True,
|
def _add_yum_repo(self, name, url, mirrorlist=False, groups=True,
|
||||||
cost=1000, includepkgs=None, excludepkgs=None,
|
cost=1000, includepkgs=None, excludepkgs=None,
|
||||||
proxy=None):
|
proxy=None):
|
||||||
@ -1570,6 +1571,9 @@ class Pungi(PungiBase):
|
|||||||
except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
|
except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
if self.rootfs_size != "False":
|
||||||
|
cmd.extend(["--rootfs-size", self.rootfs_size])
|
||||||
|
|
||||||
# Allow the output directory to exist.
|
# Allow the output directory to exist.
|
||||||
cmd.append("--force")
|
cmd.append("--force")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user