aboutsummaryrefslogtreecommitdiffstats
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:22:41 +0000
commit886685d207bd5e6e2e236a7c5591f62f5de26090 (patch)
treea12a43b10828663c61799e0a278f9a3816bdf7bf
parent33bea949bae54ddc89aa83cf07d7b1ee62e2b393 (diff)
downloadopenembedded-core-contrib-886685d207bd5e6e2e236a7c5591f62f5de26090.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. Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-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 6a4e635982a..afa9cd614ae 100644
--- a/meta/classes/compress_doc.bbclass
+++ b/meta/classes/compress_doc.bbclass
@@ -136,11 +136,14 @@ def _is_info(file):
return False
def _is_man(file):
+ import re
+
# It refers MANSECT-var in man(1.6g)'s man.config
- flags = '.1:.1p:.8:.2:.3:.3p:.4:.5:.6:.7:.9:.0p:.tcl:.n:.l:.p:.o'.split(':')
- for flag in flags:
- if os.path.basename(file).endswith(flag):
- return True
+ # ".1:.1p:.8:.2:.3:.3p:.4:.5:.6:.7:.9:.0p:.tcl:.n:.l:.p:.o"
+ # Not start with '.', and contain the above colon-seperate element
+ p = re.compile(r'[^\.]+\.([1-9lnop]|0p|tcl)')
+ if p.search(file):
+ return True
return False