* Re: [PR PATCH] [Updated] xbps-src: Add remove-obsoletes command
2021-04-11 9:33 [PR PATCH] xbps-src: Add remove-obsoletes command the-maldridge
@ 2021-04-12 9:33 ` the-maldridge
2021-04-12 17:22 ` [PR REVIEW] " Chocimier
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: the-maldridge @ 2021-04-12 9:33 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 589 bytes --]
There is an updated pull request by the-maldridge against master on the void-packages repository
https://github.com/the-maldridge/void-packages remove-obsoletes
https://github.com/void-linux/void-packages/pull/30147
xbps-src: Add remove-obsoletes command
This cleans more than it probably should since it will clean several layers of nesting. We could enable globstar and iterate over everything it finds, but I'm not particularly keen on this.
Open to changes on this, looking for feedback.
A patch file from https://github.com/void-linux/void-packages/pull/30147.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-remove-obsoletes-30147.patch --]
[-- Type: text/x-diff, Size: 1558 bytes --]
From 324d4cd97e39f7dcd4a6bac0facfc4609ee57f9e Mon Sep 17 00:00:00 2001
From: Michael Aldridge <maldridge@VoidLinux.org>
Date: Sun, 11 Apr 2021 02:32:01 -0700
Subject: [PATCH] xbps-src: Add remove-obsoletes command
---
common/xbps-src/shutils/remove_obsoletes.sh | 6 ++++++
xbps-src | 6 ++++++
2 files changed, 12 insertions(+)
create mode 100644 common/xbps-src/shutils/remove_obsoletes.sh
diff --git a/common/xbps-src/shutils/remove_obsoletes.sh b/common/xbps-src/shutils/remove_obsoletes.sh
new file mode 100644
index 000000000000..47fad76c7468
--- /dev/null
+++ b/common/xbps-src/shutils/remove_obsoletes.sh
@@ -0,0 +1,6 @@
+remove_obsoletes () {
+ for repo in $XBPS_HOSTDIR/binpkgs $XBPS_HOSTDIR/binpkgs/*/ $XBPS_HOSTDIR/binpkgs/*/*/ ; do
+ msg_normal "Cleaning $repo\n"
+ XBPS_ARCH=${XBPS_CROSS_TARGET:-$XBPS_MACHINE} $XBPS_RINDEX_CMD -r $repo
+ done
+}
diff --git a/xbps-src b/xbps-src
index 9d88873ab2c5..379bdd36bfd6 100755
--- a/xbps-src
+++ b/xbps-src
@@ -78,6 +78,9 @@ remove <pkgname>
remove-autodeps
Removes all package dependencies that were installed automatically.
+remove-obsoletes
+ Remove all obsolete packages from default repositories as detected by xbps-rindex.
+
purge-distfiles
Removes all obsolete distfiles in <hostdir>/sources.
@@ -799,6 +802,9 @@ case "$XBPS_TARGET" in
read_pkg
remove_pkg $XBPS_CROSS_BUILD
;;
+ remove-obsoletes)
+ remove_obsoletes
+ ;;
list)
$XBPS_QUERY_CMD -l
;;
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PR REVIEW] xbps-src: Add remove-obsoletes command
2021-04-11 9:33 [PR PATCH] xbps-src: Add remove-obsoletes command the-maldridge
2021-04-12 9:33 ` [PR PATCH] [Updated] " the-maldridge
@ 2021-04-12 17:22 ` Chocimier
2021-04-12 17:26 ` the-maldridge
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Chocimier @ 2021-04-12 17:22 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 238 bytes --]
New review comment by Chocimier on void-packages repository
https://github.com/void-linux/void-packages/pull/30147#discussion_r611817253
Comment:
it removes from repositories resulting from building in branch or from `xbps-src -r` too.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PR REVIEW] xbps-src: Add remove-obsoletes command
2021-04-11 9:33 [PR PATCH] xbps-src: Add remove-obsoletes command the-maldridge
2021-04-12 9:33 ` [PR PATCH] [Updated] " the-maldridge
2021-04-12 17:22 ` [PR REVIEW] " Chocimier
@ 2021-04-12 17:26 ` the-maldridge
2021-04-12 17:49 ` ericonr
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: the-maldridge @ 2021-04-12 17:26 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 304 bytes --]
New review comment by the-maldridge on void-packages repository
https://github.com/void-linux/void-packages/pull/30147#discussion_r611820000
Comment:
Indeed. I'm not sure yet that this is a problem, as the primary consumer of this feature is Void itself in an environment where there are no branches.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PR REVIEW] xbps-src: Add remove-obsoletes command
2021-04-11 9:33 [PR PATCH] xbps-src: Add remove-obsoletes command the-maldridge
` (2 preceding siblings ...)
2021-04-12 17:26 ` the-maldridge
@ 2021-04-12 17:49 ` ericonr
2021-04-12 17:49 ` ericonr
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ericonr @ 2021-04-12 17:49 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 191 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30147#discussion_r611834971
Comment:
I think it's worth documenting it, at least?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PR REVIEW] xbps-src: Add remove-obsoletes command
2021-04-11 9:33 [PR PATCH] xbps-src: Add remove-obsoletes command the-maldridge
` (3 preceding siblings ...)
2021-04-12 17:49 ` ericonr
@ 2021-04-12 17:49 ` ericonr
2021-04-12 17:58 ` the-maldridge
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ericonr @ 2021-04-12 17:49 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 276 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30147#discussion_r611835318
Comment:
```suggestion
Remove all obsolete packages from $hostdir/binpkgs as detected by xbps-rindex.
```
or something like that.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PR REVIEW] xbps-src: Add remove-obsoletes command
2021-04-11 9:33 [PR PATCH] xbps-src: Add remove-obsoletes command the-maldridge
` (4 preceding siblings ...)
2021-04-12 17:49 ` ericonr
@ 2021-04-12 17:58 ` the-maldridge
2021-04-13 3:36 ` [PR PATCH] [Updated] " the-maldridge
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: the-maldridge @ 2021-04-12 17:58 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 310 bytes --]
New review comment by the-maldridge on void-packages repository
https://github.com/void-linux/void-packages/pull/30147#discussion_r611841369
Comment:
I think what I was more getting at was I'm not convinced that the automatic folder detection was correct. I wonder if its better to just have a static list.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PR PATCH] [Updated] xbps-src: Add remove-obsoletes command
2021-04-11 9:33 [PR PATCH] xbps-src: Add remove-obsoletes command the-maldridge
` (5 preceding siblings ...)
2021-04-12 17:58 ` the-maldridge
@ 2021-04-13 3:36 ` the-maldridge
2021-04-13 3:39 ` the-maldridge
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: the-maldridge @ 2021-04-13 3:36 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 589 bytes --]
There is an updated pull request by the-maldridge against master on the void-packages repository
https://github.com/the-maldridge/void-packages remove-obsoletes
https://github.com/void-linux/void-packages/pull/30147
xbps-src: Add remove-obsoletes command
This cleans more than it probably should since it will clean several layers of nesting. We could enable globstar and iterate over everything it finds, but I'm not particularly keen on this.
Open to changes on this, looking for feedback.
A patch file from https://github.com/void-linux/void-packages/pull/30147.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-remove-obsoletes-30147.patch --]
[-- Type: text/x-diff, Size: 1608 bytes --]
From 342f2db9ddf9a3c7662a01cb8bac086baa4896bc Mon Sep 17 00:00:00 2001
From: Michael Aldridge <maldridge@VoidLinux.org>
Date: Sun, 11 Apr 2021 02:32:01 -0700
Subject: [PATCH] xbps-src: Add remove-obsoletes command
---
common/xbps-src/shutils/remove_obsoletes.sh | 6 ++++++
xbps-src | 6 ++++++
2 files changed, 12 insertions(+)
create mode 100644 common/xbps-src/shutils/remove_obsoletes.sh
diff --git a/common/xbps-src/shutils/remove_obsoletes.sh b/common/xbps-src/shutils/remove_obsoletes.sh
new file mode 100644
index 000000000000..973c94aa818b
--- /dev/null
+++ b/common/xbps-src/shutils/remove_obsoletes.sh
@@ -0,0 +1,6 @@
+remove_obsoletes () {
+ for repo in $XBPS_HOSTDIR/binpkgs $XBPS_HOSTDIR/binpkgs/nonfree $XBPS_HOSTDIR/binpkgs/multilib/ $XBPS_HOSTDIR/binpkgs/multilib/nonfree ; do
+ msg_normal "Cleaning $repo\n"
+ XBPS_ARCH=${XBPS_CROSS_TARGET:-$XBPS_MACHINE} $XBPS_RINDEX_CMD -r $repo
+ done
+}
diff --git a/xbps-src b/xbps-src
index 9d88873ab2c5..379bdd36bfd6 100755
--- a/xbps-src
+++ b/xbps-src
@@ -78,6 +78,9 @@ remove <pkgname>
remove-autodeps
Removes all package dependencies that were installed automatically.
+remove-obsoletes
+ Remove all obsolete packages from default repositories as detected by xbps-rindex.
+
purge-distfiles
Removes all obsolete distfiles in <hostdir>/sources.
@@ -799,6 +802,9 @@ case "$XBPS_TARGET" in
read_pkg
remove_pkg $XBPS_CROSS_BUILD
;;
+ remove-obsoletes)
+ remove_obsoletes
+ ;;
list)
$XBPS_QUERY_CMD -l
;;
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PR PATCH] [Updated] xbps-src: Add remove-obsoletes command
2021-04-11 9:33 [PR PATCH] xbps-src: Add remove-obsoletes command the-maldridge
` (6 preceding siblings ...)
2021-04-13 3:36 ` [PR PATCH] [Updated] " the-maldridge
@ 2021-04-13 3:39 ` the-maldridge
2021-04-13 21:14 ` Duncaen
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: the-maldridge @ 2021-04-13 3:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 589 bytes --]
There is an updated pull request by the-maldridge against master on the void-packages repository
https://github.com/the-maldridge/void-packages remove-obsoletes
https://github.com/void-linux/void-packages/pull/30147
xbps-src: Add remove-obsoletes command
This cleans more than it probably should since it will clean several layers of nesting. We could enable globstar and iterate over everything it finds, but I'm not particularly keen on this.
Open to changes on this, looking for feedback.
A patch file from https://github.com/void-linux/void-packages/pull/30147.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-remove-obsoletes-30147.patch --]
[-- Type: text/x-diff, Size: 1636 bytes --]
From 21e8db4e765b83947545a6e1dcec35826dd8b3b9 Mon Sep 17 00:00:00 2001
From: Michael Aldridge <maldridge@VoidLinux.org>
Date: Sun, 11 Apr 2021 02:32:01 -0700
Subject: [PATCH] xbps-src: Add remove-obsoletes command
---
common/xbps-src/shutils/remove_obsoletes.sh | 6 ++++++
xbps-src | 6 ++++++
2 files changed, 12 insertions(+)
create mode 100644 common/xbps-src/shutils/remove_obsoletes.sh
diff --git a/common/xbps-src/shutils/remove_obsoletes.sh b/common/xbps-src/shutils/remove_obsoletes.sh
new file mode 100644
index 000000000000..506ab6855d3e
--- /dev/null
+++ b/common/xbps-src/shutils/remove_obsoletes.sh
@@ -0,0 +1,6 @@
+remove_obsoletes () {
+ for repo in $XBPS_HOSTDIR/binpkgs $XBPS_HOSTDIR/binpkgs/debug $XBPS_HOSTDIR/binpkgs/nonfree $XBPS_HOSTDIR/binpkgs/multilib/ $XBPS_HOSTDIR/binpkgs/multilib/nonfree ; do
+ msg_normal "Cleaning $repo\n"
+ XBPS_ARCH=${XBPS_CROSS_TARGET:-$XBPS_MACHINE} $XBPS_RINDEX_CMD -r $repo
+ done
+}
diff --git a/xbps-src b/xbps-src
index 9d88873ab2c5..379bdd36bfd6 100755
--- a/xbps-src
+++ b/xbps-src
@@ -78,6 +78,9 @@ remove <pkgname>
remove-autodeps
Removes all package dependencies that were installed automatically.
+remove-obsoletes
+ Remove all obsolete packages from default repositories as detected by xbps-rindex.
+
purge-distfiles
Removes all obsolete distfiles in <hostdir>/sources.
@@ -799,6 +802,9 @@ case "$XBPS_TARGET" in
read_pkg
remove_pkg $XBPS_CROSS_BUILD
;;
+ remove-obsoletes)
+ remove_obsoletes
+ ;;
list)
$XBPS_QUERY_CMD -l
;;
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: xbps-src: Add remove-obsoletes command
2021-04-11 9:33 [PR PATCH] xbps-src: Add remove-obsoletes command the-maldridge
` (7 preceding siblings ...)
2021-04-13 3:39 ` the-maldridge
@ 2021-04-13 21:14 ` Duncaen
2021-04-13 21:14 ` Duncaen
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Duncaen @ 2021-04-13 21:14 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 425 bytes --]
New comment by Duncaen on void-packages repository
https://github.com/void-linux/void-packages/pull/30147#issuecomment-819059515
Comment:
Probably a good idea to use `$XBPS_REPOSITORY`, instead of `$XBPS_HOSTDIR/binpklgs`, then it would act the same way as other xbps-src commands that use repositories.
Would be more predictable for cleaning up branch repositories and would allow to switch to different repos with `-r`.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: xbps-src: Add remove-obsoletes command
2021-04-11 9:33 [PR PATCH] xbps-src: Add remove-obsoletes command the-maldridge
` (8 preceding siblings ...)
2021-04-13 21:14 ` Duncaen
@ 2021-04-13 21:14 ` Duncaen
2021-04-15 5:45 ` [PR PATCH] [Updated] " the-maldridge
2021-04-15 6:08 ` [PR PATCH] [Merged]: " the-maldridge
11 siblings, 0 replies; 13+ messages in thread
From: Duncaen @ 2021-04-13 21:14 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 424 bytes --]
New comment by Duncaen on void-packages repository
https://github.com/void-linux/void-packages/pull/30147#issuecomment-819059515
Comment:
Probably a good idea to use `$XBPS_REPOSITORY`, instead of `$XBPS_HOSTDIR/binpkgs`, then it would act the same way as other xbps-src commands that use repositories.
Would be more predictable for cleaning up branch repositories and would allow to switch to different repos with `-r`.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PR PATCH] [Updated] xbps-src: Add remove-obsoletes command
2021-04-11 9:33 [PR PATCH] xbps-src: Add remove-obsoletes command the-maldridge
` (9 preceding siblings ...)
2021-04-13 21:14 ` Duncaen
@ 2021-04-15 5:45 ` the-maldridge
2021-04-15 6:08 ` [PR PATCH] [Merged]: " the-maldridge
11 siblings, 0 replies; 13+ messages in thread
From: the-maldridge @ 2021-04-15 5:45 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 589 bytes --]
There is an updated pull request by the-maldridge against master on the void-packages repository
https://github.com/the-maldridge/void-packages remove-obsoletes
https://github.com/void-linux/void-packages/pull/30147
xbps-src: Add remove-obsoletes command
This cleans more than it probably should since it will clean several layers of nesting. We could enable globstar and iterate over everything it finds, but I'm not particularly keen on this.
Open to changes on this, looking for feedback.
A patch file from https://github.com/void-linux/void-packages/pull/30147.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-remove-obsoletes-30147.patch --]
[-- Type: text/x-diff, Size: 1636 bytes --]
From f5e766c248270da0f1e3798cf84b4cb4cf6a5364 Mon Sep 17 00:00:00 2001
From: Michael Aldridge <maldridge@VoidLinux.org>
Date: Sun, 11 Apr 2021 02:32:01 -0700
Subject: [PATCH] xbps-src: Add remove-obsoletes command
---
common/xbps-src/shutils/remove_obsoletes.sh | 6 ++++++
xbps-src | 6 ++++++
2 files changed, 12 insertions(+)
create mode 100644 common/xbps-src/shutils/remove_obsoletes.sh
diff --git a/common/xbps-src/shutils/remove_obsoletes.sh b/common/xbps-src/shutils/remove_obsoletes.sh
new file mode 100644
index 000000000000..506ab6855d3e
--- /dev/null
+++ b/common/xbps-src/shutils/remove_obsoletes.sh
@@ -0,0 +1,6 @@
+remove_obsoletes () {
+ for repo in $XBPS_HOSTDIR/binpkgs $XBPS_HOSTDIR/binpkgs/debug $XBPS_HOSTDIR/binpkgs/nonfree $XBPS_HOSTDIR/binpkgs/multilib/ $XBPS_HOSTDIR/binpkgs/multilib/nonfree ; do
+ msg_normal "Cleaning $repo\n"
+ XBPS_ARCH=${XBPS_CROSS_TARGET:-$XBPS_MACHINE} $XBPS_RINDEX_CMD -r $repo
+ done
+}
diff --git a/xbps-src b/xbps-src
index 9d88873ab2c5..379bdd36bfd6 100755
--- a/xbps-src
+++ b/xbps-src
@@ -78,6 +78,9 @@ remove <pkgname>
remove-autodeps
Removes all package dependencies that were installed automatically.
+remove-obsoletes
+ Remove all obsolete packages from default repositories as detected by xbps-rindex.
+
purge-distfiles
Removes all obsolete distfiles in <hostdir>/sources.
@@ -799,6 +802,9 @@ case "$XBPS_TARGET" in
read_pkg
remove_pkg $XBPS_CROSS_BUILD
;;
+ remove-obsoletes)
+ remove_obsoletes
+ ;;
list)
$XBPS_QUERY_CMD -l
;;
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PR PATCH] [Merged]: xbps-src: Add remove-obsoletes command
2021-04-11 9:33 [PR PATCH] xbps-src: Add remove-obsoletes command the-maldridge
` (10 preceding siblings ...)
2021-04-15 5:45 ` [PR PATCH] [Updated] " the-maldridge
@ 2021-04-15 6:08 ` the-maldridge
11 siblings, 0 replies; 13+ messages in thread
From: the-maldridge @ 2021-04-15 6:08 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 412 bytes --]
There's a merged pull request on the void-packages repository
xbps-src: Add remove-obsoletes command
https://github.com/void-linux/void-packages/pull/30147
Description:
This cleans more than it probably should since it will clean several layers of nesting. We could enable globstar and iterate over everything it finds, but I'm not particularly keen on this.
Open to changes on this, looking for feedback.
^ permalink raw reply [flat|nested] 13+ messages in thread