=== modified file 'linaro_image_tools/hwpack/packages.py'
@@ -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'
@@ -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)