From b42f1a419beec3454069e158f4a4242834dd86e0 Mon Sep 17 00:00:00 2001 From: Leonid Plyushch Date: Tue, 13 Aug 2019 01:59:25 +0300 Subject: [PATCH] build-package.sh: fix metapackage creation Metapackages shouldn't have data inside. %ci:reset-backlog --- packages/build-essential/build.sh | 9 ++------- scripts/build/termux_step_create_datatar.sh | 10 ++++++++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/packages/build-essential/build.sh b/packages/build-essential/build.sh index 659106d39..04b13773f 100644 --- a/packages/build-essential/build.sh +++ b/packages/build-essential/build.sh @@ -3,8 +3,8 @@ TERMUX_PKG_DESCRIPTION="A metapackage that installs essential development tools" TERMUX_PKG_LICENSE="Public Domain" TERMUX_PKG_MAINTAINER="Leonid Plyushch " TERMUX_PKG_VERSION=3.1 -TERMUX_PKG_REVISION=1 -TERMUX_PKG_METAPACKAGE=yes +TERMUX_PKG_REVISION=2 +TERMUX_PKG_METAPACKAGE=true TERMUX_PKG_PLATFORM_INDEPENDENT=true # @@ -21,8 +21,3 @@ TERMUX_PKG_DEPENDS="autoconf, automake, bison, clang, cmake, flex, gperf, libtoo # Other packages that may be interesting. TERMUX_PKG_SUGGESTS="git, golang, nodejs, patchelf, proot, python, python2, ruby, rust, subversion" - -termux_step_post_massage() { - cd "$TERMUX_PKG_MASSAGEDIR" - rm -rf data -} diff --git a/scripts/build/termux_step_create_datatar.sh b/scripts/build/termux_step_create_datatar.sh index 6682753ac..703a127b4 100644 --- a/scripts/build/termux_step_create_datatar.sh +++ b/scripts/build/termux_step_create_datatar.sh @@ -8,8 +8,14 @@ termux_step_create_datatar() { termux_error_exit "Package contains hard links: $HARDLINKS" fi - if [ "${TERMUX_PKG_METAPACKAGE-false}" = "false" ] && [ "$(find . -type f)" = "" ]; then - termux_error_exit "No files in package" + if [ "${TERMUX_PKG_METAPACKAGE-false}" = "true" ]; then + # Metapackage doesn't have data inside. + rm -rf data + else + if [ "$(find . -type f)" = "" ]; then + termux_error_exit "No files in package" + fi fi + tar -cJf "$TERMUX_PKG_PACKAGEDIR/data.tar.xz" . }