[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Accepted blends 0.6.101 (source) into experimental



Hi Ole,

On Sun, Mar 25, 2018 at 10:02:32PM +0200, Ole Streicher wrote:
> Andreas Tille <andreas@an3as.eu> 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/*

OK, I've added this - but no change otherwise.  Can you please try

$ LC_ALL=C touch /var/lib/apt/lists/tmp
touch: cannot touch '/var/lib/apt/lists/tmp': Permission denied

> 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()
> ```

I get:


$ python3
Python 3.6.5rc1 (default, Mar 14 2018, 06:54:23) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tempfile
>>> d = tempfile.mkdtemp()
>>> import os
>>> os.makedirs(os.path.join(d, 'etc', 'apt'))
>>> import shutil
>>> shutil.copytree('/etc/apt/trusted.gpg.d', os.path.join(d, 'etc', 'apt', 'trusted.gpg.d'))
'/tmp/tmpv5qclwyw/etc/apt/trusted.gpg.d'
>>> distribution='unstable'
>>> shutil.copy('/etc/blends/sources.list.{}'.format(distribution), os.path.join(d, 'etc', 'apt', 'sources.list'))
'/tmp/tmpv5qclwyw/etc/apt/sources.list'
>>> import apt
>>> c = apt.Cache(rootdir=d, memonly=True)
>>> c.update() 
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 "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 464, in update
    raise FetchFailedException(e)
apt.cache.FetchFailedException: 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
>>>
 
> 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.

$ apt-cache policy python3-apt
python3-apt:
  Installiert:           1.4.0~beta3+b1
  Installationskandidat: 1.4.0~beta3+b1
  Versionstabelle:
     1.6.0~rc2 50
         50 http://httpredir.debian.org/debian unstable/main amd64 Packages
         50 http://ftp.debian.org/debian unstable/main amd64 Packages
 *** 1.4.0~beta3+b1 501
        501 file:/home/ftp/pub/debian testing/main amd64 Packages
        501 http://httpredir.debian.org/debian testing/main amd64 Packages
        100 /var/lib/dpkg/status


So I installed python3-apt from unstable and re-run `make dist` ... with
no change. :-(

> So, I can't reproduce your result. Maybe you have some weird environment
> variables set that influence the behaviour of apt?

I admit that I'm able to run `make dist` successfully on a system
running stretch.  I now understand what you mean by "removing the \ in
tasks/cloud".  While I agree that the '\' is not part of the RFC822
definition we obviously have tasks featuring these.  I'd prefer if
the script would issue an error instead of creating broken d/control
files.

Regarding the Format description field:  It seems I did not understand
it completely since I assumed it is optional.  It seems that I
definitely need to specify it if Recommends are used inside the tasks
file.  Is this correct?

Otherwise it looks good.  I also like the better spacing (comparison
with `git diff --ignore-space-change` looks fine).

> > 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.

OK.  May be I need to hunt this down on my machine since it seems to
happen only here.  However, I do not have the slightest idea where to
look since I do not remember that I have changed any apt settings. :-(
 
> > 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.

OK.

Thanks a lot for your work on this

     Andreas.

-- 
http://fam-tille.de


Reply to: