← Back to team overview

linaro-release team mailing list archive

[Bug 885895] Re: linaro-image-tools: automated unit tests are failing (5 out of 599) on 64 bit Oneiric

 

One thing I didn't realize until now is that this failing test that I'm
debugging should not be affected by multi-arch because it uses a
separate cache configured for armel, which AIUI, should not have multi-
arch.  After realizing this and digging a bit more, I've came up with
the test-case below, where apt_pkg.Cache.is_multi_arch is set to True
even though we set the architecture to armel. This seems to be because
the rootdir passed to apt.cache.Cache is not passed down to
apt_pkg.Cache, so the latter is reading the configs from the system.

import os, tempfile
from apt.cache import Cache

tempdir = tempfile.mkdtemp(prefix="hwpack-apt-cache-")
os.makedirs(os.path.join(tempdir, "etc", "apt"))
apt_conf = os.path.join(tempdir, "etc", "apt", "apt.conf")
with open(apt_conf, 'w') as f:
    f.write(
        'Apt {\nArchitecture armel;\n'
        'Install-Recommends "true";\n}\n')

c = Cache(rootdir=tempdir, memonly=True)
print "Cache._have_multi_arch: ", c._have_multi_arch
print "Cache._cache.is_multi_arch: ", c._cache.is_multi_arch

-- 
You received this bug notification because you are a member of linaro-
infrastructure-drivers, which is the registrant for Linaro Image Tools.
https://bugs.launchpad.net/bugs/885895

Title:
  linaro-image-tools: automated unit tests are failing (5 out of 599) on
  64 bit Oneiric

Status in Linaro Image Tools:
  Triaged

Bug description:
  Related: Bug #797135 
  Related: Bug #885428
  While running the automated tests there are 5 failures. Details are attached.

To manage notifications about this bug go to:
https://bugs.launchpad.net/linaro-image-tools/+bug/885895/+subscriptions


References