cleanoldpkg option is not limited to one architecture
Some abuild options seem to be architecture constrained, like index
for example seems to just rebuild the index for the detected arch unless you provide CHOST or CARCH:
server:/srv/aports/local/xlunch$ abuild index
>>> xlunch: Updating the local/x86_64 repository index...
>>> xlunch: Signing the index...
server:/srv/aports/local/xlunch$ CHOST=aarch64 abuild index
>>> xlunch: Updating the local/aarch64 repository index...
>>> xlunch: Signing the index...
The cleanoldpkg
option does not limit itself to a single arch and to me it's not obvious when reviewing the -h help for abuild or from the command output during execution that its cleaning all architectures, not just the detected/specified one.
server:/srv/aports/local/xlunch$ abuild cleanoldpkg
>>> xlunch: Cleaning all packages except 4.7.4-r1...
>>> xlunch: Updating the local/x86_64 repository index...
>>> xlunch: Signing the index...
The first step cleans all architectures and then the next two just update and sign the x86_64 index leaving the indexes (or indices) for the other architectures inconsistent with the content of the repo.
Maybe this is by design and this is just operator error on my part but its a foot gun that I keep shooting myself with on my personal repo. I'll experiment with some package changes on x86_64 for example and bump the pkgver but only build x86_64. Then I'll forget and run abuild cleanoldpkg
thinking it's limited to x86_64 but it's actually deleting the package completely from other architectures because I haven't built the current pkgver for those yet. Then cron runs later and rysnc deletes all the packages out of my remote repo too.
As I said, I know the problem is mostly on my end but I don't think cleanoldpkg
is clear about what it's doing and I don't think it's consistent with other commands like index
.