[oe-commits] Hongxu Jia : compress_doc.bbclass: improve manual file detection
git at git.openembedded.org
git at git.openembedded.org
Fri Dec 5 18:01:55 UTC 2014
Module: openembedded-core.git
Branch: master-next
Commit: 886685d207bd5e6e2e236a7c5591f62f5de26090
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=886685d207bd5e6e2e236a7c5591f62f5de26090
Author: Hongxu Jia <hongxu.jia at windriver.com>
Date: Sat Nov 8 13:56:19 2014 +0800
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 at windriver.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
meta/classes/compress_doc.bbclass | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/meta/classes/compress_doc.bbclass b/meta/classes/compress_doc.bbclass
index 6a4e635..afa9cd6 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
More information about the Openembedded-commits
mailing list