Gentoo Archives: gentoo-dev

From: Kent Fredric <kentnl@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] bzipped manpages
Date: Tue, 17 Jan 2017 02:32:31
Message-Id: 20170117153141.06875dd4@katipo2.lan
In Reply to: Re: [gentoo-dev] bzipped manpages by "Michał Górny"
1 On Tue, 10 Jan 2017 15:06:47 +0100
2 Michał Górny <mgorny@g.o> wrote:
3
4 > > the manpage formatter needs to call
5 > > external unpackers. All this to save 40M. I honestly don't think
6 > > it's worth it.
7 >
8 > Calling external tools in a pipeline is a pretty normal solution
9 > in the *nix world. It could be even considered safer than implementing
10 > multiple disjoint features in a single tool where an issue in one
11 > module could damage other parts of the program.
12
13 Its also possible to handle this in an inside-out mechansim
14 using a `zrun` from `sys-apps/moreutils`
15
16
17 ---
18 zrun head -n 1 /usr/share/man/man1/cat.1.bz2
19 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35.
20
21 ---
22
23 Its a bit of an unusual approach, but can do things where normal pipe become difficult
24
25 How it works becomes quickly apparent:
26
27 --
28 zrun md5sum /usr/share/man/man1/{cat,pr}.1.bz2
29 88ca1b726a36ae027d435e4c21fe50ba /tmp/8NJoD5mrdJ-cat.1
30 78bb81a36e4bf7c32dcf4231361a17d6 /tmp/6xSouo9fyC-pr.1
31 ---
32
33 Its a nice trick to have up your sleeve :)