From: Johnnynator <Johnnynator@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] hooks/pkglint-devel-paths: do move static find calls out of the loop
Date: Sat, 11 Jul 2020 20:21:36 +0200 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-23526@inbox.vuxu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 534 bytes --]
There is a new pull request by Johnnynator against master on the void-packages repository
https://github.com/Johnnynator/void-packages xbps-src-pkglint-devel-hook
https://github.com/void-linux/void-packages/pull/23526
hooks/pkglint-devel-paths: do move static find calls out of the loop
Right now they got executed every iteration, but weren't dependent
on the loop. Which resulted in getting the output x times more often
than neccessary
A patch file from https://github.com/void-linux/void-packages/pull/23526.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-xbps-src-pkglint-devel-hook-23526.patch --]
[-- Type: text/x-diff, Size: 2501 bytes --]
From ebc48d7fa356bb1bf7103f0bf48e535793fb9185 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Sat, 11 Jul 2020 13:43:19 +0200
Subject: [PATCH] hooks/pkglint-devel-paths: do move static find calls out of
the loop
Right now they got executed every iteration, but weren't dependent
on the loop. Which resulted in getting the output x times more often
than neccessary
---
.../post-install/10-pkglint-devel-paths.sh | 35 +++++++++----------
1 file changed, 17 insertions(+), 18 deletions(-)
diff --git a/common/hooks/post-install/10-pkglint-devel-paths.sh b/common/hooks/post-install/10-pkglint-devel-paths.sh
index 1866ea71000..ff9e0fc514d 100644
--- a/common/hooks/post-install/10-pkglint-devel-paths.sh
+++ b/common/hooks/post-install/10-pkglint-devel-paths.sh
@@ -52,28 +52,27 @@ hook() {
msg_warn "usr/lib/qt5/mkspecs should be in -devel package\n"
;;
esac
+ done
- if [ -n "$(find $PKGDESTDIR/usr/lib -maxdepth 1 -type l -iname '*.so' 2>/dev/null)" ]; then
- solink=1
- fi
-
- if [ -n "$(find $PKGDESTDIR/usr/lib -maxdepth 1 -type f -iname '*.a' 2>/dev/null)" ]; then
- archive=1
- fi
+ if [ -n "$(find $PKGDESTDIR/usr/lib -maxdepth 1 -type l -iname '*.so' 2>/dev/null)" ]; then
+ solink=1
+ fi
- if [ -d $PKGDESTDIR/usr/bin ]; then
- for x in $(find $PKGDESTDIR/usr/bin -type f -executable -iname '*-config'); do
- msg_warn "${x#$PKGDESTDIR\/} should be in -devel package\n"
- done
- fi
+ if [ -n "$(find $PKGDESTDIR/usr/lib -maxdepth 1 -type f -iname '*.a' 2>/dev/null)" ]; then
+ archive=1
+ fi
- if [ -d $PKGDESTDIR/usr/man/man1 ]; then
- for m in $(find $PKGDESTDIR/usr/man/man1 -type f -iname '*-config.1'); do
- msg_warn "${m#$PKGDESTDIR\/} should be in -devel package\n"
- done
- fi
+ if [ -d $PKGDESTDIR/usr/bin ]; then
+ for x in $(find $PKGDESTDIR/usr/bin -type f -executable -iname '*-config'); do
+ msg_warn "${x#$PKGDESTDIR\/} should be in -devel package\n"
+ done
+ fi
- done
+ if [ -d $PKGDESTDIR/usr/man/man1 ]; then
+ for m in $(find $PKGDESTDIR/usr/man/man1 -type f -iname '*-config.1'); do
+ msg_warn "${m#$PKGDESTDIR\/} should be in -devel package\n"
+ done
+ fi
if [ -n "$solink" ]; then
msg_warn "usr/lib/*.so should be in -devel package\n"
next reply other threads:[~2020-07-11 18:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-11 18:21 Johnnynator [this message]
2020-07-12 11:20 ` [PR PATCH] [Merged]: " Johnnynator
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-23526@inbox.vuxu.org \
--to=johnnynator@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).