Merge lp:~mvo/click-reviewers-tools/squashfs-fixes into lp:click-reviewers-tools

Proposed by Michael Vogt
Status: Merged
Merged at revision: 539
Proposed branch: lp:~mvo/click-reviewers-tools/squashfs-fixes
Merge into: lp:click-reviewers-tools
Diff against target: 38 lines (+7/-0)
3 files modified
clickreviews/cr_common.py (+3/-0)
clickreviews/cr_lint.py (+3/-0)
clickreviews/cr_tests.py (+1/-0)
To merge this branch: bzr merge lp:~mvo/click-reviewers-tools/squashfs-fixes
Reviewer Review Type Date Requested Status
Jamie Strandboge (community) Approve
Review via email: mp+275877@code.launchpad.net

Description of the change

Tiny branch that skips the raw_unpack_pkg() and hashes.yaml validation on snappy systems.

To post a comment you must log in.
540. By Michael Vogt

patch clickreviews.cr_lint.is_squashfs by default

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

LGTM, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'clickreviews/cr_common.py'
2--- clickreviews/cr_common.py 2015-10-27 08:51:12 +0000
3+++ clickreviews/cr_common.py 2015-10-27 16:27:54 +0000
4@@ -703,6 +703,9 @@
5 pkg = fn
6 if not pkg.startswith('/'):
7 pkg = os.path.abspath(pkg)
8+ # nothing to do for squashfs images
9+ if is_squashfs(pkg):
10+ return ""
11
12 if dest is not None and os.path.exists(dest):
13 error("'%s' exists. Aborting." % dest)
14
15=== modified file 'clickreviews/cr_lint.py'
16--- clickreviews/cr_lint.py 2015-10-27 08:51:12 +0000
17+++ clickreviews/cr_lint.py 2015-10-27 16:27:54 +0000
18@@ -1225,6 +1225,9 @@
19 '''Check snappy hashes.yaml'''
20 if not self.is_snap:
21 return
22+ # no hashes.yaml for squashfs images
23+ if is_squashfs(self.click_package):
24+ return
25
26 def _check_allowed_perms(mode, allowed):
27 '''Check that mode only uses allowed perms'''
28
29=== modified file 'clickreviews/cr_tests.py'
30--- clickreviews/cr_tests.py 2015-10-16 02:54:07 +0000
31+++ clickreviews/cr_tests.py 2015-10-27 16:27:54 +0000
32@@ -367,6 +367,7 @@
33 patches.append(patch(
34 'clickreviews.cr_framework.ClickReviewFramework._has_framework_in_metadir',
35 _has_framework_in_metadir))
36+ patches.append(patch("clickreviews.cr_lint.is_squashfs", lambda x: False))
37
38 return patches
39

Subscribers

People subscribed via source and target branches