Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): cleanup before package building, not after #23619

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

twaik
Copy link
Member

@twaik twaik commented Mar 6, 2025

@twaik twaik requested a review from TomJo2000 March 6, 2025 05:58
@twaik twaik requested a review from Grimler91 as a code owner March 6, 2025 05:58
@twaik twaik force-pushed the cleanup-before-package-building branch from d230a81 to 331905e Compare March 6, 2025 06:03
@twaik twaik changed the title fix(ci): cleanup before package building, not after fix(ci): remove extra package cleanup Mar 6, 2025
@twaik twaik changed the title fix(ci): remove extra package cleanup fix(ci): cleanup before package building, not after Mar 6, 2025
@twaik twaik force-pushed the cleanup-before-package-building branch from 331905e to d100fc9 Compare March 6, 2025 06:13
@TomJo2000 TomJo2000 force-pushed the cleanup-before-package-building branch from d100fc9 to 506c514 Compare March 6, 2025 06:20
@twaik twaik force-pushed the cleanup-before-package-building branch from 506c514 to 066497a Compare March 6, 2025 06:35

# Store pid of current process in a file for docker__run_docker_exec_trap
. "$TERMUX_SCRIPTDIR/scripts/utils/docker/docker.sh"; docker__create_docker_exec_pid_file

# Get variable CGCT_DIR
. "$TERMUX_SCRIPTDIR/scripts/properties.sh"

while (($# >= 1)); do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
while (($# >= 1)); do
while (( $# )); do

Numbers other than 0 are truthy.

@@ -117,19 +117,19 @@ termux_pkg_upgrade_version() {
fi
done < "${TERMUX_SCRIPTDIR}/scripts/big-pkgs.list"

if [[ "${big_package}" == "true" ]]; then
"${TERMUX_SCRIPTDIR}/scripts/run-docker.sh" ./clean.sh
if [[ "${big_package}" == "true" || "${force_cleanup}" == "true" ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If -C causes termux_step_cleanup_packages() to run, which uses the same $TERMUX_CLEANUP_BUILT_PACKAGES_THRESHOLD as ${force_cleanup} does, but clean.sh deletes way more things than termux_step_cleanup_packages() does, and now this changes it so that ${force_cleanup} is checked before ./build-package.sh is run in this file (instead of after), then is -C with build-package.sh in this file still necessary? since, if everything possible was already cleaned with clean.sh right before build-package.sh is run on a single package, then termux_step_cleanup_packages() in this file will now always return without doing anything?

if ! "${TERMUX_SCRIPTDIR}/scripts/run-docker.sh" ./build-package.sh -C -a "${TERMUX_ARCH}" -i "${TERMUX_PKG_NAME}"; then

(-C would still be necessary with build-package.sh in packages.yml though, because packages.yml does not use clean.sh)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants