fix(ppa): skip cp when local orig already sits in build-area

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-10-15 13:42:37 +08:00
1 parent 0a8f76d9b4
commit a32c0cd78f
1 file changed
+4 -1
+4 -1
View File
@@ -124,7 +124,10 @@ if [ "$REUSE_ORIG" -eq 1 ]; then
echo "==> reusing published ${ORIG_NAME} (debian-only bump; do not rewrite orig)"
echo " source: ${ORIG_SRC}"
sha256sum "$ORIG_SRC"
cp -f "$ORIG_SRC" "$BUILD_AREA/$ORIG_NAME"
# Local fallback may already be build-area/ORIG_NAME — do not cp onto itself.
if [ "$(realpath "$ORIG_SRC")" != "$(realpath "$BUILD_AREA/$ORIG_NAME" 2>/dev/null || echo "")" ]; then
cp -f "$ORIG_SRC" "$BUILD_AREA/$ORIG_NAME"
fi
# Unpack orig (top dir is usually ${VER} or marqdo-${VER})
tar -xJf "$BUILD_AREA/$ORIG_NAME" -C "$(dirname "$PKG_ROOT")"
if [ ! -d "$PKG_ROOT" ]; then