rename nukeblobs to a more generic name

blobs.list is now nuke.list

this is because i'm going to import this functionality
into lbmk (libreboot build system).

libreboot will not do full deblobbing like canoeboot does,
but there are still certain files that i like to delete
in releases, such as u-boot's strlcat.c file under tests

calling it "nukeblobs" in libreboot makes no sense, but
i like to avoid merge conflicts when cherry-picking
patches between cbmk and lbmk, so i like to make sure
that functions and variables common to both are named
the name.

simply calling it "nuke" or calling the files "nuke.list"
is probably inoffensive while conveying the same meaning.

Signed-off-by: Leah Rowe <info@minifree.org>
audit2-merge1
Leah Rowe 2024-05-26 09:32:00 +01:00
parent cb1918c5d7
commit a02b152f44
10 changed files with 8 additions and 8 deletions

View File

@ -46,7 +46,7 @@ prepare_new_tree()
cp -R "src/$project/$project" "$tmpgit" || \ cp -R "src/$project/$project" "$tmpgit" || \
$err "prepare_new_tree $project/$tree: can't make tmpclone" $err "prepare_new_tree $project/$tree: can't make tmpclone"
git_prep "$PWD/$cfgsdir/$tree/patches" "src/$project/$tree" "update" git_prep "$PWD/$cfgsdir/$tree/patches" "src/$project/$tree" "update"
nukeblobs "$project/$tree" "$project/$tree" nuke "$project/$tree" "$project/$tree"
} }
fetch_project_repo() fetch_project_repo()
@ -64,7 +64,7 @@ fetch_project_repo()
rm -Rf "$tmpgit" || $err "fetch_repo: !rm -Rf $tmpgit" rm -Rf "$tmpgit" || $err "fetch_repo: !rm -Rf $tmpgit"
for x in config/git/*; do for x in config/git/*; do
[ -f "$x" ] && nukeblobs "${x##*/}" "src/${x##*/}"; continue [ -f "$x" ] && nuke "${x##*/}" "src/${x##*/}"; continue
done done
} }

View File

@ -3,13 +3,13 @@
# can delete from multi- and single-tree projects. # can delete from multi- and single-tree projects.
# called from script/trees when downloading sources. # called from script/trees when downloading sources.
nukeblobs() nuke()
{ {
del="n" del="n"
pjcfgdir="${1%/}" pjcfgdir="${1%/}"
pjsrcdir="${2%/}" pjsrcdir="${2%/}"
pjsrcdir="${pjsrcdir#src/}" pjsrcdir="${pjsrcdir#src/}"
[ ! -f "config/$pjcfgdir/blobs.list" ] && return 0 [ ! -f "config/$pjcfgdir/nuke.list" ] && return 0
while read -r blobfile; do while read -r blobfile; do
rmf="$(realpath "src/$pjsrcdir/$blobfile" 2>/dev/null)" || \ rmf="$(realpath "src/$pjsrcdir/$blobfile" 2>/dev/null)" || \
@ -21,11 +21,11 @@ nukeblobs()
[ -e "$rmf" ] || continue [ -e "$rmf" ] || continue
del="y" del="y"
rm -Rf "$rmf" || $err "$pjcfgdir/blobs: can't rm \"$blobfile\"" rm -Rf "$rmf" || $err "$pjcfgdir/blobs: can't rm \"$blobfile\""
printf "nukeblobs %s: deleted \"%s\"\n" "$pjcfgdir" "$rmf" printf "nuke %s: deleted \"%s\"\n" "$pjcfgdir" "$rmf"
done < "config/$pjcfgdir/blobs.list" done < "config/$pjcfgdir/nuke.list"
[ "${del}" = "y" ] && return 0 [ "${del}" = "y" ] && return 0
printf "nukeblobs %s: no defined blobs exist in dir, src/%s\n" 1>&2 \ printf "nuke %s: no defined blobs exist in dir, src/%s\n" 1>&2 \
"$pjcfgdir" "$pjsrcdir" "$pjcfgdir" "$pjsrcdir"
printf "(this is not an error)\n" 1>&2 printf "(this is not an error)\n" 1>&2
} }

View File

@ -8,7 +8,7 @@ set -u -e
. "include/option.sh" . "include/option.sh"
. "include/git.sh" . "include/git.sh"
. "include/deblob.sh" . "include/nuke.sh"
eval "$(setvars "" xarch cfgsdir cdir config config_name xlang mode makeargs \ eval "$(setvars "" xarch cfgsdir cdir config config_name xlang mode makeargs \
listfile project target target_dir targets tree _f target1 bootstrapargs \ listfile project target target_dir targets tree _f target1 bootstrapargs \