Andreas Tille <[email protected]> writes: > I've tested this but I get: > > /usr/share/blends-dev/blend-gen-control -r UNRELEASED -S -t > Can't open file /var/lib/apt/lists/_tmp_autopkgtest.qDlH8X_binaries_Packages: > No such file or directory > I do not have permission to write to /var/lib/debtags/ > Traceback (most recent call last): > File "/usr/lib/python3/dist-packages/apt/cache.py", line 462, in update > pulse_interval) > apt_pkg.Error: E:Problem executing scripts APT::Update::Post-Invoke-Success > 'test -x /usr/bin/apt-show-versions || exit 0 ; apt-show-versions -i', > E:Sub-process returned an error code > > During handling of the above exception, another exception occurred: > > Traceback (most recent call last): > File "/usr/share/blends-dev/blend-gen-control", line 794, in <module> > blend += aptcache(args.release) > File "/usr/share/blends-dev/blend-gen-control", line 729, in aptcache > c.update()
That is strange. For me it works well for Debian med (after manually removing the backslashes in tasks/cloud): ``` $ sed -i '1i Format: https://blends.debian.org/blends/1.1' tasks/* $ make dist rm -f debian-med-tasks.desc debian/control make -f debian/rules get-orig-source make[1]: Verzeichnis „<<BUILDDIR>>/med“ wird betreten make -f /usr/share/blends-dev/Makefile debian-med-tasks.desc make[2]: Verzeichnis „<<BUILDDIR>>/med“ wird betreten /usr/share/blends-dev/blend-gen-control -r UNRELEASED -S -t make[2]: Verzeichnis „<<BUILDDIR>>/med“ wird verlassen make -f /usr/share/blends-dev/Makefile debian/control make[2]: Verzeichnis „<<BUILDDIR>>/med“ wird betreten /usr/share/blends-dev/blend-gen-control -r UNRELEASED -S -c -m Missing 351 packages downgraded to `suggests`: acacia afni [...] x-tandem-pipeline zodiac-zeden make[2]: Verzeichnis „<<BUILDDIR>>/med“ wird verlassen make[1]: Verzeichnis „<<BUILDDIR>>/med“ wird verlassen $ git diff -w debian-med-tasks.desc $ git diff -w debian/control [changes seem useful] ``` And if you look at lines 722ff. of blend-gen-control, the code to create the cache is ``` d = tempfile.mkdtemp() os.makedirs(os.path.join(d, 'etc', 'apt')) shutil.copytree('/etc/apt/trusted.gpg.d', os.path.join(d, 'etc', 'apt', 'trusted.gpg.d')) shutil.copy('/etc/blends/sources.list.{}'.format(distribution), os.path.join(d, 'etc', 'apt', 'sources.list')) c = apt.Cache(rootdir=d, memonly=True) c.update() c.open() ``` The cache is created with `rootdir=d`, with `d` being a temporary directory, which should be fully accessible for you. It seems that it is ignored in your version of python3-apt. And when I try to run apt in python without changing the root dir, I directly get a ``` >>> import apt >>> c = apt.Cache() >>> c.update() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python3/dist-packages/apt/cache.py", line 442, in update raise LockFailedException("Failed to lock %s" % lockfile) apt.cache.LockFailedException: Failed to lock /var/lib/apt/lists/lock ``` So, I can't reproduce your result. Maybe you have some weird environment variables set that influence the behaviour of apt? > I'm running this command as normal user (not root) and think that we > should not require root permissions to create blends metapackages. Sure; I also don't run it as root. > BTW, I think the rewrite of the script is a good reason to bump the > version of the package to 0.7. I'd think the same. Cheers Ole
