* [PR PATCH] hooks/pkglint-devel-paths: do move static find calls out of the loop
@ 2020-07-11 18:21 Johnnynator
2020-07-12 11:20 ` [PR PATCH] [Merged]: " Johnnynator
0 siblings, 1 reply; 2+ messages in thread
From: Johnnynator @ 2020-07-11 18:21 UTC (permalink / raw)
To: ml
[-- 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"
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PR PATCH] [Merged]: hooks/pkglint-devel-paths: do move static find calls out of the loop
2020-07-11 18:21 [PR PATCH] hooks/pkglint-devel-paths: do move static find calls out of the loop Johnnynator
@ 2020-07-12 11:20 ` Johnnynator
0 siblings, 0 replies; 2+ messages in thread
From: Johnnynator @ 2020-07-12 11:20 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 355 bytes --]
There's a merged pull request on the void-packages repository
hooks/pkglint-devel-paths: do move static find calls out of the loop
https://github.com/void-linux/void-packages/pull/23526
Description:
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-12 11:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-11 18:21 [PR PATCH] hooks/pkglint-devel-paths: do move static find calls out of the loop Johnnynator
2020-07-12 11:20 ` [PR PATCH] [Merged]: " Johnnynator
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).