288
288
def test_install_file(self):
289
289
"""Test the installation of a local package file."""
290
290
# add custom lintian file
291
os.environ["APTDAEMON_LINTIAN_HOME"] = self.chroot.path
292
self.addCleanup(os.putenv, "APTDAEMON_LINTIAN_HOME", "")
293
os.makedirs(os.path.join(self.chroot.path, ".lintian/profiles/"))
291
lintian_root = os.path.join(self.chroot.path, "lintian")
292
os.environ["LINTIAN_ROOT"] = lintian_root
293
self.addCleanup(os.unsetenv, "LINTIAN_ROOT")
294
import pdb; pdb.set_trace()
295
shutil.copytree("/usr/share/lintian", lintian_root)
294
296
for profile in glob.glob(os.path.join(aptdaemon.test.get_tests_dir(),
295
"../data/lintian/*")):
296
shutil.copytree(profile,
297
os.path.join(self.chroot.path,
299
os.path.basename(profile)))
297
"../data/lintian/*/*.profile")):
298
dst = [lintian_root, "profiles"]
299
dst.extend(profile.split("/")[-2:])
300
shutil.copy(profile, os.path.join(*dst))
301
302
self.chroot.add_test_repository()
302
303
pkg = os.path.join(REPO_PATH,