这是indexloc提供的服务,不要输入任何密码
Skip to content

fix: do not imply platform independent for metapackages #25425

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

Merged
merged 3 commits into from
Jul 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/dotnet-host/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="A metapackage for .NET Host"
TERMUX_PKG_LICENSE="Public Domain"
TERMUX_PKG_MAINTAINER="@truboxl"
TERMUX_PKG_VERSION="9.0"
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_DEPENDS="dotnet-host-9.0 | dotnet-host-8.0"
TERMUX_PKG_ANTI_BUILD_DEPENDS="dotnet-host-9.0, dotnet-host-8.0"
TERMUX_PKG_AUTO_UPDATE=false
Expand Down
2 changes: 1 addition & 1 deletion packages/netstandard-targeting-pack-2.1/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="A metapackage for NETStandard.Library 2.1 Targeting Pack
TERMUX_PKG_LICENSE="Public Domain"
TERMUX_PKG_MAINTAINER="@truboxl"
TERMUX_PKG_VERSION="9.0"
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_DEPENDS="netstandard-targeting-pack-2.1-9.0 | netstandard-targeting-pack-2.1-8.0"
TERMUX_PKG_ANTI_BUILD_DEPENDS="netstandard-targeting-pack-2.1-9.0, netstandard-targeting-pack-2.1-8.0"
TERMUX_PKG_AUTO_UPDATE=false
Expand Down
7 changes: 5 additions & 2 deletions scripts/build/termux_step_start_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ termux_step_start_build() {
TERMUX_HOSTBUILD_MARKER="$TERMUX_PKG_HOSTBUILD_DIR/TERMUX_BUILT_FOR_$TERMUX_PKG_VERSION"

if [ "$TERMUX_PKG_METAPACKAGE" = "true" ]; then
# Metapackage has no sources and therefore platform-independent.
# Metapackage has no sources
TERMUX_PKG_SKIP_SRC_EXTRACT=true
TERMUX_PKG_PLATFORM_INDEPENDENT=true
# Usually metapackages are also platform dependent but it is not always the
# right decision to mark them as such when they depend on packages which may
# not be available for all architectures
# TERMUX_PKG_PLATFORM_INDEPENDENT=true
Copy link
Contributor

@robertkirkman robertkirkman Jul 21, 2025

Choose a reason for hiding this comment

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

I agree with this. Technically, any package which depends on a package that does not exist on some (OS-supported) architectures is not architecture independent - it is dependent on the existence of the dependency package, which does not exist on some architectures.

Since it is convenient to post it here for reference by anyone reading this PR in the future, the reason why this ends up mattering and is necessary is because the folder organization patterns of the mirrors can vary, and in at least some cases, packages marked as platform-independent are placed into the same folder for all architectures and cannot be "hidden" from the apt install commands of devices that have an architecture that is not supported by one of the dependencies of the package marked as architecture-independent, which is why it is necessary to use this specific definition of "architecture independent".

# exist. Could be an aptly mirror where the
# all arch is mixed into the other arches,

fi

if [ -n "${TERMUX_PKG_EXCLUDED_ARCHES:=""}" ] && [ "$TERMUX_PKG_EXCLUDED_ARCHES" != "${TERMUX_PKG_EXCLUDED_ARCHES/$TERMUX_ARCH/}" ]; then
Expand Down
Loading