fix(localrepo): Exact local package match, no .old on medium, rebuild on bump
- tests: match localrepo packages by exact name (foo no longer satisfied by foo-bar-*.pkg.tar.zst). - update.sh: copy the db/files by name so repo-add's *.old backups stay off the medium. - build-end4-deps.sh: rebuild a local PKGBUILD when it is newer than the built package (a quickshell _commit bump used to be skipped). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
699ed6a935
commit
025082a92f
@@ -268,10 +268,18 @@ jobs:
|
||||
done
|
||||
|
||||
# 2) Check localrepo/ for a pre-built .pkg.tar.zst
|
||||
if [[ $MATCHED -eq 0 ]] && compgen -G "localrepo/${pkg}-*.pkg.tar.zst" > /dev/null 2>&1; then
|
||||
MATCHED=1
|
||||
FOUND=$((FOUND + 1))
|
||||
echo "📦 LOCAL: $pkg (pre-built in localrepo/)"
|
||||
# Exact name: strip -<pkgver>-<pkgrel>-<arch>.pkg.tar.zst, so
|
||||
# "foo" is not satisfied by foo-bar-1.0-1-any.pkg.tar.zst
|
||||
if [[ $MATCHED -eq 0 ]]; then
|
||||
for f in localrepo/"${pkg}"-*.pkg.tar.zst; do
|
||||
b=${f##*/}
|
||||
if [[ "${b%-*-*-*}" == "$pkg" ]]; then
|
||||
MATCHED=1
|
||||
FOUND=$((FOUND + 1))
|
||||
echo "📦 LOCAL: $pkg (pre-built in localrepo/)"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# 3) Check build-end4-deps.sh for the package name
|
||||
|
||||
@@ -59,8 +59,12 @@ build_local_pkgbuild() {
|
||||
local pkg_name
|
||||
pkg_name=$(basename "${pkg_dir}")
|
||||
|
||||
if ls "${REPO_DIR}"/illogical-impulse-"${pkg_name}"-*.pkg.tar.zst 1>/dev/null 2>&1; then
|
||||
info "Package already exists in localrepo, skipping: ${pkg_name}"
|
||||
# Skip only while a built package is newer than its PKGBUILD - bumping
|
||||
# e.g. quickshell's _commit must trigger a rebuild, not ship the old one.
|
||||
if [[ -n "$(find "${REPO_DIR}" -maxdepth 1 \
|
||||
-name "illogical-impulse-${pkg_name}-*.pkg.tar.zst" \
|
||||
-newer "${pkg_dir}/PKGBUILD" -print -quit)" ]]; then
|
||||
info "Package up to date in localrepo, skipping: ${pkg_name}"
|
||||
return 0
|
||||
fi
|
||||
|
||||
|
||||
+2
-1
@@ -39,7 +39,8 @@ rm -f "${img_repo}"/*.pkg.tar.zst "${img_repo}/${repo_name}".db \
|
||||
"${img_repo}/${repo_name}".db.tar.gz "${img_repo}/${repo_name}".files \
|
||||
"${img_repo}/${repo_name}".files.tar.gz
|
||||
cp -f "${pkgs[@]}" "${img_repo}/"
|
||||
cp -fL "${repo_dir}/${repo_name}".db* "${repo_dir}/${repo_name}".files* "${img_repo}/"
|
||||
# explicit names: a .db* glob would also ship repo-add's *.tar.gz.old backups
|
||||
cp -fL "${repo_dir}/${repo_name}".{db,db.tar.gz,files,files.tar.gz} "${img_repo}/"
|
||||
echo "Medium copy ready: ${img_repo}"
|
||||
|
||||
new_names=()
|
||||
|
||||
Reference in New Issue
Block a user