From 3035bc7aa706eeb2314334a03100232f7df0304c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Sat, 26 Feb 2022 12:07:02 +0100 Subject: [PATCH 1/8] Handle multiple config repos --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index df641d4..15d4166 100755 --- a/configure +++ b/configure @@ -75,7 +75,7 @@ while getopts a:Cc:d:Nm:th:vR: OPT; do HOSTDIR="$OPTARG" ;; R) - CFG_REPO="-R $OPTARG" + CFG_REPO+="-R $OPTARG " ;; \?) printf "%s\n" "$USAGE" From 5878281f7472d3096341ff95a32989ce04fb548e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Wed, 2 Mar 2022 19:16:35 +0100 Subject: [PATCH 2/8] FreeBSD doesn't have /bin/bash --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 15d4166..53c0665 100755 --- a/configure +++ b/configure @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash VERSION=0.0.0 CFG_CMDLINE= From 67c2f06bfecc51133659b3d022c746597c7287e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Sat, 18 Jan 2020 18:41:34 +0100 Subject: [PATCH 3/8] Unindex removed packages For packages reported by xbps-checkvers as removed, generated makefile finds files matching ..xbps. This is needed to know where is repodata in which package is indexed (path may contain multilib, aarch64, nonfree subdirectories). Then, xbps-rindex is called to remove package from stage index. Then, xbps-repodb needs to remove package from public index when no other package depend on it. Finally, xbps-rindex -r will remove package file. --- .gitignore | 2 ++ README | 3 +++ configure | 69 ++++++++++++++++++++++++++++++++++++++++++------------ 3 files changed, 59 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index 4a33d50..3d88c5a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,6 @@ Makefile tobuild built pkgs.txt +pkgs-removed.txt repo-checkvers.txt +repo-checkvers-remove.txt diff --git a/README b/README index 65ba3b0..8de9ac0 100644 --- a/README +++ b/README @@ -23,6 +23,9 @@ targets in the generated "tobuild" subdirectory. Once a package has been built, a small file is created into the "built" subdirectory in order to tell Make not to build it again. +Packages listed by xbps-checkvers as removed are removed them from stagedata +index. + Every time you run './configure', those two subdirectories are reset, so you cannot interrupt a build, run './configure', and resume properly. In order to resume a build in these kinds of circumstances, you must completely remove diff --git a/configure b/configure index 53c0665..7222ba8 100755 --- a/configure +++ b/configure @@ -5,6 +5,7 @@ CFG_CMDLINE= CFG_CROSS= CFG_REPO= CROSS_ARCH= +PKG_ARCH= DISTDIR= MASTERDIR= HOSTDIR= @@ -13,6 +14,7 @@ XSC= _append="" RCV=`command -v xbps-checkvers 2>/dev/null` RCV_F="repo-checkvers.txt" +RCV_FR="repo-checkvers-remove.txt" TOBUILD= _TOBUILD= USAGE="Usage: $0 [-a cross-arch] [-CN] [-R repo] [-d|-m|-h dir]" @@ -44,7 +46,7 @@ while getopts a:Cc:d:Nm:th:vR: OPT; do exit 0 ;; C) - rm -rf tobuild built + rm -rf tobuild built toremove removed rm -f *.txt Makefile exit 0 ;; @@ -90,6 +92,7 @@ shift $(($OPTIND - 1)) : ${MASTERDIR:=$DISTDIR/masterdir} : ${HOSTDIR:=$DISTDIR/hostdir} +PKG_ARCH=${CROSS_ARCH:-$(xbps-uhelper -r "$MASTERDIR" arch)} SRCPKGS=$DISTDIR/srcpkgs XBPS_SRCPKGDIR=$SRCPKGS @@ -99,17 +102,24 @@ if [ -n "$CFG_CROSS" ]; then export XBPS_TARGET_ARCH=$CROSS_ARCH fi -RCV_CMD_LINE="$RCV $CFG_REPO --distdir=${DISTDIR} ${*}" -printf "INFO: Getting list of updates, please wait...\n" -printf "INFO: Running '$RCV_CMD_LINE' (${CROSS_ARCH:-native}) ...\n" +run_rcv() { + local file=$1 flags=$2 + shift 2 + RCV_CMD_LINE="$RCV $flags $CFG_REPO --distdir=${DISTDIR} ${*}" + printf "INFO: Getting list of updates, please wait...\n" + printf "INFO: Running '$RCV_CMD_LINE' (${CROSS_ARCH:-native}) ...\n" -[ -f $RCV_F ] && _append="-a" -$RCV_CMD_LINE | tee ${_append} $RCV_F -rval=${PIPESTATUS[0]} -if [ $rval -ne 0 ]; then - echo "ERROR: xbps-checkvers exited with an error: $rval" - exit 1 -fi + _append="" + [ -f $file ] && _append="-a" + $RCV_CMD_LINE | tee ${_append} $file + rval=${PIPESTATUS[0]} + if [ $rval -ne 0 ]; then + echo "ERROR: xbps-checkvers exited with an error: $rval" + exit 1 + fi +} + +run_rcv $RCV_F "" "$@" xbps-uhelper pkgmatch "xbps-$($RCV -V | cut -d' ' -f2)_1" 'xbps>=0.54_1' case "$?" in @@ -123,9 +133,15 @@ case "$?" in ;; esac +RCV_REMOVED=--removed +if $RCV -h 2>&1 | grep -q -e $RCV_REMOVED; then + run_rcv $RCV_FR $RCV_REMOVED "$@" + cut -d' ' -f1-2 "$RCV_FR" >pkgs-removed.txt +fi + printf "INFO: Creating source targets...\n" -rm -rf tobuild built -mkdir -p tobuild built +rm -rf tobuild built toremove removed +mkdir -p tobuild built toremove removed for p in `cat pkgs.txt`; do if [ -f "$SRCPKGS/$p/template" ]; then $XSC show-avail $p 2>/dev/null @@ -134,8 +150,14 @@ for p in `cat pkgs.txt`; do fi fi done +[ -f pkgs-removed.txt ] && cat pkgs-removed.txt | while read p old; do + if ! [ -f "$SRCPKGS/$p/template" ]; then + touch toremove/$p-$old + fi +done _TOBUILD="`find tobuild -type f`" +TOREMOVE="`find toremove -type f -printf '%f '`" concat() { local found=0 @@ -192,15 +214,27 @@ printf "# Generated by configure, do not modify.\n\n" >> Makefile printf "PKGS = $TOBUILD\n" >> Makefile printf "TOBUILD = \$(patsubst %%,tobuild/%%,\$(PKGS))\n" >> Makefile printf "BUILT = \$(patsubst tobuild/%%,built/%%,\$(TOBUILD))\n\n" >> Makefile -printf "all: \$(BUILT)\n" >> Makefile +printf "PKGS_REMOVED = $TOREMOVE\n" >> Makefile +printf "TOREMOVE = \$(patsubst %%,toremove/%%,\$(PKGS_REMOVED))\n" >> Makefile +printf "REMOVED = \$(patsubst toremove/%%,removed/%%,\$(TOREMOVE))\n\n" >> Makefile +printf "all: allbuilt allremoved\n" >> Makefile printf "\t@echo \"[Done]\"\n\n" >> Makefile +printf "allbuilt: \$(BUILT)\n\n" >> Makefile +printf "allremoved: \$(REMOVED)\n\n" >> Makefile printf "print_pkgs:\n" >> Makefile printf "\t@echo \$(PKGS)\n\n" >> Makefile +printf "print_pkgs_removed:\n" >> Makefile +printf "\t@echo \$(PKGS_REMOVED)\n\n" >> Makefile printf "built/%%: tobuild/%%\n" >> Makefile printf "\t@echo \"[xbps-src]\t\${@F}\"\n" >> Makefile printf "\t@( $XSC pkg \${@F}; rval=\$\$?; [ \$\$rval -eq 2 ] && exit 0 || exit \$\$rval )\n" >> Makefile printf "\t@touch \$@\n" >> Makefile printf "\t@rm tobuild/\${@F}\n\n" >> Makefile +printf "removed/%%: toremove/%%\n" >> Makefile +printf "\t@echo \"[xbps-rindex --remove --stage]\t\${@F}\"\n" >> Makefile +printf "\t@find \"$HOSTDIR/binpkgs\" -name \${@F}.$PKG_ARCH.xbps -exec env ${CROSS_ARCH:+XBPS_TARGET_ARCH=$CROSS_ARCH} xbps-rindex --remove --stage '{}' ';'\n" >> Makefile +printf "\t@touch \$@\n" >> Makefile +printf "\t@rm toremove/\${@F}\n\n" >> Makefile printf "INFO: Finding and adding dependencies...\n" @@ -228,11 +262,16 @@ for p in $TOBUILD; do printf "built/$p: $deps\n" >> Makefile done +for p in $TOREMOVE; do + printf "removed/$p:\n" >> Makefile +done + printf "\n" >> Makefile printf "clean:\n" >> Makefile printf "\t@rm -f built/*\n" >> Makefile +printf "\t@rm -f removed/*\n" >> Makefile printf "\t@echo \"[Clean]\"\n\n" >> Makefile -printf ".PHONY: all print_pkgs clean\n" >> Makefile +printf ".PHONY: all print_pkgs clean allbuilt allremoved\n" >> Makefile printf "INFO: 'Makefile' generated.\n" printf "INFO: Type 'make'\n" From f17396ffe121822cd7328fc287346d748aa51c45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Thu, 17 Feb 2022 19:39:27 +0100 Subject: [PATCH 4/8] Remove packages marked to not build anymore on given architecture When package is updated and marked not to build on some architectures with archs/nocross/broken/restricted, it needs to be removed form repository. --- .gitignore | 1 + configure | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 3d88c5a..0d58392 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ pkgs.txt pkgs-removed.txt repo-checkvers.txt repo-checkvers-remove.txt +repo-checkvers-pkgver.txt diff --git a/configure b/configure index 7222ba8..0640b95 100755 --- a/configure +++ b/configure @@ -14,6 +14,7 @@ XSC= _append="" RCV=`command -v xbps-checkvers 2>/dev/null` RCV_F="repo-checkvers.txt" +RCV_FPV="repo-checkvers-pkgver.txt" RCV_FR="repo-checkvers-remove.txt" TOBUILD= _TOBUILD= @@ -126,7 +127,9 @@ case "$?" in 0) # version < 0.54 grep pkgname "$RCV_F" | awk '{ print $2 }' >pkgs.txt ;; 1) # version >= 0.54 - cut -d' ' -f1 "$RCV_F" >pkgs.txt ;; + cut -d' ' -f1 "$RCV_F" >pkgs.txt + cut -d' ' -f1-2 "$RCV_F" > "$RCV_FPV" + ;; *) echo "ERROR: couldn't determine xbps-checkvers version" exit 1 @@ -145,9 +148,15 @@ mkdir -p tobuild built toremove removed for p in `cat pkgs.txt`; do if [ -f "$SRCPKGS/$p/template" ]; then $XSC show-avail $p 2>/dev/null - if [ $? -eq 0 ]; then - touch tobuild/$p - fi + case $? in + 0) + touch tobuild/$p + ;; + 2) + pkgver="$(grep "^$p " < $RCV_FPV | tail -n 1 | tr ' ' -)" + touch toremove/$pkgver + ;; + esac fi done [ -f pkgs-removed.txt ] && cat pkgs-removed.txt | while read p old; do From 94b89d36c6550c10e6835da437c8efdf079d59be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Tue, 22 Feb 2022 18:44:46 +0100 Subject: [PATCH 5/8] Remove subpackages of disabled package --- configure | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 0640b95..93f45a3 100755 --- a/configure +++ b/configure @@ -153,8 +153,12 @@ for p in `cat pkgs.txt`; do touch tobuild/$p ;; 2) - pkgver="$(grep "^$p " < $RCV_FPV | tail -n 1 | tr ' ' -)" - touch toremove/$pkgver + version="$(grep "^$p " < $RCV_FPV | tail -n 1 | cut -d' ' -f2)" + touch toremove/$p-$version + $XSC show $p 2>/dev/null | grep '^subpackages:' | cut -d: -f2- | + while read -r sub; do + touch toremove/$sub-$version + done ;; esac fi From 4ccd0b42c43eb288e5f44cf0f88a61431f2309c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Thu, 24 Feb 2022 23:31:25 +0100 Subject: [PATCH 6/8] Remove multilib packages --- configure | 55 ++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 40 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 93f45a3..57c1109 100755 --- a/configure +++ b/configure @@ -47,7 +47,7 @@ while getopts a:Cc:d:Nm:th:vR: OPT; do exit 0 ;; C) - rm -rf tobuild built toremove removed + rm -rf tobuild built toremove removed toremove32bit removed32bit rm -f *.txt Makefile exit 0 ;; @@ -143,8 +143,10 @@ if $RCV -h 2>&1 | grep -q -e $RCV_REMOVED; then fi printf "INFO: Creating source targets...\n" -rm -rf tobuild built toremove removed -mkdir -p tobuild built toremove removed +TOREMOVE= +TOREMOVE32BIT= +rm -rf tobuild built toremove removed toremove32bit removed32bit +mkdir -p tobuild built toremove removed toremove32bit removed32bit for p in `cat pkgs.txt`; do if [ -f "$SRCPKGS/$p/template" ]; then $XSC show-avail $p 2>/dev/null @@ -154,23 +156,35 @@ for p in `cat pkgs.txt`; do ;; 2) version="$(grep "^$p " < $RCV_FPV | tail -n 1 | cut -d' ' -f2)" - touch toremove/$p-$version - $XSC show $p 2>/dev/null | grep '^subpackages:' | cut -d: -f2- | - while read -r sub; do - touch toremove/$sub-$version - done + TOREMOVE+="$p-$version " + TOREMOVE+="$p-dbg-$version " + [ "$XBPS_ARCH" = i686 ] && TOREMOVE32BIT+="$p-32bit-$version " + while read -r sub; do + TOREMOVE+="$sub-$version " + TOREMOVE+="$sub-dbg-$version " + [ "$XBPS_ARCH" = i686 ] && TOREMOVE32BIT+="$sub-32bit-$version " + done < <($XSC show $p 2>/dev/null | grep '^subpackages:' | cut -d: -f2-) ;; esac fi done -[ -f pkgs-removed.txt ] && cat pkgs-removed.txt | while read p old; do - if ! [ -f "$SRCPKGS/$p/template" ]; then - touch toremove/$p-$old - fi -done +if [ -f pkgs-removed.txt ] ; then + while read p old; do + if ! [ -f "$SRCPKGS/$p/template" ]; then + TOREMOVE+="$p-$old " + fi + done < pkgs-removed.txt +fi _TOBUILD="`find tobuild -type f`" -TOREMOVE="`find toremove -type f -printf '%f '`" + +for i in $TOREMOVE; do + touch toremove/$i +done + +for i in $TOREMOVE32BIT; do + touch toremove32bit/$i +done concat() { local found=0 @@ -238,14 +252,22 @@ printf "print_pkgs:\n" >> Makefile printf "\t@echo \$(PKGS)\n\n" >> Makefile printf "print_pkgs_removed:\n" >> Makefile printf "\t@echo \$(PKGS_REMOVED)\n\n" >> Makefile + printf "built/%%: tobuild/%%\n" >> Makefile printf "\t@echo \"[xbps-src]\t\${@F}\"\n" >> Makefile printf "\t@( $XSC pkg \${@F}; rval=\$\$?; [ \$\$rval -eq 2 ] && exit 0 || exit \$\$rval )\n" >> Makefile printf "\t@touch \$@\n" >> Makefile printf "\t@rm tobuild/\${@F}\n\n" >> Makefile + printf "removed/%%: toremove/%%\n" >> Makefile printf "\t@echo \"[xbps-rindex --remove --stage]\t\${@F}\"\n" >> Makefile -printf "\t@find \"$HOSTDIR/binpkgs\" -name \${@F}.$PKG_ARCH.xbps -exec env ${CROSS_ARCH:+XBPS_TARGET_ARCH=$CROSS_ARCH} xbps-rindex --remove --stage '{}' ';'\n" >> Makefile +printf "\t@find \"$HOSTDIR/binpkgs\" -name \${@F}.$PKG_ARCH.xbps -exec env XBPS_ARCH=$PKG_ARCH ${CROSS_ARCH:+XBPS_TARGET_ARCH=$CROSS_ARCH} xbps-rindex --remove --stage '{}' ';'\n" >> Makefile +printf "\t@touch \$@\n" >> Makefile +printf "\t@rm toremove/\${@F}\n\n" >> Makefile + +printf "removed32bit/%%: toremove32bit/%%\n" >> Makefile +printf "\t@echo \"[xbps-rindex --remove --stage # multilib]\t\${@F}\"\n" >> Makefile +printf "\t@find \"$HOSTDIR/binpkgs\" -name \${@F}.x86_64.xbps -exec env XBPS_TARGET_ARCH=x86_64 ${CROSS_ARCH:+XBPS_TARGET_ARCH=$CROSS_ARCH} xbps-rindex --remove --stage '{}' ';'\n" >> Makefile printf "\t@touch \$@\n" >> Makefile printf "\t@rm toremove/\${@F}\n\n" >> Makefile @@ -275,6 +297,9 @@ for p in $TOBUILD; do printf "built/$p: $deps\n" >> Makefile done +printf "\n" >> Makefile +printf "# Remove targets\n" >> Makefile +printf "removed/$p:\n" >> Makefile for p in $TOREMOVE; do printf "removed/$p:\n" >> Makefile done From b0714e78b4e31f540b016def9c3f1b460359666c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Sat, 26 Feb 2022 12:08:19 +0100 Subject: [PATCH 7/8] Handle regexp special characters in package name --- configure | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 57c1109..c9d5392 100755 --- a/configure +++ b/configure @@ -14,11 +14,11 @@ XSC= _append="" RCV=`command -v xbps-checkvers 2>/dev/null` RCV_F="repo-checkvers.txt" -RCV_FPV="repo-checkvers-pkgver.txt" RCV_FR="repo-checkvers-remove.txt" TOBUILD= _TOBUILD= USAGE="Usage: $0 [-a cross-arch] [-CN] [-R repo] [-d|-m|-h dir]" +declare -A PKGVER_ASSOC [ -f $RCV ] || { printf "ERROR: The 'xbps-checkvers' was not found in the PATH.\n" @@ -128,7 +128,9 @@ case "$?" in grep pkgname "$RCV_F" | awk '{ print $2 }' >pkgs.txt ;; 1) # version >= 0.54 cut -d' ' -f1 "$RCV_F" >pkgs.txt - cut -d' ' -f1-2 "$RCV_F" > "$RCV_FPV" + while read -r pkgname version remainder; do + PKGVER_ASSOC[$pkgname]=$version + done < "$RCV_F" ;; *) echo "ERROR: couldn't determine xbps-checkvers version" @@ -155,7 +157,7 @@ for p in `cat pkgs.txt`; do touch tobuild/$p ;; 2) - version="$(grep "^$p " < $RCV_FPV | tail -n 1 | cut -d' ' -f2)" + version=${PKGVER_ASSOC[$p]} TOREMOVE+="$p-$version " TOREMOVE+="$p-dbg-$version " [ "$XBPS_ARCH" = i686 ] && TOREMOVE32BIT+="$p-32bit-$version " From 6e6f9922fa2c5a9629829b65de371d20f5e6c398 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Wed, 2 Mar 2022 19:15:52 +0100 Subject: [PATCH 8/8] Do not require existence of binpkg on disk to remove indexed package --- configure | 44 +++++++++++++++++--------------------------- 1 file changed, 17 insertions(+), 27 deletions(-) diff --git a/configure b/configure index c9d5392..c9db198 100755 --- a/configure +++ b/configure @@ -47,7 +47,7 @@ while getopts a:Cc:d:Nm:th:vR: OPT; do exit 0 ;; C) - rm -rf tobuild built toremove removed toremove32bit removed32bit + rm -rf tobuild built rm -f *.txt Makefile exit 0 ;; @@ -147,8 +147,8 @@ fi printf "INFO: Creating source targets...\n" TOREMOVE= TOREMOVE32BIT= -rm -rf tobuild built toremove removed toremove32bit removed32bit -mkdir -p tobuild built toremove removed toremove32bit removed32bit +rm -rf tobuild built +mkdir -p tobuild built for p in `cat pkgs.txt`; do if [ -f "$SRCPKGS/$p/template" ]; then $XSC show-avail $p 2>/dev/null @@ -180,14 +180,6 @@ fi _TOBUILD="`find tobuild -type f`" -for i in $TOREMOVE; do - touch toremove/$i -done - -for i in $TOREMOVE32BIT; do - touch toremove32bit/$i -done - concat() { local found=0 for tb in $TOBUILD; do @@ -244,12 +236,23 @@ printf "PKGS = $TOBUILD\n" >> Makefile printf "TOBUILD = \$(patsubst %%,tobuild/%%,\$(PKGS))\n" >> Makefile printf "BUILT = \$(patsubst tobuild/%%,built/%%,\$(TOBUILD))\n\n" >> Makefile printf "PKGS_REMOVED = $TOREMOVE\n" >> Makefile -printf "TOREMOVE = \$(patsubst %%,toremove/%%,\$(PKGS_REMOVED))\n" >> Makefile -printf "REMOVED = \$(patsubst toremove/%%,removed/%%,\$(TOREMOVE))\n\n" >> Makefile +printf "PKGS_REMOVED_32BIT = $TOREMOVE32BIT\n" >> Makefile printf "all: allbuilt allremoved\n" >> Makefile printf "\t@echo \"[Done]\"\n\n" >> Makefile printf "allbuilt: \$(BUILT)\n\n" >> Makefile -printf "allremoved: \$(REMOVED)\n\n" >> Makefile +printf "allremoved:\n" >> Makefile +printf "\t@echo \"[xbps-rindex --remove --stage]\t\"\n" >> Makefile +# TODO: xbps-query --stage -s +for subrepo in "" /debug /nonfree; do + printf "\t@( in_repo=\$\$(env XBPS_TARGET_ARCH=$PKG_ARCH xbps-query -i -R --repository=\"$HOSTDIR/binpkgs$subrepo\" -s '' | cut -d' ' -f2 | while read -r indexed; do for removed in \$(PKGS_REMOVED); do [ \"\$\$indexed\" = \"\$\$removed\" ] && echo \"$HOSTDIR/binpkgs$subrepo\"/\$\$removed.$PKG_ARCH.xbps; done; done ); [ \"\$\$in_repo\" ] && env XBPS_TARGET_ARCH=$PKG_ARCH xbps-rindex --remove --stage \$\$in_repo )\n" >> Makefile +done +if [ "$XBPS_ARCH" = i686 ]; then + printf "\t@echo \"[xbps-rindex --remove --stage # multilib]\t\"\n" >> Makefile + for subrepo in /multilib /multilib/nonfree; do + printf "\t@( in_repo=\$\$(env XBPS_TARGET_ARCH=x86_64 xbps-query -i -R --repository=\"$HOSTDIR/binpkgs$subrepo\" -s '' | cut -d' ' -f2 | while read -r indexed; do for removed in \$(PKGS_REMOVED_32BIT); do [ \"\$\$indexed\" = \"\$\$removed\" ] && echo \"$HOSTDIR/binpkgs$subrepo\"/\$\$removed.x86_64.xbps; done; done ); [ \"\$\$in_repo\" ] && env XBPS_TARGET_ARCH=x86_64 xbps-rindex --remove --stage \$\$in_repo )\n" >> Makefile + done +fi +printf "\n" >> Makefile printf "print_pkgs:\n" >> Makefile printf "\t@echo \$(PKGS)\n\n" >> Makefile printf "print_pkgs_removed:\n" >> Makefile @@ -261,19 +264,6 @@ printf "\t@( $XSC pkg \${@F}; rval=\$\$?; [ \$\$rval -eq 2 ] && exit 0 || exit \ printf "\t@touch \$@\n" >> Makefile printf "\t@rm tobuild/\${@F}\n\n" >> Makefile -printf "removed/%%: toremove/%%\n" >> Makefile -printf "\t@echo \"[xbps-rindex --remove --stage]\t\${@F}\"\n" >> Makefile -printf "\t@find \"$HOSTDIR/binpkgs\" -name \${@F}.$PKG_ARCH.xbps -exec env XBPS_ARCH=$PKG_ARCH ${CROSS_ARCH:+XBPS_TARGET_ARCH=$CROSS_ARCH} xbps-rindex --remove --stage '{}' ';'\n" >> Makefile -printf "\t@touch \$@\n" >> Makefile -printf "\t@rm toremove/\${@F}\n\n" >> Makefile - -printf "removed32bit/%%: toremove32bit/%%\n" >> Makefile -printf "\t@echo \"[xbps-rindex --remove --stage # multilib]\t\${@F}\"\n" >> Makefile -printf "\t@find \"$HOSTDIR/binpkgs\" -name \${@F}.x86_64.xbps -exec env XBPS_TARGET_ARCH=x86_64 ${CROSS_ARCH:+XBPS_TARGET_ARCH=$CROSS_ARCH} xbps-rindex --remove --stage '{}' ';'\n" >> Makefile -printf "\t@touch \$@\n" >> Makefile -printf "\t@rm toremove/\${@F}\n\n" >> Makefile - - printf "INFO: Finding and adding dependencies...\n" printf "# Dependencies\n" >> Makefile for p in $TOBUILD; do