X-Original-To: alpine-devel@mail.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id 03F98DC0156 for ; Fri, 14 Aug 2015 15:07:41 +0000 (UTC) Received: from lithium.8pit.net (lithium.8pit.net [141.101.32.65]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 32EACDC00E4; Fri, 14 Aug 2015 15:07:39 +0000 (UTC) Received: from localhost (ip5f5ac946.dynamic.kabel-deutschland.de [95.90.201.70]); by lithium.8pit.net (OpenSMTPD) with ESMTPSA id 3c5842a4; TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Fri, 14 Aug 2015 17:07:37 +0200 (CEST) From: =?UTF-8?q?S=C3=B6ren=20Tempel?= To: alpine-devel@lists.alpinelinux.org Subject: [alpine-devel] [PATCH] abuild: check for /usr/share/{doc,man} Date: Fri, 14 Aug 2015 17:07:28 +0200 Message-Id: <1439564848-545-1-git-send-email-soeren+git@soeren-tempel.net> X-Mailer: git-send-email 2.5.0 X-Virus-Scanned: ClamAV using ClamSMTP X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: Output a warning if those directories exist on a non-doc package. Furthermore, check if uncompressed man pages where installed to /usr/share/man. Maybe a similar check would be a good idea for the -libs and -dev packages? --- abuild.in | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/abuild.in b/abuild.in index 01b4b62..17fae62 100644 --- a/abuild.in +++ b/abuild.in @@ -645,6 +645,24 @@ postcheck() { error "Found /usr/lib/charset.alias" return 1 fi + # look for /usr/share/doc + if [ -e "$dir"/usr/share/doc ] \ + && ! is_doc_pkg; then + warning "Found /usr/share/doc but package name doesn't end with -doc" + fi + # look for /usr/share/man + if [ -e "$dir"/usr/share/man ] \ + && ! is_doc_pkg; then + warning "Found /usr/share/man but package name doesn't end with -doc" + + # check for uncompressed man pages + i=$(find "$dir"/usr/share/man -name '*.[0-9]' -type f | sed "s|^$dir|\t|") + if [ -n "$i" ]; then + error "Found uncompressed man pages:" + echo "$i" + return 1 + fi + fi # check directory permissions i=$(find "$dir" -type d -perm -777 | sed "s|^$dir|\t|") if [ -n "$i" ]; then @@ -946,6 +964,11 @@ is_dev_pkg() { test "${subpkgname%-dev}" != "$subpkgname" } +# returns true if this is the -doc package +is_doc_pkg() { + test "${subpkgname%-doc}" != "$subpkgname" +} + # check that noarch is set if needed archcheck() { options_has "!archcheck" && return 0 -- 2.5.0 --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---