Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] shutils/pkgtarget: speed up build dir cleanup.
@ 2021-05-11  1:50 ericonr
  2021-05-11  1:54 ` [PR PATCH] [Updated] " ericonr
  2021-05-11 23:09 ` [PR PATCH] [Merged]: " ericonr
  0 siblings, 2 replies; 3+ messages in thread
From: ericonr @ 2021-05-11  1:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1845 bytes --]

There is a new pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages chmod
https://github.com/void-linux/void-packages/pull/30788

shutils/pkgtarget: speed up build dir cleanup.
We need `chmod -R` to be able to cleanup after Go packages, but it's
unnecessary in most other cases. By only running it when the first `rm
-rf` fails, we optimize for the most common case and get a tiny speedup
for this build step.

<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/30788.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-chmod-30788.patch --]
[-- Type: text/x-diff, Size: 2959 bytes --]

From e702258e9afd693da153ef56fecfabe5a5e41c78 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Mon, 10 May 2021 22:47:53 -0300
Subject: [PATCH] shutils/pkgtarget: speed up build dir cleanup.

We need `chmod -R` to be able to cleanup after Go packages, but it's
unnecessary in most other cases. By only running it when the first `rm
-rf` fails, we optimize for the most common case and get a tiny speedup
for this build step.
---
 common/xbps-src/shutils/pkgtarget.sh     |  2 +-
 srcpkgs/poppler/patches/fix-cflags.patch | 21 ---------------------
 2 files changed, 1 insertion(+), 22 deletions(-)
 delete mode 100644 srcpkgs/poppler/patches/fix-cflags.patch

diff --git a/common/xbps-src/shutils/pkgtarget.sh b/common/xbps-src/shutils/pkgtarget.sh
index 314dc5aeabe2..5944b791a4aa 100644
--- a/common/xbps-src/shutils/pkgtarget.sh
+++ b/common/xbps-src/shutils/pkgtarget.sh
@@ -79,7 +79,7 @@ remove_pkg_autodeps() {
 remove_pkg_wrksrc() {
     if [ -d "$wrksrc" ]; then
         msg_normal "$pkgver: cleaning build directory...\n"
-        chmod -R +wX "$wrksrc" # Needed to delete Go Modules
+        rm -rf "$wrksrc" || chmod -R +wX "$wrksrc" # Needed to delete Go Modules
         rm -rf "$wrksrc"
     fi
 }
diff --git a/srcpkgs/poppler/patches/fix-cflags.patch b/srcpkgs/poppler/patches/fix-cflags.patch
deleted file mode 100644
index 9e62b11010ba..000000000000
--- a/srcpkgs/poppler/patches/fix-cflags.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Index: cmake/modules/PopplerMacros.cmake
-===================================================================
---- cmake/modules/PopplerMacros.cmake.orig
-+++ cmake/modules/PopplerMacros.cmake
-@@ -123,14 +123,14 @@ if(CMAKE_COMPILER_IS_GNUCXX)
-   set(DEFAULT_COMPILE_WARNINGS_EXTRA "${_warn} ${_warnx}")
- 
-   set(_save_cxxflags "${CMAKE_CXX_FLAGS}")
--  set(CMAKE_CXX_FLAGS                "-fno-exceptions -fno-check-new -fno-common -D_DEFAULT_SOURCE")
-+  set(CMAKE_CXX_FLAGS                "-fno-exceptions -fno-check-new -fno-common -D_DEFAULT_SOURCE ${_save_cxxflags}")
-   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g ${_save_cxxflags}")
-   set(CMAKE_CXX_FLAGS_RELEASE        "-O2 -DNDEBUG ${_save_cxxflags}")
-   set(CMAKE_CXX_FLAGS_DEBUG          "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline ${_save_cxxflags}")
-   set(CMAKE_CXX_FLAGS_DEBUGFULL      "-g3 -fno-inline ${_save_cxxflags}")
-   set(CMAKE_CXX_FLAGS_PROFILE        "-g3 -fno-inline -ftest-coverage -fprofile-arcs ${_save_cxxflags}")
-   set(_save_cflags "${CMAKE_C_FLAGS}")
--  set(CMAKE_C_FLAGS                  "-std=c99 -D_DEFAULT_SOURCE")
-+  set(CMAKE_C_FLAGS                  "-std=c99 -D_DEFAULT_SOURCE ${_save_cflags}")
-   set(CMAKE_C_FLAGS_RELWITHDEBINFO   "-O2 -g ${_save_cflags}")
-   set(CMAKE_C_FLAGS_RELEASE          "-O2 -DNDEBUG ${_save_cflags}")
-   set(CMAKE_C_FLAGS_DEBUG            "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline ${_save_cflags}")

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PR PATCH] [Updated] shutils/pkgtarget: speed up build dir cleanup.
  2021-05-11  1:50 [PR PATCH] shutils/pkgtarget: speed up build dir cleanup ericonr
