aptly icon indicating copy to clipboard operation
aptly copied to clipboard

How can i filter out multiple packages?

Open virtualdreams opened this issue 2 years ago • 3 comments

Version: 1.5.0

I want to filter out some packages of an mirror. But it is impossible get a result.

What i have tried:

Not working

./aptly -config aptly.conf mirror edit -filter="!python3-impacket"  debian-bookworm-main
./aptly -config aptly.conf mirror edit -filter="!python3-impacket | !ettercap-common"  debian-bookworm-main
./aptly -config aptly.conf mirror edit -filter="python3-impacket | ettercap-common"  debian-bookworm-main
./aptly -config aptly.conf mirror edit -filter="python3-impacket, ettercap-common"  debian-bookworm-main
./aptly -config aptly.conf mirror edit -filter="!Name (python3-impacket) | !Name (ettercap-common)"  debian-bookworm-main

Working

./aptly -config aptly.conf mirror edit -filter '!Name (% ettercap-*)' debian-bookworm-main

But this not

./aptly -config aptly.conf mirror edit -filter '!Name (% ettercap-common*)' debian-bookworm-main

What's wrong with this software?

The help for package queries (https://www.aptly.info/doc/feature/query/) is a massive fuck up!

Whether the filter works or not, it keeps trying to download the files. But this is denied by the proxy, because the files supposedly contain a virus. Unfortunately, I cannot whitelist the files in question. Mirror Update is considered incomplete in any case.

virtualdreams avatar May 03 '23 13:05 virtualdreams

H @virtualdreams,

thanks for reporting!

You can mayube use regex: "! Name (~ .*py.*)". Something like this should work for you case. You might also wanna try latest CI Build, as 1.5.0 is a bit older and many bugs have been fied. See https://github.com/aptly-dev/aptly/discussions/1345.

Agree, the documentation could be better, this software needs more contributions also in documentation.

neolynx avatar Sep 27 '24 09:09 neolynx

If the numer of packages is not too much, then

-filter='! ( thispackage | thatpackage | anotherpackage )'

BearKiss avatar Sep 27 '24 09:09 BearKiss

Thank you all, i will try that.

virtualdreams avatar Sep 27 '24 12:09 virtualdreams