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

Bug#728274: marked as done (python-apt: apt.conf used from /etc/apt instead of root_dir + etc/apt)



Your message dated Sat, 25 Jan 2014 18:20:18 +0000
with message-id <E1W77q6-0001ZQ-Bv@franck.debian.org>
and subject line Bug#728274: fixed in python-apt 0.9.2
has caused the Debian Bug report #728274,
regarding python-apt: apt.conf used from /etc/apt instead of root_dir + etc/apt
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
728274: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=728274
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: python-apt
Version: 0.9.1
Severity: normal

Dear Maintainer,

I tried to use python-apt to get all available package versions. I used
the 'rootdir' parameter for apt.Cache to have a seperate root dir and
seperated config files.
In my /etc/apt/apt.conf , I have the following line:

APT::Default-Release "sid";

In my root-dir, I create an empty 'rootdir/etc/apt/apt.conf' and when I
try to init the apt.Cache, I get the following error:

Traceback (most recent call last):
  File "./python-apt-repro-test", line 31, in <module>
    cache = apt.Cache(rootdir=root_dir, memonly=False)
  File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 105, in __init__
    self.open(progress)
  File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 150, in open
    self._cache = apt_pkg.Cache(progress)
SystemError: E:The value 'sid' is invalid for APT::Default-Release as such a release is not available in the sources


Attached is a test program which results in this error (but you have add
the "APT::Default-Release" line to your /etc/apt/apt.conf).


Cheers,

Tom


-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.10-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python-apt depends on:
ii  libapt-inst1.5     0.9.12.1
ii  libapt-pkg4.12     0.9.12.1
ii  libc6              2.17-93
ii  libgcc1            1:4.8.2-1
ii  libstdc++6         4.8.2-1
ii  python             2.7.5-5
ii  python-apt-common  0.9.1

Versions of packages python-apt recommends:
ii  iso-codes    3.47-1
ii  lsb-release  4.1+Debian12
ii  xz-utils     5.1.1alpha+20120614-2

Versions of packages python-apt suggests:
pn  python-apt-dbg  <none>
ii  python-apt-doc  0.9.1
ii  python-gtk2     2.24.0-3+b1
ii  python-vte      1:0.28.2-5

-- no debconf information
#!/usr/bin/python
# Author: Thomas Bechtold <thomasbechtold@jpberlin.de>

import apt
import apt_pkg
import os
import tempfile

apt_pkg.init()
SOURCES_LIST = """
deb [arch=amd64,i386] http://ftp.debian.org/debian/ sid main
"""

try:
    #create a tempdir for the sources.list
    root_dir = tempfile.mkdtemp(prefix='python-apt-repos-test_')
    print "rootdir is: '%s'" % (root_dir)
    #create sources.list
    os.makedirs(os.path.abspath(root_dir + "/etc/apt"))
    with open(os.path.abspath(root_dir + "/etc/apt/sources.list"),
              "w") as s:
        s.write(SOURCES_LIST)
    #create empty apt.conf and apt.conf.d
    os.makedirs(os.path.abspath(root_dir + "/etc/apt/apt.conf.d"))
    with open(os.path.abspath(root_dir + "/etc/apt/apt.conf"),
              "w") as s:
        s.write("")

    #Here, the file /etc/apt/apt.conf is used to get "APT::Default-Release"
    # but expected is that rootdir + etc/apt/apt.conf is used
    cache = apt.Cache(rootdir=root_dir, memonly=False)

finally:
    pass
    #import shutil
    #shutil.rmtree(root_dir)


--- End Message ---
--- Begin Message ---
Source: python-apt
Source-Version: 0.9.2

