mirror of
https://github.com/xcat2/confluent.git
synced 2026-08-03 16:07:00 +00:00
Limit imgutil manifest hashes to the profile source
capture and pack hash the whole profile directory, which by that point holds rootimg.sfs, the kernel and the distribution initramfs. rebase only ever looks up entries that came from the profile source directory, so the image blobs cost gigabytes of hashing for nothing. Pass the source directory as the filter, as generate_stock_profiles already does. Older manifests keep working, since rebase reads their entries with a default.
This commit is contained in:
+2
-2
@@ -267,7 +267,7 @@ async def capture_remote(args):
|
||||
indir = '{}/profiles/default'.format(confdir)
|
||||
if os.path.exists(indir):
|
||||
copy_tree(indir, outdir)
|
||||
hmap = await osimage.get_hashes(outdir)
|
||||
hmap = await osimage.get_hashes(outdir, indir)
|
||||
with open('{0}/manifest.yaml'.format(outdir), 'w') as yout:
|
||||
yout.write('# This manifest enables rebase to know original source of profile data and if any customizations have been done\n')
|
||||
manifestdata = {'distdir': indir, 'disthashes': hmap}
|
||||
@@ -1663,7 +1663,7 @@ async def pack_image(args):
|
||||
indir = '{}/profiles/default'.format(confdir)
|
||||
if os.path.exists(indir):
|
||||
copy_tree(indir, outdir)
|
||||
hmap = await osimage.get_hashes(outdir)
|
||||
hmap = await osimage.get_hashes(outdir, indir)
|
||||
with open('{0}/manifest.yaml'.format(outdir), 'w') as yout:
|
||||
yout.write('# This manifest enables rebase to know original source of profile data and if any customizations have been done\n')
|
||||
manifestdata = {'distdir': indir, 'disthashes': hmap}
|
||||
|
||||
Reference in New Issue
Block a user