Github messages for voidlinux
 help / color / mirror / Atom feed
From: lemmi <lemmi@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR REVIEW] package cleanups
Date: Wed, 31 Aug 2022 06:41:27 +0200	[thread overview]
Message-ID: <20220831044127.LDxx0GG35wOBDguldIupceKTjNXYbIuS6P6WmZVovbI@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-38978@inbox.vuxu.org>

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

New review comment by lemmi on void-packages repository

https://github.com/void-linux/void-packages/pull/38978#discussion_r959155179

Comment:
I quickly hacked up this contraption, but it also just ran `:sort` in vim. Might me locale difference?
```bash
xrmpkg() {
	local toremove=$1
	local toremovever=$(xbps-uhelper getpkgversion $(xbps-query -Rp pkgver "${toremove}")) # 1.2_3
	local subpkgs=$(xsubpkg "${toremove}" | xargs -I{} echo "srcpkgs/{}")
	
	# remove package and subpkg symlinks
	git rm -r srcpkgs/"${toremove}" ${subpkgs}
	
	# add the pkg<=version string to removed-packages
	vim -es "+%s/replaces=\"/replaces=\"\r ${toremove}<=${toremovever}" '+wq' srcpkgs/removed-packages/template
	vim -es '+0/replaces=/+1,\//\"/sort' '+wq' srcpkgs/removed-packages/template
	vim -es '+0/replaces=/+1,\//\"/uniq' '+wq' srcpkgs/removed-packages/template
	
	# remove any mentions from shlibs, this might match too much
	vim -es "+%g/${toremove}/d" '+wq' common/shlibs
	
	# prepare commit, check changes
	git commit -e -v -m "${toremove}: remove package" -- srcpkgs/"${toremove}" ${subpkgs} srcpkgs/removed-packages/template common/shlibs
}
```

  parent reply	other threads:[~2022-08-31  4:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-30 11:44 [PR PATCH] " lemmi
2022-08-30 12:55 ` [PR PATCH] [Updated] " lemmi
2022-08-30 13:09 ` lemmi
2022-08-30 16:56 ` classabbyamp
2022-08-30 17:01 ` lemmi
2022-08-30 23:52 ` [PR REVIEW] " paper42
2022-08-30 23:54 ` paper42
2022-08-31  4:41 ` lemmi [this message]
2022-08-31  4:46 ` [PR REVIEW] " lemmi
2022-08-31  4:47 ` lemmi
2022-08-31 20:59 ` [PR PATCH] [Updated] " lemmi
2022-08-31 21:03 ` [PR PATCH] [Closed]: " lemmi
2022-08-31 21:03 ` [PR PATCH] [Updated] " lemmi

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=20220831044127.LDxx0GG35wOBDguldIupceKTjNXYbIuS6P6WmZVovbI@z \
    --to=lemmi@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).