Skip to content

Commit f17396f

Browse files
committed
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.
1 parent 67c2f06 commit f17396f

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ pkgs.txt
55
pkgs-removed.txt
66
repo-checkvers.txt
77
repo-checkvers-remove.txt
8+
repo-checkvers-pkgver.txt

configure

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ XSC=
1414
_append=""
1515
RCV=`command -v xbps-checkvers 2>/dev/null`
1616
RCV_F="repo-checkvers.txt"
17+
RCV_FPV="repo-checkvers-pkgver.txt"
1718
RCV_FR="repo-checkvers-remove.txt"
1819
TOBUILD=
1920
_TOBUILD=
@@ -126,7 +127,9 @@ case "$?" in
126127
0) # version < 0.54
127128
grep pkgname "$RCV_F" | awk '{ print $2 }' >pkgs.txt ;;
128129
1) # version >= 0.54
129-
cut -d' ' -f1 "$RCV_F" >pkgs.txt ;;
130+
cut -d' ' -f1 "$RCV_F" >pkgs.txt
131+
cut -d' ' -f1-2 "$RCV_F" > "$RCV_FPV"
132+
;;
130133
*)
131134
echo "ERROR: couldn't determine xbps-checkvers version"
132135
exit 1
@@ -145,9 +148,15 @@ mkdir -p tobuild built toremove removed
145148
for p in `cat pkgs.txt`; do
146149
if [ -f "$SRCPKGS/$p/template" ]; then
147150
$XSC show-avail $p 2>/dev/null
148-
if [ $? -eq 0 ]; then
149-
touch tobuild/$p
150-
fi
151+
case $? in
152+
0)
153+
touch tobuild/$p
154+
;;
155+
2)
156+
pkgver="$(grep "^$p " < $RCV_FPV | tail -n 1 | tr ' ' -)"
157+
touch toremove/$pkgver
158+
;;
159+
esac
151160
fi
152161
done
153162
[ -f pkgs-removed.txt ] && cat pkgs-removed.txt | while read p old; do

0 commit comments

Comments
 (0)