check for license files in %license and %doc
Florian Lehner
lehner.florian86 at gmail.com
Thu Jan 29 18:21:36 UTC 2015
hi!
I'm Florian and new to this list.
As I wrote ticket #244
(https://fedorahosted.org/FedoraReview/ticket/244) yesterday I didn't
know about the already existing thread here on this ML
(https://lists.fedorahosted.org/pipermail/fedorareview/2015-January/000207.html).
So here is the patch, I already attached to #244.
For the records - my FAS-Name: flo
Cheers,
Florian
>From 881b4c7cebaabfddc0fb611fea847f4539eaa798 Mon Sep 17 00:00:00 2001
From: Lehner Florian <dev at der-flo.net>
Date: Wed, 28 Jan 2015 20:11:41 +0100
Subject: [PATCH] check for license files in %license and %doc
Signed-off-by: Lehner Florian <dev at der-flo.net>
---
plugins/generic.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/plugins/generic.py b/plugins/generic.py
index 4b09393..0bcc1ad 100644
--- a/plugins/generic.py
+++ b/plugins/generic.py
@@ -769,9 +769,14 @@ class CheckLicensInDoc(GenericCheckBase):
for pkg in self.spec.packages:
nvr = self.spec.get_package_nvr(pkg)
rpm_path = Mock.get_package_rpm_path(nvr)
+ ''' Check for license text files in %doc '''
cmd = 'rpm -qldp ' + rpm_path
doclist = check_output(cmd.split())
docs.extend(doclist.split())
+ ''' Check for license text files in %license '''
+ cmd = 'rpm -qlLp ' + rpm_path
+ doclist = check_output(cmd.split())
+ docs.extend(doclist.split())
docs = map(lambda f: f.split('/')[-1], docs)
for _license in licenses:
--
2.1.0
More information about the fedorareview
mailing list