Path: csiph.com!aioe.org!bofh.it!news.nic.it!robomod From: Pierre-Elliott =?iso-8859-1?Q?B=E9cue?= Newsgroups: linux.debian.maint.python Subject: Re: apt.Cache.update with alternative sources.list Date: Thu, 22 Mar 2018 08:30:01 +0100 Message-ID: References: X-Mailbox-Line: From debian-python-request@lists.debian.org Thu Mar 22 07:28:51 2018 Old-Return-Path: X-Amavis-Spam-Status: No, score=-12.11 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, LDO_WHITELIST=-5, PGPSIGNATURE=-5, T_RP_MATCHES_RCVD=-0.01] autolearn=ham autolearn_force=no X-Policyd-Weight: using cached result; rate: -6.1 Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=crans.org; s=mail; t=1521703662; bh=Lq/M1MPY/yley/jmxu3SdGf9xHhT0BrAbExzPRoQJxY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ah8maKvRKznncPkNOR6URTAi26dngP3iGUkb0XAMoV1FQ1wOx7F5eX7qvZagOxVN/ LWjIzmfgahBFjL2UK8J5U9+pK60JuOhSJNWl/f+a9RyaXn9wLhd9GeBZmv3epxqryt U8CxugSQPjmi7fB+kmzBEtfy5O9u4fA9YAgujkMLkp6XeaTFyJQfGPwQWE2AlZDNCY 4XkcFXU7LhVc+aO/lwEizaXBnUMAKcjNs9JNtvQwu+Hk8gBvXkNUZIZHh9M/ex+4VK EwWvQdmWDLsaM4vdGaY4RaW1ehO53D2KQsJTrKIp70rGmZQhSIY2JuoCHeLVkYMC2X dmJycf+ZOL6OEwqm7cqYRDLm9c8tQWweWOgWNCEd5BZx4VA+x2wftkb8tq9dfrX1/V RI6jPTU7c5bS9auE/wZlUtwuvRtfgXwPtnzw67t9JYAtzAHfMmPPHC98PqdC1C1WCg Nd4RiLAx30uS7cDVKB8uwBbkY1Udp6kUzIy8jitUxMRPm4o1BxVdAL3PaZ1eHt8vFv JVGxQJsr8IAx8Tkgzs/Rox8pUOSqvEy38DpsdAYk+vTW4f5BCdd+rE0FTSxonX3lk1 3VB4e8Jwz+7fsqHLxXk4mqVKAYdk91xklBYDam2qFQ2nsHN9mi+MR5BSIjXMRvO8wn W1O7MxTfQ7r/Vk0CFRD6eDwY= MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="q5k6mo5uiibhzvm3" Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) X-Mailing-List: archive/latest/15695 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/20180322072737.tjgmmnnt252m22py@crans.org Approved: robomod@news.nic.it Lines: 72 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: debian-python@lists.debian.org X-Original-Date: Thu, 22 Mar 2018 08:27:38 +0100 X-Original-Message-ID: <20180322072737.tjgmmnnt252m22py@crans.org> X-Original-References: <87605pyt6l.fsf@debian.org> Xref: csiph.com linux.debian.maint.python:10296 --q5k6mo5uiibhzvm3 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Le mercredi 21 mars 2018 =E0 23:12:18+0100, Ole Streicher a =E9crit=A0: > Hi, >=20 > 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. >=20 > I first tried to just specify the alternative source file: >=20 > ``` > >>> import apt > >>> c =3D apt.Cache() > >>> c.update('sources_list=3D'/etc/blends/sources.list.testing') > LockFailedException: Failed to lock /var/lib/apt/lists/lock > ``` >=20 > Then I tried to use an alternative root directory: >=20 > ``` > >>> import apt > >>> c =3D apt.Cache(rootdir=3D'/tmp/myapttmp') > >>> c.update('sources_list=3D'/etc/blends/sources.list.testing') > FetchFailedException: W:GPG error: http://ftp.debian.org/debian testing I= nRelease: 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. > ``` >=20 > To which place in the new root directory do I need to copy the keyring? > I tried <>/usr/share/keyrings/ but this didn't work. >=20 > And/or how can I disable authentication (--allow-unauthenticated, > resp. APT::Get::AllowUnauthenticated)? AFAIK, the apt trusted keyring is normally in /etc/apt/trusted.gpg + /etc/apt/trusted.gpg.d So, as long as you're sure the rootdir behaves as you think this should help you to chose the appropriate place. --=20 Pierre-Elliott B=E9cue GPG: 9AE0 4D98 6400 E3B6 7528 F493 0D44 2664 1949 74E2 It's far easier to fight for one's principles than to live up to them. --q5k6mo5uiibhzvm3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEESYqTBWsFJgT6y8ijKb+g0HkpCsoFAlqzWuUACgkQKb+g0Hkp CspOlA/+LboA1KpQavsNy4W4YCZo1gW9CHknLfstAzRgPtmiY8e1g1Y6qIqERRct 1+rSyyxQKHTYropAdjpf7d1YuQGUOlHNhe8PTPdQAatSUaLTsR9aq8/CHPa6x1Ov qz/JttzobMznoBEY84OItoOIh6a3OB7l/AqytExfl9NWEr2frvsQVmfZOQ3nLF8G WWSM/rhsZH9VSVlItZGira9jTn8hl8pngKV4VJ+6EmkWKStYtwN3Shubbs5BN/os jKM3juo6TUHVBDQCYRWqjl8GxBG6gjsSwRX69u67HDCME75nH7EUhCyTbJJowMOi vy2ZKCffhKYqLOTxMJtl7u7SLNvZcqtECfiIMPn38CS4zYUiywtElSh0m842Vlo6 TinUOnvJ4xHaQQIHJ5yYkEg9lL06BJX2GZ/SDCz6PWL7bETFD4jJjA6iuH6Kn4fg HKYwuX4tIHj//YacqPfiveWc/n6VOEZgTaWz+IC0ZTKAfOuEiGFwMUApVvIOvUeU M0iY0UQ/QJY0gWD/sizyl1RweVhBUn+ShiIMsW4Gq261oPoU9WiJsxGyZeJpqkpY DOQ3jMqTSNLn7u9H4GrVN0zOjSrxFKhX51h0zBw23nIEjTTQLYRrJY5pD/MG3EDU cz+8B3F4nevQB+F4bilgGBCRlR0b7RzRE/KT4f3HKgz3+4s/TNU= =cSKP -----END PGP SIGNATURE----- --q5k6mo5uiibhzvm3--