Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #10295

apt.Cache.update with alternative sources.list

Path csiph.com!fu-berlin.de!bofh.it!news.nic.it!robomod
From Ole Streicher <olebole@debian.org>
Newsgroups linux.debian.maint.python
Subject apt.Cache.update with alternative sources.list
Date Wed, 21 Mar 2018 23:40:02 +0100
Message-ID <vvUyK-8di-19@gated-at.bofh.it> (permalink)
X-Mailbox-Line From debian-python-request@lists.debian.org Wed Mar 21 22:30:11 2018
Old-Return-Path <news@liska.ath.cx>
X-Amavis-Spam-Status No, score=-6.751 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, HEADER_FROM_DIFFERENT_DOMAINS=0.249, LDO_WHITELIST=-5] autolearn=ham autolearn_force=no
X-Policyd-Weight using cached result; rate: -7
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version 1.0
Content-Type text/plain
Lines 35
X-Mailing-List <debian-python@lists.debian.org> archive/latest/15694
List-ID <debian-python.lists.debian.org>
List-URL <https://lists.debian.org/debian-python/>
List-Archive https://lists.debian.org/msgid-search/87605pyt6l.fsf@debian.org
Approved robomod@news.nic.it
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Date Wed, 21 Mar 2018 23:12:18 +0100
X-Original-Message-ID <87605pyt6l.fsf@debian.org>
Xref csiph.com linux.debian.maint.python:10295

Show key headers only | View raw


Hi,

I need some access (as normal user) to an apt cache with an alternative
sources.list (those in /etc/blends/ installed by blends-dev), but I have
problems to find out how to use it.

I first tried to just specify the alternative source file:

```
>>> import apt
>>> c = apt.Cache()
>>> c.update('sources_list='/etc/blends/sources.list.testing')
LockFailedException: Failed to lock /var/lib/apt/lists/lock
```

Then I tried to use an alternative root directory:

```
>>> import apt
>>> c = apt.Cache(rootdir='/tmp/myapttmp')
>>> c.update('sources_list='/etc/blends/sources.list.testing')
FetchFailedException: W:GPG error: http://ftp.debian.org/debian testing InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7638D0442B90D010, E:The repository 'http://ftp.debian.org/debian testing InRelease' is not signed.
```

To which place in the new root directory do I need to copy the keyring?
I tried <<rootdir>>/usr/share/keyrings/ but this didn't work.

And/or how can I disable authentication (--allow-unauthenticated,
resp. APT::Get::AllowUnauthenticated)?

Version of python3_apt is 1.4.0~beta3+b1

Best regards

Ole

Back to linux.debian.maint.python | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

apt.Cache.update with alternative sources.list Ole Streicher <olebole@debian.org> - 2018-03-21 23:40 +0100
  Re: apt.Cache.update with alternative sources.list Pierre-Elliott Bécue <becue@crans.org> - 2018-03-22 08:30 +0100
  Re: apt.Cache.update with alternative sources.list Paul Wise <pabs@debian.org> - 2018-03-22 15:30 +0100

csiph-web