diff options
author | Ross Burton <ross.burton@intel.com> | 2020-02-03 10:19:55 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-02-04 15:56:29 +0000 |
commit | cf7090d481f942d00dc7026f90798f899641da92 (patch) | |
tree | f4d8050a4e1d2b7da7b4f95262ba880914c2e4fe /meta/classes/podfix.bbclass | |
parent | 776eea0691dde919741ae8f836e09b44daf5af7d (diff) | |
download | poky-cf7090d481f942d00dc7026f90798f899641da92.tar.gz |
podfix: remove
Now that we don't use the host pod2man (oe-core deda455) the podfix
class is redundant and can be removed.
(From OE-Core rev: 46884b1443d92cea877201296bd480b6cbd71cca)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/podfix.bbclass')
-rw-r--r-- | meta/classes/podfix.bbclass | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/meta/classes/podfix.bbclass b/meta/classes/podfix.bbclass deleted file mode 100644 index cc8210a27e..0000000000 --- a/meta/classes/podfix.bbclass +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | python pod_strip_version() { | ||
2 | import re | ||
3 | |||
4 | def opener(filename, mode): | ||
5 | if filename.endswith(".gz"): | ||
6 | import gzip | ||
7 | return gzip.open(filename, mode) | ||
8 | elif filename.endswith(".bz2"): | ||
9 | import bz2 | ||
10 | return bz2.open(filename, mode) | ||
11 | else: | ||
12 | return open(filename, mode) | ||
13 | |||
14 | bad_re = re.compile(rb"Automatically generated by Pod::Man( [0-9]+.+)") | ||
15 | |||
16 | for root, dirs, files in os.walk(d.expand("${D}${mandir}")): | ||
17 | for filename in files: | ||
18 | filename = os.path.join(root, filename) | ||
19 | if not os.path.isfile(filename): | ||
20 | continue | ||
21 | |||
22 | with opener(filename, "rb") as manfile: | ||
23 | manpage = manfile.read() | ||
24 | m = bad_re.search(manpage) | ||
25 | if not m: | ||
26 | continue | ||
27 | |||
28 | bb.note("podfix: stripping version from %s" % filename) | ||
29 | os.unlink(filename) | ||
30 | with opener(filename, "wb") as manfile: | ||
31 | manfile.write(manpage[:m.start(1)]) | ||
32 | manfile.write(manpage[m.end(1):]) | ||
33 | } | ||
34 | |||
35 | do_install[postfuncs] += "pod_strip_version" | ||