Ubuntu Pastebin

Paste from James Tait at Tue, 9 Feb 2016 15:15:43 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
diff -rNu -x .bzr ./clickreviews/cr_lint.py /tmp/crt.cleanup/clickreviews/cr_lint.py
--- ./clickreviews/cr_lint.py	2016-02-09 14:39:35.286020000 +0000
+++ /tmp/crt.cleanup/clickreviews/cr_lint.py	2016-02-09 15:03:48.392369000 +0000
@@ -1134,9 +1134,6 @@
         if self._pkgfmt_type() == "click" or not self.is_snap1:
             return
 
-        if is_squashfs(self.pkg_filename):
-            return
-
         contents = self._extract_readme_md()
 
         t = 'info'
diff -rNu -x .bzr ./clickreviews/tests/test_cr_lint.py /tmp/crt.cleanup/clickreviews/tests/test_cr_lint.py
--- ./clickreviews/tests/test_cr_lint.py	2016-02-09 14:39:35.286020000 +0000
+++ /tmp/crt.cleanup/clickreviews/tests/test_cr_lint.py	2016-02-09 15:03:48.392369000 +0000
@@ -1502,21 +1502,6 @@
         expected_counts = {'info': 2, 'warn': 0, 'error': 0}
         self.check_results(r, expected_counts)
 
-    def test_check_snappy_readme_md_squashfs(self):
-        '''Test check_snappy_readme_md() - squashfs file'''
-        with patch("clickreviews.cr_lint.is_squashfs") as mock_is_squashfs:
-            mock_is_squashfs.return_value = True
-            with patch("clickreviews.cr_lint.ClickReviewLint."
-                       "_extract_readme_md") as mock_readme_md:
-                mock_readme_md.return_value = "Something suitably long"
-                c = ClickReviewLint(self.test_name)
-                c.unpack_dir = "/nonexistent.nonexec"
-                c.check_snappy_readme_md()
-                r = c.click_report
-                expected_counts = {'info': None, 'warn': 0, 'error': 0}
-                self.check_results(r, expected_counts)
-                self.assertFalse(mock_readme_md.called)
-
     def test_check_snappy_readme_md_bad(self):
         '''Test check_snappy_readme_md() - short'''
         self.set_test_pkgfmt("snap", "15.04")
diff -rNu -x .bzr ./debian/changelog /tmp/crt.cleanup/debian/changelog
--- ./debian/changelog	2016-02-03 15:17:08.376460000 +0000
+++ /tmp/crt.cleanup/debian/changelog	2016-02-09 15:03:48.392369000 +0000
@@ -4,11 +4,6 @@
   * cr_lint.py: 'accounts' hook was added in 15.04.1. The other checks are
     already in place since r553 which missed this addition
 
-  [ James Tait ]
-  * cr_lint.py: Don't check for the presence of readme.md if the package is a
-    squashfs filesystem. Snappy 2.0 uses squashfs as its file format, and
-    doesn't require readme.md.
-
  -- Jamie Strandboge <jamie@ubuntu.com>  Mon, 01 Feb 2016 12:11:44 -0600
 
 click-reviewers-tools (0.36) xenial; urgency=medium
Download as text