diff --git a/bin/pungi b/bin/pungi index 221a79c0..0a45d178 100755 --- a/bin/pungi +++ b/bin/pungi @@ -331,6 +331,11 @@ if __name__ == '__main__': help='Which files are the release notes -- GPL EULA') parser.add_argument("--nomacboot", action="store_true", dest="nomacboot", 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( "--pungirc", dest="pungirc", default='~/.pungirc', action=SetConfig, help='Read pungi options from config file ') diff --git a/pungi/config.py b/pungi/config.py index 7fd783e0..3c94739c 100644 --- a/pungi/config.py +++ b/pungi/config.py @@ -65,6 +65,7 @@ class Config(SafeConfigParser): self.set('pungi', 'resolve_deps', "True") self.set('pungi', 'no_dvd', "False") self.set('pungi', 'nomacboot', "False") + self.set('pungi', 'rootfs_size', "False") # if missing, self.read() is a noop, else change 'defaults' if pungirc: diff --git a/pungi/gather.py b/pungi/gather.py index 5034cbc7..6c152e58 100644 --- a/pungi/gather.py +++ b/pungi/gather.py @@ -138,8 +138,6 @@ class PungiBase(object): self.config.get('pungi', 'variant'), self.tree_arch) - - def doLoggerSetup(self): """Setup our logger""" @@ -302,6 +300,9 @@ class Pungi(PungiBase): 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, cost=1000, includepkgs=None, excludepkgs=None, proxy=None): @@ -1570,6 +1571,9 @@ class Pungi(PungiBase): except (ConfigParser.NoSectionError, ConfigParser.NoOptionError): pass + if self.rootfs_size != "False": + cmd.extend(["--rootfs-size", self.rootfs_size]) + # Allow the output directory to exist. cmd.append("--force")