1 |
On Sat, 15 Apr 2017 13:04:56 +0200 |
2 |
Michał Górny <mgorny@g.o> wrote: |
3 |
|
4 |
> Add a check for dosym with target path matching absolute paths |
5 |
> controlled by the package manager, e.g. /bin, /etc... |
6 |
> |
7 |
> Example output: |
8 |
> |
9 |
> ebuild.absdosym 5 |
10 |
> app-editors/nano/nano-2.5.3.ebuild: dosym '/bin/nano'... could use |
11 |
> relative path on line: 81 --- |
12 |
> repoman/man/repoman.1 | 4 ++++ |
13 |
> repoman/pym/repoman/modules/scan/ebuild/checks.py | 2 +- |
14 |
> repoman/pym/repoman/qa_data.py | 4 ++++ |
15 |
> 3 files changed, 9 insertions(+), 1 deletion(-) |
16 |
> |
17 |
> diff --git a/repoman/man/repoman.1 b/repoman/man/repoman.1 |
18 |
> index 9b106906f..78e4b7275 100644 |
19 |
> --- a/repoman/man/repoman.1 |
20 |
> +++ b/repoman/man/repoman.1 |
21 |
> @@ -292,6 +292,10 @@ Some files listed in SRC_URI aren't referenced |
22 |
> in the Manifest .B digest.unused |
23 |
> Some files listed in the Manifest aren't referenced in SRC_URI |
24 |
> .TP |
25 |
> +.B ebuild.absdosym |
26 |
> +Ebuild uses 'dosym' with explicit absolute path where relative path |
27 |
> +could be used |
28 |
> +.TP |
29 |
> .B ebuild.badheader |
30 |
> This ebuild has a malformed header |
31 |
> .TP |
32 |
> diff --git a/repoman/pym/repoman/modules/scan/ebuild/checks.py |
33 |
> b/repoman/pym/repoman/modules/scan/ebuild/checks.py index |
34 |
> 57c8b10a5..e6e5d78ba 100644 --- |
35 |
> a/repoman/pym/repoman/modules/scan/ebuild/checks.py +++ |
36 |
> b/repoman/pym/repoman/modules/scan/ebuild/checks.py @@ -921,7 +921,7 |
37 |
> @@ class EbuildNonRelativeDosym(LineCheck): def check(self, num, |
38 |
> line): match = self.regex.match(line) |
39 |
> if match: |
40 |
> - return "dosym '%s' could use relative path" |
41 |
> % (match.group(1), ) + " on line: %d" |
42 |
> + return "dosym '%s'... could use relative |
43 |
> path" % (match.group(1), ) + " on line: %d" |
44 |
> |
45 |
> _base_check_classes = (InheritEclass, LineCheck, PhaseCheck) |
46 |
> diff --git a/repoman/pym/repoman/qa_data.py |
47 |
> b/repoman/pym/repoman/qa_data.py index 132a55be3..a59fed778 100644 |
48 |
> --- a/repoman/pym/repoman/qa_data.py |
49 |
> +++ b/repoman/pym/repoman/qa_data.py |
50 |
> @@ -195,6 +195,9 @@ qahelp = { |
51 |
> "Some files listed in SRC_URI aren't referenced in |
52 |
> the Manifest"), "digest.unused": ( |
53 |
> "Some files listed in the Manifest aren't referenced |
54 |
> in SRC_URI"), |
55 |
> + "ebuild.absdosym": ( |
56 |
> + "This ebuild uses absolute target to dosym where |
57 |
> relative symlink" |
58 |
> + " could be used instead"), |
59 |
> "ebuild.majorsyn": ( |
60 |
> "This ebuild has a major syntax error" |
61 |
> " that may cause the ebuild to fail partially or |
62 |
> fully"), @@ -262,6 +265,7 @@ qawarnings = set(( |
63 |
> "RDEPEND.suspect", |
64 |
> "virtual.suspect", |
65 |
> "RESTRICT.invalid", |
66 |
> + "ebuild.absdosym", |
67 |
> "ebuild.minorsyn", |
68 |
> "ebuild.badheader", |
69 |
> "ebuild.patches", |
70 |
|
71 |
|
72 |
looks good. merge approved :) |
73 |
|
74 |
thank you |
75 |
|
76 |
-- |
77 |
Brian Dolbec <dolsen> |