diff --git a/common/environment/setup-subpkg/subpkg.sh b/common/environment/setup-subpkg/subpkg.sh index 6bf748fdc3d..05d3a3e42c5 100644 --- a/common/environment/setup-subpkg/subpkg.sh +++ b/common/environment/setup-subpkg/subpkg.sh @@ -43,3 +43,6 @@ unset -v binfmts # xbps-triggers: register-shell unset -v register_shell + +# deprecated +unset -v noarch diff --git a/common/environment/setup/sourcepkg.sh b/common/environment/setup/sourcepkg.sh index 82d466a11e1..7d1e7b8e5b3 100644 --- a/common/environment/setup/sourcepkg.sh +++ b/common/environment/setup/sourcepkg.sh @@ -33,3 +33,6 @@ unset -f pre_build do_build post_build unset -f pre_check do_check post_check unset -f pre_install do_install post_install unset -f do_clean + +# deprecated +unset -v only_for_arch diff --git a/common/xbps-src/shutils/common.sh b/common/xbps-src/shutils/common.sh index 46552dd940a..92f45c3b908 100644 --- a/common/xbps-src/shutils/common.sh +++ b/common/xbps-src/shutils/common.sh @@ -347,6 +347,22 @@ setup_pkg() { source_file ${XBPS_SRCPKGDIR}/${basepkg}/template fi + # Backward compatibility to noarch and only_for_archs + if [ -n "$only_for_archs" ] && [ -n "$noarch" ]; then + msg_error "only_for_archs and noarch can't be used together\n" + fi + if [ -n "$only_for_archs" ]; then + archs="$only_for_archs" + unset only_for_archs + msg_warn "deprecated property 'only_for_archs'. Use archs=\"$only_for_archs\" instead!\n" + fi + if [ -n "$noarch" ]; then + archs=noarch + unset noarch + msg_warn "deprecated property 'noarch'. Use archs=noarch instead!\n" + fi + + # Check if required vars weren't set. _vars="pkgname version short_desc revision homepage license" for f in ${_vars}; do