From patchwork Wed Aug 10 22:23:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Westby X-Patchwork-Id: 3381 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id DA2D523F3F for ; Wed, 10 Aug 2011 22:23:26 +0000 (UTC) Received: from mail-qw0-f52.google.com (mail-qw0-f52.google.com [209.85.216.52]) by fiordland.canonical.com (Postfix) with ESMTP id A0F66A182C2 for ; Wed, 10 Aug 2011 22:23:26 +0000 (UTC) Received: by qwb8 with SMTP id 8so1176826qwb.11 for ; Wed, 10 Aug 2011 15:23:26 -0700 (PDT) Received: by 10.229.183.84 with SMTP id cf20mr6791609qcb.121.1313015006016; Wed, 10 Aug 2011 15:23:26 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.229.190.71 with SMTP id dh7cs95759qcb; Wed, 10 Aug 2011 15:23:25 -0700 (PDT) Received: from mr.google.com ([10.227.208.82]) by 10.227.208.82 with SMTP id gb18mr2896231wbb.45.1313015005251 (num_hops = 1); Wed, 10 Aug 2011 15:23:25 -0700 (PDT) Received: by 10.227.208.82 with SMTP id gb18mr2087593wbb.45.1313015003944; Wed, 10 Aug 2011 15:23:23 -0700 (PDT) Received: from adelie.canonical.com (adelie.canonical.com [91.189.90.139]) by mx.google.com with ESMTP id fd10si3718424wbb.112.2011.08.10.15.23.23; Wed, 10 Aug 2011 15:23:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.139 as permitted sender) client-ip=91.189.90.139; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.139 as permitted sender) smtp.mail=bounces@canonical.com Received: from loganberry.canonical.com ([91.189.90.37]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1QrHBK-0007vf-Cr for ; Wed, 10 Aug 2011 22:23:22 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id BCBA52EFB72 for ; Wed, 10 Aug 2011 22:23:15 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: linaro-image-tools X-Launchpad-Branch: ~linaro-image-tools/linaro-image-tools/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 402 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-image-tools/linaro-image-tools/trunk] Rev 402: Create /etc/apt/sources.list.d in IsolatedAptCache. Thanks to Rex Tsai. Message-Id: <20110810222315.13481.4415.launchpad@loganberry.canonical.com> Date: Wed, 10 Aug 2011 22:23:15 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="13636"; Instance="initZopeless config overlay" X-Launchpad-Hash: a49e6670a2cb3573966b581cfe64ddf969d387ed ------------------------------------------------------------ revno: 402 committer: James Westby branch nick: trunk timestamp: Wed 2011-08-10 18:12:11 -0400 message: Create /etc/apt/sources.list.d in IsolatedAptCache. Thanks to Rex Tsai. Newer apts require this dir to function, and so we have to create it in our temp apt hierarchy. modified: linaro_image_tools/hwpack/packages.py linaro_image_tools/hwpack/tests/test_packages.py --- lp:linaro-image-tools https://code.launchpad.net/~linaro-image-tools/linaro-image-tools/trunk You are subscribed to branch lp:linaro-image-tools. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-image-tools/linaro-image-tools/trunk/+edit-subscription === modified file 'linaro_image_tools/hwpack/packages.py' --- linaro_image_tools/hwpack/packages.py 2011-06-20 13:33:01 +0000 +++ linaro_image_tools/hwpack/packages.py 2011-08-10 22:12:11 +0000 @@ -480,7 +480,7 @@ logger.debug("Writing apt configs") self.tempdir = tempfile.mkdtemp(prefix="hwpack-apt-cache-") dirs = ["var/lib/dpkg", - "etc/apt/", + "etc/apt/sources.list.d", "var/cache/apt/archives/partial", "var/lib/apt/lists/partial", ] === modified file 'linaro_image_tools/hwpack/tests/test_packages.py' --- linaro_image_tools/hwpack/tests/test_packages.py 2011-05-25 20:55:24 +0000 +++ linaro_image_tools/hwpack/tests/test_packages.py 2011-08-10 22:12:11 +0000 @@ -874,6 +874,14 @@ open(os.path.join( cache.tempdir, "etc", "apt", "sources.list")).read()) + def test_prepare_creates_etc_apt_sources_list_dot_d_dir(self): + cache = IsolatedAptCache([]) + self.addCleanup(cache.cleanup) + cache.prepare() + self.assertTrue( + os.path.isdir(os.path.join( + cache.tempdir, "etc", "apt", "sources.list.d"))) + def test_prepare_with_arch_creates_etc_apt_apt_conf(self): cache = IsolatedAptCache([], architecture="arch") self.addCleanup(cache.cleanup)