diff --git a/src/bin/pungi.py b/src/bin/pungi.py index 6455342c..2fe5e7d6 100755 --- a/src/bin/pungi.py +++ b/src/bin/pungi.py @@ -81,6 +81,8 @@ def main(): config.set('pungi', 'alldeps', "False") if opts.isfinal: config.set('pungi', 'isfinal', "True") + if opts.nohash: + config.set('pungi', 'nohash', "True") # Actually do work. mypungi = pypungi.Pungi(config, ksparser) @@ -190,6 +192,8 @@ if __name__ == '__main__': help='Force reuse of an existing destination directory (will overwrite files)') parser.add_option("--isfinal", default=False, action="store_true", help='Specify this is a GA tree, which causes betanag to be turned off during install') + parser.add_option("--nohash", default=False, action="store_true", + help='disable hashing the Packages trees') parser.add_option("-c", "--config", dest="config", help='Path to kickstart config file') diff --git a/src/pypungi/__init__.py b/src/pypungi/__init__.py index 1ef3b8d2..5d79fe7c 100644 --- a/src/pypungi/__init__.py +++ b/src/pypungi/__init__.py @@ -668,7 +668,11 @@ class Pungi(pypungi.PungiBase): basename = os.path.basename(po.relativepath) local = po.localPkg() - target = os.path.join(pkgdir, basename) + nohash = self.config.get('pungi', 'nohash') + if nohash: + target = os.path.join(pkgdir, basename) + else: + target = os.path.join(pkgdir, po.name[0].lower(), basename) # Link downloaded package in (or link package from file repo) try: