diff -Nru click-0.4.19/click/tests/test_hooks.py click-0.4.20/click/tests/test_hooks.py --- click-0.4.19/click/tests/test_hooks.py 2014-03-18 14:27:35.000000000 +0000 +++ click-0.4.20/click/tests/test_hooks.py 2014-03-24 16:16:24.000000000 +0000 @@ -417,6 +417,10 @@ json.dump({"hooks": {"test1-app": {"test": "target-1"}}}, f) os.symlink("1.0", os.path.join(self.temp_dir, "test-1", "current")) with mkfile(os.path.join( + self.temp_dir, "test-2", "1.0", ".click", "info", + "test-2.manifest")) as f: + json.dump({"hooks": {"test2-app": {"test": "target-2"}}}, f) + with mkfile(os.path.join( self.temp_dir, "test-2", "1.1", ".click", "info", "test-2.manifest")) as f: json.dump({"hooks": {"test2-app": {"test": "target-2"}}}, f) @@ -425,7 +429,10 @@ os.symlink( os.path.join(self.temp_dir, "test-1", "1.0", "target-1"), path_1) - path_2 = os.path.join(self.temp_dir, "test-2_test2-app_1.1.test") + path_2_1_0 = os.path.join( + self.temp_dir, "test-2_test2-app_1.0.test") + path_2_1_1 = os.path.join( + self.temp_dir, "test-2_test2-app_1.1.test") path_3 = os.path.join(self.temp_dir, "test-3_test3-app_1.0.test") os.symlink( os.path.join(self.temp_dir, "test-3", "1.0", "target-3"), @@ -436,10 +443,14 @@ self.assertEqual( os.path.join(self.temp_dir, "test-1", "1.0", "target-1"), os.readlink(path_1)) - self.assertTrue(os.path.lexists(path_2)) + self.assertTrue(os.path.lexists(path_2_1_0)) + self.assertEqual( + os.path.join(self.temp_dir, "test-2", "1.0", "target-2"), + os.readlink(path_2_1_0)) + self.assertTrue(os.path.lexists(path_2_1_1)) self.assertEqual( os.path.join(self.temp_dir, "test-2", "1.1", "target-2"), - os.readlink(path_2)) + os.readlink(path_2_1_1)) self.assertFalse(os.path.lexists(path_3)) diff -Nru click-0.4.19/debian/changelog click-0.4.20/debian/changelog --- click-0.4.19/debian/changelog 2014-03-18 14:27:53.000000000 +0000 +++ click-0.4.20/debian/changelog 2014-03-24 16:16:37.000000000 +0000 @@ -1,3 +1,12 @@ +click (0.4.20) trusty; urgency=medium + + [ Colin Watson ] + * Create system hook symlinks for all installed packages, not just current + versions. This avoids missing AppArmor profiles when there are + unregistered user-installed versions of packages lying around. + + -- Ubuntu daily release Mon, 24 Mar 2014 16:16:37 +0000 + click (0.4.19) trusty; urgency=medium [ Colin Watson ] diff -Nru click-0.4.19/lib/click/hooks.vala click-0.4.20/lib/click/hooks.vala --- click-0.4.19/lib/click/hooks.vala 2014-03-18 14:27:35.000000000 +0000 +++ click-0.4.20/lib/click/hooks.vala 2014-03-24 16:16:24.000000000 +0000 @@ -849,7 +849,7 @@ } } } else { - foreach (var inst in db.get_packages ()) + foreach (var inst in db.get_packages (true)) ret.add (new UnpackedPackage (inst.package, inst.version)); }