summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2014-11-08 13:56:19 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-03 12:23:59 +0000
commit887ffa0d7e19f08b9ef1bc3edf591f6a2998b835 (patch)
treeea00ce1a8c7ef69e75d9a52909f0b2431f2896f6 /meta
parent97d5b997cf34c58e8dfd85bbc868ae708a63b4b5 (diff)
downloadpoky-887ffa0d7e19f08b9ef1bc3edf591f6a2998b835.tar.gz
compress_doc.bbclass: improve manual file detection
The previous detection missing the following manual file: ... gawk-doc/usr/share/man/man3/readfile.3am libpcap-doc/usr/share/man/man3/pcap_dump_open.3pcap ... We use re to imporve it. (From OE-Core rev: 886685d207bd5e6e2e236a7c5591f62f5de26090) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/compress_doc.bbclass11
1 files changed, 7 insertions, 4 deletions
diff --git a/meta/classes/compress_doc.bbclass b/meta/classes/compress_doc.bbclass
index 6a4e635982..afa9cd614a 100644
--- a/meta/classes/compress_doc.bbclass
+++ b/meta/classes/compress_doc.bbclass
@@ -136,11 +136,14 @@ def _is_info(file):
136 return False 136 return False
137 137
138def _is_man(file): 138def _is_man(file):
139 import re
140
139 # It refers MANSECT-var in man(1.6g)'s man.config 141 # It refers MANSECT-var in man(1.6g)'s man.config
140 flags = '.1:.1p:.8:.2:.3:.3p:.4:.5:.6:.7:.9:.0p:.tcl:.n:.l:.p:.o'.split(':') 142 # ".1:.1p:.8:.2:.3:.3p:.4:.5:.6:.7:.9:.0p:.tcl:.n:.l:.p:.o"
141 for flag in flags: 143 # Not start with '.', and contain the above colon-seperate element
142 if os.path.basename(file).endswith(flag): 144 p = re.compile(r'[^\.]+\.([1-9lnop]|0p|tcl)')
143 return True 145 if p.search(file):
146 return True
144 147
145 return False 148 return False
146 149