hash the Packages tree by default, adding a --nohash option for old style layout

This commit is contained in:
Dennis Gilmore 2012-02-09 09:12:55 -06:00
parent 32eacf5eec
commit 45964282af
2 changed files with 9 additions and 1 deletions

View File

@ -81,6 +81,8 @@ def main():
config.set('pungi', 'alldeps', "False") config.set('pungi', 'alldeps', "False")
if opts.isfinal: if opts.isfinal:
config.set('pungi', 'isfinal', "True") config.set('pungi', 'isfinal', "True")
if opts.nohash:
config.set('pungi', 'nohash', "True")
# Actually do work. # Actually do work.
mypungi = pypungi.Pungi(config, ksparser) mypungi = pypungi.Pungi(config, ksparser)
@ -190,6 +192,8 @@ if __name__ == '__main__':
help='Force reuse of an existing destination directory (will overwrite files)') help='Force reuse of an existing destination directory (will overwrite files)')
parser.add_option("--isfinal", default=False, action="store_true", 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') 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", parser.add_option("-c", "--config", dest="config",
help='Path to kickstart config file') help='Path to kickstart config file')

View File

@ -668,7 +668,11 @@ class Pungi(pypungi.PungiBase):
basename = os.path.basename(po.relativepath) basename = os.path.basename(po.relativepath)
local = po.localPkg() 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) # Link downloaded package in (or link package from file repo)
try: try: