Github messages for voidlinux
 help / color / mirror / Atom feed
From: the-maldridge <the-maldridge@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] xbps-src: Add remove-obsoletes command
Date: Tue, 13 Apr 2021 05:36:59 +0200	[thread overview]
Message-ID: <20210413033659.xfOVsv7Vxr5LEqQWkvg2a8H_aoY8EfajJrAzk-Y1Uuo@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-30147@inbox.vuxu.org>

[-- 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
         ;;

  parent reply	other threads:[~2021-04-13  3:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-11  9:33 [PR PATCH] " 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
2021-04-12 17:49 ` ericonr
2021-04-12 17:58 ` the-maldridge
2021-04-13  3:36 ` the-maldridge [this message]
2021-04-13  3:39 ` [PR PATCH] [Updated] " the-maldridge
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210413033659.xfOVsv7Vxr5LEqQWkvg2a8H_aoY8EfajJrAzk-Y1Uuo@z \
    --to=the-maldridge@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).