[kteam-tools][PATCH v2 5/5] cranky: master -- getabis: Preserve ABI repo layout with new buildinfo packages
Juerg Haefliger
juerg.haefliger at canonical.com
Thu Jun 10 08:08:07 UTC 2021
Newer buildinfo packages provide modules and modules.builtin directories
containing one file per module with modinfo data rather than a single file
with the list of modules. That is a lot of additional data that we don't
need in the repo so convert the content of the buildinfo package so that
the ABI modules layout is preserved.
Signed-off-by: Juerg Haefliger <juergh at canonical.com>
---
cranky/master/getabis | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/cranky/master/getabis b/cranky/master/getabis
index ebe4c4abdbc0..57e3e36846ca 100755
--- a/cranky/master/getabis
+++ b/cranky/master/getabis
@@ -150,7 +150,27 @@ getall_set()
do
mv "$base/$comp" "$abidir/$arch/$sub.$comp"
done
- cat "$base/fwinfo" >>"$fwinfo"
+ # fwinfo might no longer be provided
+ if [ -f "$base/fwinfo" ] ; then
+ cat "$base/fwinfo" >> "$fwinfo"
+ fi
+ # Handle new modules.builtin
+ if [ -e "$base/modules.builtin" ] ; then
+ mv "$base/modules.builtin" "$abidir/$arch/$sub.modules.builtin"
+ fi
+ # Convert the new-style module directories to preserve the
+ # existing ABI layout in the repo
+ for comp in modules modules.builtin ; do
+ mdir="$abidir/$arch/$sub.$comp"
+ if [ -d "$mdir" ] ; then
+ # Reconstruct fwinfo
+ grep -he '^firmware:' "$mdir"/* >> "$fwinfo"
+ # Reconstruct modules and modules.builtin files
+ ls -1 "$mdir" > "$mdir.tmp"
+ rm -rf "$mdir"
+ mv "$mdir.tmp" "$mdir"
+ fi
+ done
fi
rm -rf tmp $filenames
echo " done"
--
2.27.0
More information about the kernel-team
mailing list