* [PR PATCH] Fix empty dir check in i686 masterdirs.
@ 2019-10-20 22:23 voidlinux-github
2019-10-22 14:58 ` [PR PATCH] [Merged]: " voidlinux-github
0 siblings, 1 reply; 2+ messages in thread
From: voidlinux-github @ 2019-10-20 22:23 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 872 bytes --]
There is a new pull request by Johnnynator against master on the void-packages repository
https://github.com/Johnnynator/void-packages lib32
https://github.com/void-linux/void-packages/pull/15654
Fix empty dir check in i686 masterdirs.
See e.g. https://travis-ci.org/void-linux/void-packages/builds/600443626?utm_source=github_status&utm_medium=notification , all of the builds should have failed, but i686 created a empty package even without the `meta` build_style. The issue was that the `lib32 -> lib` symlink still existed at the point of checking for empty dir, so `/usr` was in fact not empty, but is at `do_pkg`. Reordering the hooks fixes this but reveals another issue, namely that `rmdir -p` will remove even `/destdir` and would therefore break actual meta packages.
A patch file from https://github.com/void-linux/void-packages/pull/15654.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-lib32-15654.patch --]
[-- Type: text/x-diff, Size: 2082 bytes --]
From 96b0edd68f77e041808c60c7100dd1ada392022d Mon Sep 17 00:00:00 2001
From: John <johnz@posteo.net>
Date: Mon, 21 Oct 2019 00:16:31 +0200
Subject: [PATCH 1/2] hooks/post-install: do remove lib32 symlink before
checking for empty dirs
this resulted in empty i686 packages never getting flagged as empty
since the /usr/lib32 -> lib symlink was only removed after the check
---
common/hooks/post-install/{98-lib32.sh => 00-lib32.sh} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename common/hooks/post-install/{98-lib32.sh => 00-lib32.sh} (100%)
diff --git a/common/hooks/post-install/98-lib32.sh b/common/hooks/post-install/00-lib32.sh
similarity index 100%
rename from common/hooks/post-install/98-lib32.sh
rename to common/hooks/post-install/00-lib32.sh
From 5e13391dc0e6626c4075ced12924414fd92e2038 Mon Sep 17 00:00:00 2001
From: John <johnz@posteo.net>
Date: Mon, 21 Oct 2019 00:13:40 +0200
Subject: [PATCH 2/2] hooks/post-install/03-remove-empty-dirs.sh: use find
-delete instead of rmdir -p
rmdir -p could end up deleting even /destdir when a empty package would
not have any subpackages with a i686 masterdir.
---
common/hooks/post-install/03-remove-empty-dirs.sh | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/common/hooks/post-install/03-remove-empty-dirs.sh b/common/hooks/post-install/03-remove-empty-dirs.sh
index 4b7122938ab..c54f458f61e 100644
--- a/common/hooks/post-install/03-remove-empty-dirs.sh
+++ b/common/hooks/post-install/03-remove-empty-dirs.sh
@@ -2,13 +2,9 @@
hook() {
if [ -d "${PKGDESTDIR}" ]; then
- find "${PKGDESTDIR}" -type d -empty|sort -r|while read f; do
+ find "${PKGDESTDIR}" -mindepth 1 -type d -empty -print -delete|sort -r|while read f; do
_dir="${f##${PKGDESTDIR}}"
- [ -z "${_dir}" ] && continue
- rmdir --ignore-fail-on-non-empty -p "$f" &>/dev/null
msg_warn "$pkgver: removed empty dir: ${_dir}\n"
done
- # Create PKGDESTDIR in case it has been removed previously.
- mkdir -p ${PKGDESTDIR}
fi
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PR PATCH] [Merged]: Fix empty dir check in i686 masterdirs.
2019-10-20 22:23 [PR PATCH] Fix empty dir check in i686 masterdirs voidlinux-github
@ 2019-10-22 14:58 ` voidlinux-github
0 siblings, 0 replies; 2+ messages in thread
From: voidlinux-github @ 2019-10-22 14:58 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 715 bytes --]
There's a merged pull request on the void-packages repository
Fix empty dir check in i686 masterdirs.
https://github.com/void-linux/void-packages/pull/15654
Description:
See e.g. https://travis-ci.org/void-linux/void-packages/builds/600443626?utm_source=github_status&utm_medium=notification , all of the builds should have failed, but i686 created a empty package even without the `meta` build_style. The issue was that the `lib32 -> lib` symlink still existed at the point of checking for empty dir, so `/usr` was in fact not empty, but is at `do_pkg`. Reordering the hooks fixes this but reveals another issue, namely that `rmdir -p` will remove even `/destdir` and would therefore break actual meta packages.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-22 14:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-20 22:23 [PR PATCH] Fix empty dir check in i686 masterdirs voidlinux-github
2019-10-22 14:58 ` [PR PATCH] [Merged]: " voidlinux-github
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).