Mail archive
alpine-devel

Re: [alpine-devel] [PATCH] abuild: check for man pages in non-standard locations

From: Natanael Copa <ncopa_at_alpinelinux.org>
Date: Wed, 19 Aug 2015 08:19:53 +0200

On Tue, 18 Aug 2015 22:00:59 +0200
Sören Tempel <soeren+git_at_soeren-tempel.net> wrote:

> Some packages like fakeroot install man pages to
> /usr/share/man/{de,fr,pl,...}. In my opinion we don't need those man
> pages and thus I would suggest that only /usr/share/man[0-8] should
> exist.

I don't mind those localized pages. We may not support it but I don't
want forbid it either.

> This also allows us to simply our check for non-compressed man pages.

The check is still flawed, there are still things like *.[0-9]pm and
*.[0.9]p. And as Isaac mentioned, we need to deal with symlinks too.

I wonder if we should look for an external tool to help us do the
compression.


> ---
> abuild.in | 15 +++++++++++----
> 1 file changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/abuild.in b/abuild.in
> index 6d393c8..da83ca1 100644
> --- a/abuild.in
> +++ b/abuild.in
> _at_@ -655,13 +655,20 @@ postcheck() {
> if ! is_doc_pkg "$name"; then
> warning "Found /usr/share/man but package name doesn't end with -doc"
> fi
> - # check for uncompressed man pages
> - i=$(find "$dir"/usr/share/man -name '*.[0-9]' -type f | sed "s|^$dir|\t|")
> + # check for man pages in non-standard locations
> + i=$(find "$dir"/usr/share/man -maxdepth 1 \! \( -name man[0-8] -a -type d \) -a \! -path "$dir"/usr/share/man | sed "s|^$dir|\t|")
> if [ -n "$i" ]; then
> - error "Found uncompressed man pages:"
> - echo "$i"
> + error "Found non-standard man page sections:"
> + echo $i

I don't think we should error on
> return 1
> fi
> + # check for uncompressed man pages
> + for i in "$dir"/usr/share/man/man[0-8]/*.[0-8]; do
> + if [ -e "$i" ]; then
> + error "Found uncompressed man pages: ${i#$dir/}"
> + return 1
> + fi
> + done
> fi
> # check directory permissions
> i=$(find "$dir" -type d -perm -777 | sed "s|^$dir|\t|")



---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Wed Aug 19 2015 - 08:19:53 GMT