aptly icon indicating copy to clipboard operation
aptly copied to clipboard

[Bug]: aptly repo remove ignores flag `-architectures`

Open thunder-coding opened this issue 6 months ago • 2 comments

Hey, we use aptly to manage our @termux's apt repository. I see that although aptly repo remove -help does list the -architectures but seems to ignore it.

Current behaviour:

$ aptly repo remove -dry-run -architectures="aarch64" termux-main "nodejs (=24.2.0)" 
Loading packages...
[-] nodejs_24.2.0_arm removed
[-] nodejs_24.2.0_i686 removed
[-] nodejs_24.2.0_aarch64 removed
[-] nodejs_24.2.0_x86_64 removed

Changes not saved, as dry run has been requested.

Expected behaviour:

$ aptly repo remove -dry-run -architectures="aarch64" termux-main "nodejs (=24.2.0)" 
Loading packages...
[-] nodejs_24.2.0_aarch64 removed

Changes not saved, as dry run has been requested.

Looking at https://github.com/aptly-dev/aptly/blob/master/cmd/repo_remove.go, it seems like the architectures flag is fully ignored.

thunder-coding avatar Jul 04 '25 09:07 thunder-coding

tested on version 1.3.0 - same for me. The architecture flag makes sense for this command imho. I guess you used the following filter as an alternative "nodejs (=24.2.0) {aarch64}" The output of aptly repo remove shows the option architectures. But not all flags make sense at every command. This could be improved although it is mentioned in spec: https://www.aptly.info/doc/aptly/flags/

kaihuth avatar Jul 07 '25 08:07 kaihuth

Thanks for the workaround, I didn't know of it. (Maybe I should have looked at the docs https://www.aptly.info/doc/feature/query/ earlier)

I think this still needs to be fixed by respecting -architectures in this case.

thunder-coding avatar Jul 07 '25 08:07 thunder-coding