Browse Source

build-package: mv termux_step_compare_debs to scripts/build/

android-5
Henrik Grimler 6 years ago
committed by Leonid Plyushch
parent
commit
95ee844cfe
  1. 19
      build-package.sh
  2. 17
      scripts/build/termux_step_compare_debs.sh

19
build-package.sh

@ -122,23 +122,8 @@ termux_step_create_debscripts() {
# Create the build deb file. Not to be overridden by package scripts.
source scripts/build/termux_step_create_debfile.sh
termux_step_compare_debs() {
if [ "${TERMUX_INSTALL_DEPS}" = true ]; then
cd ${TERMUX_SCRIPTDIR}
for DEB in $TERMUX_PKG_NAME $(basename $TERMUX_PKG_BUILDER_DIR/*.subpackage.sh | sed 's%\.subpackage\.sh%%g') $(basename $TERMUX_PKG_TMPDIR/*.subpackage.sh | sed 's%\.subpackage\.sh%%g'); do
read DEB_ARCH DEB_VERSION <<< $(termux_extract_dep_info "$DEB")
termux_download_deb $DEB $DEB_ARCH $DEB_VERSION \
&& (
DEB_FILE=${DEB}_${DEB_VERSION}_${DEB_ARCH}.deb
# `|| true` to prevent debdiff's exit code from stopping build
debdiff $TERMUX_DEBDIR/$DEB_FILE $TERMUX_COMMON_CACHEDIR-$TERMUX_ARCH/$DEB_FILE || true
) || echo "Download of ${DEB}@${DEB_VERSION} failed, not comparing debs"
echo ""
done
fi
}
# Function to compare debs built with -i with ones from a repo
source scripts/build/termux_step_compare_debs.sh
# Finish the build. Not to be overridden by package scripts.
termux_step_finish_build() {

17
scripts/build/termux_step_compare_debs.sh

@ -0,0 +1,17 @@
termux_step_compare_debs() {
if [ "${TERMUX_INSTALL_DEPS}" = true ]; then
cd ${TERMUX_SCRIPTDIR}
for DEB in $TERMUX_PKG_NAME $(basename $TERMUX_PKG_BUILDER_DIR/*.subpackage.sh | sed 's%\.subpackage\.sh%%g') $(basename $TERMUX_PKG_TMPDIR/*.subpackage.sh | sed 's%\.subpackage\.sh%%g'); do
read DEB_ARCH DEB_VERSION <<< $(termux_extract_dep_info "$DEB")
termux_download_deb $DEB $DEB_ARCH $DEB_VERSION \
&& (
DEB_FILE=${DEB}_${DEB_VERSION}_${DEB_ARCH}.deb
# `|| true` to prevent debdiff's exit code from stopping build
debdiff $TERMUX_DEBDIR/$DEB_FILE $TERMUX_COMMON_CACHEDIR-$TERMUX_ARCH/$DEB_FILE || true
) || echo "Download of ${DEB}@${DEB_VERSION} failed, not comparing debs"
echo ""
done
fi
}
Loading…
Cancel
Save