my goal is to collect different executable files with the same source code in all Linux distros and all architectures, e.g. Ubuntu 18.04 and Debian 12 in amd64 and i386, as much as possible, and for scientific purposes only.
I don't know if there are any neat ways to do that, I'm currently trying to set a source.list cache in python-apt (so that others won't be influenced using apt), and then download executables and source codes of packages listed by my previous work.
My python-apt version is 2.4.0, and when I run the codes below, it shows the GPG public key error; after I added '[trusted=yes]' into the source, the package_list has no 'vim', it seems like it cached nothing.
It would be grateful if you could help me with this.
Best regards.
with open('/home/etc/apt/source.list', 'w') as f:
f.write('deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free \n')
cache = apt.Cache(rootdir=os.getcwd(), memonly=True)
# cache._run_fetcher(apt_pkg.Acquire(apt.progress.text.AcquireProgress()))
cache.update( sources_list='/tmp/source_2.list')
package_list = ['vim']
print(cache.keys())
for package_name in package_list:
....