We believe that the bug you reported is fixed in the latest version of
python-apt, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 728274@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Julian Andres Klode <jak@debian.org> (supplier of updated python-apt package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Sat, 25 Jan 2014 18:18:38 +0100
Source: python-apt
Binary: python-apt python-apt-doc python-apt-dbg python-apt-dev python-apt-common python3-apt python3-apt-dbg
Architecture: source amd64 all
Version: 0.9.2
Distribution: unstable
Urgency: medium
Maintainer: APT Development Team <deity@lists.debian.org>
Changed-By: Julian Andres Klode <jak@debian.org>
Description: 
 python-apt - Python interface to libapt-pkg
 python-apt-common - Python interface to libapt-pkg (locales)
 python-apt-dbg - Python interface to libapt-pkg (debug extension)
 python-apt-dev - Python interface to libapt-pkg (development files)
 python-apt-doc - Python interface to libapt-pkg (API documentation)
 python3-apt - Python 3 interface to libapt-pkg
 python3-apt-dbg - Python 3 interface to libapt-pkg (debug extension)
Closes: 728274 734500
Changes: 
 python-apt (0.9.2) unstable; urgency=medium
 .
   [ Michael Vogt ]
   * apt/cache.py:
     - when using apt.Cache(rootdir=/some/dir) only read the APT
       configuration from this rootdir instead of /etc (closes: #728274)
   * make pep8 test part of the unittests
   * add pyflakes test
   * add .travis.yml & update python3 dependency to 3.3
 .
   [ Barry Warsaw ]
   * debian/tests/control: Add python-all and python3-all as Depends for the
     autopkgtests so all the supported Python versions are pulled in.
     (closes: #734500)
 .
   [ Michael Schaller]
   * apt/cache.py:
     - Fixed PEP8 issues
     - Fixed pyflakes issue: Removed unused local variable 'transient'
   * apt/package.py:
     - Fixed PEP8 issues
     - Fixed pyflakes issue: Removed unused import 'warnings'
     - Improved readability and documentation of BaseDependency.__dstr().
 .
   [ Julian Andres Klode ]
   * apt/cache.py: Call os.path.abspath() on a supplied rootdir (LP: #792295)
   * apt/package.py: Fix BaseDependency.__dstr.__ne__()
   * apt/package.py: Pass an apt_pkg.Dependency to BaseDependency
   * tests: Add back test_hashsums from old and update
   * Style fixes:
     - Style fix: Do not use "is True" / "is False"
     - debian/control: Replace a tab with spaces
     - tests/test_deps.py: Remove an invalid blank line
   * Use a single code base for Python 2 and 3
     - Use print_function everywhere
     - Drop support for Python 2.6
     - tests: Remove checks for Python older than 2.7
   * Documentation fixes:
     - apt, doc: Fix the list of comp_type values
     - Unify list of comparison type values everywhere
   * Static analysis fixes:
     - (cppcheck) python/pkgmanager.cc: Do not create temporary CppPyRef
   * Packaging changes:
     - debian/README.source: Drop it, it's useless bzr
     - debian/gbp.conf: Set sign-tags = True
     - debian/control: Set Standards-Version to 3.9.5
     - debian/control: Drop python-{unittest2,debian} build deps
Checksums-Sha1: 
 66061cff4c6d885c3914afd5b9c5a8e09e121f6f 1546 python-apt_0.9.2.dsc
 adee1145809b37708253854f289e8667c791fc93 305164 python-apt_0.9.2.tar.xz
 6f3c3c6e880108c099f9de162a387616345b9bb3 162788 python-apt_0.9.2_amd64.deb
 b31456f0a2b6404b26689b8ca55f8c371449fc69 165888 python-apt-doc_0.9.2_all.deb
 51124bfd62e7b1cb7d4249f5483ecba03385abe5 2303480 python-apt-dbg_0.9.2_amd64.deb
 050636d64d554c142ae6138a8c8030c882f64330 7450 python-apt-dev_0.9.2_all.deb
 9d7d4041df54fed215f91faa06e9ad92d8042e4a 86942 python-apt-common_0.9.2_all.deb
 4f873c6da1a4b2e08b28e26701e53ffe035caafc 160386 python3-apt_0.9.2_amd64.deb
 176f27d49b0b7e6616f91f0a5fb4d0c76f0b846d 2299308 python3-apt-dbg_0.9.2_amd64.deb
Checksums-Sha256: 
 b250f03e56b5919dc09cad98e2efdfc1cd34ff1f6843bfbd7b5a670d07d5ef59 1546 python-apt_0.9.2.dsc
 340c705cd7577483404999ff82071c0f725a5a95432f022607294d74b1a4a2a5 305164 python-apt_0.9.2.tar.xz
 a0f4fb625ee4e8d35ceeb56586fb766ba6c68b162928fd0e7278171f10f07fe9 162788 python-apt_0.9.2_amd64.deb
 9285759e52b9404aee3c668ccaa14b4c4a6b1f198f93821d19ea04586a4afe27 165888 python-apt-doc_0.9.2_all.deb
 2c9f5b1009508678c9a4e52ea1328d737f515e575f34a39f6d0ae4f2aafd89ff 2303480 python-apt-dbg_0.9.2_amd64.deb
 2ed4bbeb423574f3ff9cc79b5610779fb361ee1e687bc5d0a62e733eadc9a992 7450 python-apt-dev_0.9.2_all.deb
 5b7e2d1302c1ae7dde6dda6cd42e1dbef884dbc73cf58d4d0272b105674656f9 86942 python-apt-common_0.9.2_all.deb
 a1d0825e24385d5e7b25b8d05a1f2d16ce94919442502f3b35d6374759aeeb65 160386 python3-apt_0.9.2_amd64.deb
 fc9a45d9c69e3bc4bac83d243877bc724dba3245ac792b14bf4d8daded40efbd 2299308 python3-apt-dbg_0.9.2_amd64.deb
Files: 
 368297df976674474318e3301fb91ae7 1546 python standard python-apt_0.9.2.dsc
 8a2ada9356d2b7cd49821f615f5d7d5c 305164 python standard python-apt_0.9.2.tar.xz
 895d077634f22250132fadab148621f0 162788 python standard python-apt_0.9.2_amd64.deb
 bc180a3b44a4a8f9a8cdbdbadd4646ba 165888 doc optional python-apt-doc_0.9.2_all.deb
 611f611aa293b52e0a42b4d4013ace27 2303480 debug extra python-apt-dbg_0.9.2_amd64.deb
 4da59873bd1761af401a9ae88db77e08 7450 python optional python-apt-dev_0.9.2_all.deb
 9c21a6b1683903bf3ab90ff20f612aea 86942 python optional python-apt-common_0.9.2_all.deb
 1651492aff39fb0ac1553eb27d561784 160386 python optional python3-apt_0.9.2_amd64.deb
 38ab0d1b3955a171cff166f520fb5721 2299308 debug extra python3-apt-dbg_0.9.2_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlLj/BcACgkQrCpf/gCCPsJ4ewCfV7v1dUak/MtVnN3PM2wlkSTq
2CoAmgL0QYHt5j1ptKuB81V2/9ZYxGoO
=a8Oa
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: