Skip to content

Commit

Permalink
Revert "msys2-dbadd: limit packages with embedded signatures to those…
Browse files Browse the repository at this point in the history
… required for updating"

This reverts commit 5531410.
  • Loading branch information
lazka committed May 12, 2024
1 parent 5531410 commit 44e62b0
Showing 1 changed file with 7 additions and 16 deletions.
23 changes: 7 additions & 16 deletions msys2-dbadd
Original file line number Diff line number Diff line change
Expand Up @@ -42,27 +42,18 @@ update_packages() {
local srcpath="${1}"
shift

# Skip embedded signatures for everything but msys
# https://github.com/msys2/msys2-devtools/issues/5
local repo_options=()
if [ "${repo}" = "msys" ]; then
repo_options=(--include-sigs)
fi

local files=( $(find "${staging}/${path}" -name "*.pkg.tar.*" -not -name "*.sig") )
if [ "${#files[@]}" -gt 0 ]
then
echo "==> ${path}"

# Add embedded signatures for all core/runtime packages and msys2-keyring, so that pacman v5 users have a transition path
# https://github.com/msys2/msys2-devtools/issues/5
local include_sigs=(
"bash" "filesystem" "mintty" "msys2-runtime" "msys2-runtime-devel"
"pacman" "pacman-mirrors" "msys2-keyring" "msys2-runtime-3.4"
"msys2-runtime-3.3" "msys2-runtime-3.4-devel" "msys2-runtime-3.3-devel")
local package_basename="${path##*/}"
local package_name="$(echo "${package_basename}" | rev | cut -d"-" -f4- | rev)"
local repo_options=()
for sig_pkg in "${include_sigs[@]}"; do
if [[ "$package_name" == "$sig_pkg" ]]; then
repo_options=(--include-sigs)
break
fi
done

cp "${pub}/${path}/${repo}".{db,files}{,.tar.zst}{,.sig} "${staging}/${path}/"
repo-add "${repo_options[@]}" -n -p -s -v "${staging}/${path}/${repo}.db.tar.zst" "${files[@]}"
zstd --quiet --test "${staging}/${path}/${repo}.db.tar.zst"
Expand Down

0 comments on commit 44e62b0

Please sign in to comment.