@ 2021-05-11  1:54 ` ericonr
  2021-05-11 23:09 ` [PR PATCH] [Merged]: " ericonr
  1 sibling, 0 replies; 3+ messages in thread
From: ericonr @ 2021-05-11  1:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1850 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages chmod
https://github.com/void-linux/void-packages/pull/30788

shutils/pkgtarget: speed up build dir cleanup.
We need `chmod -R` to be able to cleanup after Go packages, but it's
unnecessary in most other cases. By only running it when the first `rm
-rf` fails, we optimize for the most common case and get a tiny speedup
for this build step.

<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/30788.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-chmod-30788.patch --]
[-- Type: text/x-diff, Size: 1119 bytes --]

From 4b8e3d2f2737a5e2ce8203b1ac43f2212fb5ea57 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Mon, 10 May 2021 22:47:53 -0300
Subject: [PATCH] shutils/pkgtarget: speed up build dir cleanup.

We need `chmod -R` to be able to cleanup after Go packages, but it's
unnecessary in most other cases. By only running it when the first `rm
-rf` fails, we optimize for the most common case and get a tiny speedup
for this build step.
---
 common/xbps-src/shutils/pkgtarget.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/xbps-src/shutils/pkgtarget.sh b/common/xbps-src/shutils/pkgtarget.sh
index 314dc5aeabe2..5944b791a4aa 100644
--- a/common/xbps-src/shutils/pkgtarget.sh
+++ b/common/xbps-src/shutils/pkgtarget.sh
@@ -79,7 +79,7 @@ remove_pkg_autodeps() {
 remove_pkg_wrksrc() {
     if [ -d "$wrksrc" ]; then
         msg_normal "$pkgver: cleaning build directory...\n"
-        chmod -R +wX "$wrksrc" # Needed to delete Go Modules
+        rm -rf "$wrksrc" || chmod -R +wX "$wrksrc" # Needed to delete Go Modules
         rm -rf "$wrksrc"
     fi
 }

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PR PATCH] [Merged]: shutils/pkgtarget: speed up build dir cleanup.
  2021-05-11  1:50 [PR PATCH] shutils/pkgtarget: speed up build dir cleanup ericonr
  2021-05-11  1:54 ` [PR PATCH] [Updated] " ericonr
@ 2021-05-11 23:09 ` ericonr
  1 sibling, 0 replies; 3+ messages in thread
From: ericonr @ 2021-05-11 23:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1696 bytes --]

There's a merged pull request on the void-packages repository

shutils/pkgtarget: speed up build dir cleanup.
https://github.com/void-linux/void-packages/pull/30788

Description:
We need `chmod -R` to be able to cleanup after Go packages, but it's
unnecessary in most other cases. By only running it when the first `rm
-rf` fails, we optimize for the most common case and get a tiny speedup
for this build step.

<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-11 23:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-11  1:50 [PR PATCH] shutils/pkgtarget: speed up build dir cleanup ericonr
2021-05-11  1:54 ` [PR PATCH] [Updated] " ericonr
2021-05-11 23:09 ` [PR PATCH] [Merged]: " ericonr

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).