Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] `./xbps-src zap` deletes all files in masterdir
@ 2021-12-13  4:44 b-l-a-i-n-e
  2021-12-13  6:10 ` ericonr
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: b-l-a-i-n-e @ 2021-12-13  4:44 UTC (permalink / raw)
  To: ml

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

There is a new pull request by b-l-a-i-n-e against master on the void-packages repository

https://github.com/b-l-a-i-n-e/void-packages xbps-src-zap-34505
https://github.com/void-linux/void-packages/pull/34506

`./xbps-src zap` deletes all files in masterdir
#### Testing the changes
- I tested the changes in this PR: **YES**

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-xbps-src-zap-34505-34506.patch --]
[-- Type: text/x-diff, Size: 609 bytes --]

From fa3ecdc0cab33de94e4109d9831f4871fff58da0 Mon Sep 17 00:00:00 2001
From: b-l-a-i-n-e <blaine.gilbreth@gmail.com>
Date: Sun, 12 Dec 2021 20:43:45 -0800
Subject: [PATCH] `./xbps-src zap` deletes all files in masterdir

---
 xbps-src | 1 +
 1 file changed, 1 insertion(+)

diff --git a/xbps-src b/xbps-src
index ff249015ed02..1c1917bf1058 100755
--- a/xbps-src
+++ b/xbps-src
@@ -292,6 +292,7 @@ check_native_arch() {
 }
 
 masterdir_zap() {
+    chmod -R 777 "$XBPS_MASTERDIR"
     rm -rf "$XBPS_MASTERDIR"
     mkdir -p "$XBPS_MASTERDIR"
     msg_normal "xbps-src: $XBPS_MASTERDIR masterdir cleaned up.\n"

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

* Re: `./xbps-src zap` deletes all files in masterdir
  2021-12-13  4:44 [PR PATCH] `./xbps-src zap` deletes all files in masterdir b-l-a-i-n-e
@ 2021-12-13  6:10 ` ericonr
  2021-12-13  6:53 ` [PR PATCH] [Updated] " b-l-a-i-n-e
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: ericonr @ 2021-12-13  6:10 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/34506#issuecomment-992140086

Comment:
Please word the commit a bit more clearly.

And a solution like d7bf8e06a08bc436316e5416c0eebab0398a53aa would be welcome because it speeds things up considerably.

In any case, we should be able to pass the necessary flags to Go to make this unnecessary. `-rwmodcache` in `GOFLAGS`, according to maldridge.

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

* Re: [PR PATCH] [Updated] `./xbps-src zap` deletes all files in masterdir
  2021-12-13  4:44 [PR PATCH] `./xbps-src zap` deletes all files in masterdir b-l-a-i-n-e
  2021-12-13  6:10 ` ericonr
@ 2021-12-13  6:53 ` b-l-a-i-n-e
  2021-12-13  6:54 ` b-l-a-i-n-e
  2022-02-01 16:57 ` [PR PATCH] [Closed]: zap: `chmod -R` needed to remove Go modules b-l-a-i-n-e
  3 siblings, 0 replies; 5+ messages in thread
From: b-l-a-i-n-e @ 2021-12-13  6:53 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by b-l-a-i-n-e against master on the void-packages repository

https://github.com/b-l-a-i-n-e/void-packages xbps-src-zap-34505
https://github.com/void-linux/void-packages/pull/34506

`./xbps-src zap` deletes all files in masterdir
#### Testing the changes
- I tested the changes in this PR: **YES**

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-xbps-src-zap-34505-34506.patch --]
[-- Type: text/x-diff, Size: 861 bytes --]

From 26f072210beca2ea566d13d363227f404e7e160c Mon Sep 17 00:00:00 2001
From: b-l-a-i-n-e <blaine.gilbreth@gmail.com>
Date: Sun, 12 Dec 2021 20:43:45 -0800
Subject: [PATCH] zap: `chmod -R` needed to remove Go modules

We need to `chmod -R` to clean up after Go packages if they get moved
into the masterdir. But since the removal of go packages is unnecessary
in most cases, we only run if the first `rm -rf` fails.
---
 xbps-src | 1 +
 1 file changed, 1 insertion(+)

diff --git a/xbps-src b/xbps-src
index ff249015ed02..6ee069b54e12 100755
--- a/xbps-src
+++ b/xbps-src
@@ -292,6 +292,7 @@ check_native_arch() {
 }
 
 masterdir_zap() {
+    rm -rf "$XBPS_MASTERDIR" || chmod -R +wX "$XBPS_MASTERDIR" # needed to remove go modules
     rm -rf "$XBPS_MASTERDIR"
     mkdir -p "$XBPS_MASTERDIR"
     msg_normal "xbps-src: $XBPS_MASTERDIR masterdir cleaned up.\n"

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

* Re: `./xbps-src zap` deletes all files in masterdir
  2021-12-13  4:44 [PR PATCH] `./xbps-src zap` deletes all files in masterdir b-l-a-i-n-e
  2021-12-13  6:10 ` ericonr
  2021-12-13  6:53 ` [PR PATCH] [Updated] " b-l-a-i-n-e
@ 2021-12-13  6:54 ` b-l-a-i-n-e
  2022-02-01 16:57 ` [PR PATCH] [Closed]: zap: `chmod -R` needed to remove Go modules b-l-a-i-n-e
  3 siblings, 0 replies; 5+ messages in thread
From: b-l-a-i-n-e @ 2021-12-13  6:54 UTC (permalink / raw)
  To: ml

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

New comment by b-l-a-i-n-e on void-packages repository

https://github.com/void-linux/void-packages/pull/34506#issuecomment-992161780

Comment:
Thanks for taking a look @ericonr, I rebased and pushed up the changes you recommended

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

* Re: [PR PATCH] [Closed]: zap: `chmod -R` needed to remove Go modules
  2021-12-13  4:44 [PR PATCH] `./xbps-src zap` deletes all files in masterdir b-l-a-i-n-e
                   ` (2 preceding siblings ...)
  2021-12-13  6:54 ` b-l-a-i-n-e
@ 2022-02-01 16:57 ` b-l-a-i-n-e
  3 siblings, 0 replies; 5+ messages in thread
From: b-l-a-i-n-e @ 2022-02-01 16:57 UTC (permalink / raw)
  To: ml

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

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

zap: `chmod -R` needed to remove Go modules
https://github.com/void-linux/void-packages/pull/34506

Description:
#### Testing the changes
- I tested the changes in this PR: **YES**

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

end of thread, other threads:[~2022-02-01 16:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-13  4:44 [PR PATCH] `./xbps-src zap` deletes all files in masterdir b-l-a-i-n-e
2021-12-13  6:10 ` ericonr
2021-12-13  6:53 ` [PR PATCH] [Updated] " b-l-a-i-n-e
2021-12-13  6:54 ` b-l-a-i-n-e
2022-02-01 16:57 ` [PR PATCH] [Closed]: zap: `chmod -R` needed to remove Go modules b-l-a-i-n-e

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