I use aptly to create a mirror that only contains the packages that I really need, i.e. doing something like:
$ aptly mirror edit -filter='package1|package2|package3' -filter-with-deps mymirror
This worked just fine until the package list being filtered grew beyond some 128 kbytes: Now, being in need for a bigger list of packages, I get the error message:
aptly: Argument list too long
I know that this could be fixed by recompiling the (Linux) kernel with MAX_ARG_PAGES set to some higher value, but this is not scalable, as it would confine me to a certain (set of) host(s).
Furthermore, I know other open-sorce projects that typically circumvent issues like that by resorting to a file to pass in huge arguments by prepending an @ character to signal that the argument should be read from a file instead, e.g.
$ aptly mirror edit -filter='@file_containing_filter_query' -filter-with-deps mymirror
But unfortunately, this does not seem to be supported by aptly.
Any ideas on how to filter big package lists?