Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] alacritty, st, dvtm: prevent ncurses-term from installing conflicting files
@ 2020-11-25 16:00 ahesford
  2020-11-25 16:03 ` ericonr
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: ahesford @ 2020-11-25 16:00 UTC (permalink / raw)
  To: ml

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

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

https://github.com/ahesford/void-packages terminfo
https://github.com/void-linux/void-packages/pull/26701

alacritty, st, dvtm: prevent ncurses-term from installing conflicting files
This is an attempt to address file conflicts in Issue #26700 by adding `noextract` rules to packages that install specific terminfo definitions and then compile these at locations that conflict with files installed by `ncurses-term`. We should definitely prefer these specific versions when they are installed.

I'm not sure what `xbps<0.58` does when it encounters `noextract` definitions. This isn't the most elegant solution, but it may be the only workable solution we currently have to the conflicts here. Any other solution would seem to require knowledge in the `ncurses` template of specific templates that install conflicting files, which is uglier.

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

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

From 14d58a6fad84737d07530523322dccb870385278 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Wed, 25 Nov 2020 10:36:30 -0500
Subject: [PATCH 1/3] alacritty: prevent ncurses-term from extracting
 conflicting files

---
 srcpkgs/alacritty/template | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/alacritty/template b/srcpkgs/alacritty/template
index 86626f44080..4bca24d0dc9 100644
--- a/srcpkgs/alacritty/template
+++ b/srcpkgs/alacritty/template
@@ -1,7 +1,7 @@
 # Template file for 'alacritty'
 pkgname=alacritty
 version=0.5.0
-revision=2
+revision=3
 build_wrksrc="${pkgname}"
 build_style=cargo
 hostmakedepends="pkg-config python3"
@@ -28,7 +28,18 @@ post_install() {
 
 alacritty-terminfo_package() {
 	short_desc+=" - terminfo data"
+	depends="ncurses"
+
 	pkg_install() {
 		vmove usr/share/terminfo
+
+		# Avoid conflicts with ncurses-term
+		vmkdir usr/share/xbps.d
+		local _conflicts="${PKGDESTDIR}/usr/share/xbps.d/${pkgname}.conf"
+		cat > "$_conflicts" <<-EOF
+		noextract=/usr/share/terminfo/a/alacritty
+		noextract=/usr/share/terminfo/a/alacritty-direct
+		EOF
+		chmod 644 "$_conflicts"
 	}
 }

From 66f9591cf756e7092fe7b3658474aef573a3a3da Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Wed, 25 Nov 2020 10:36:30 -0500
Subject: [PATCH 2/3] st: prevent ncurses-term from extracting conflicting
 files

---
 srcpkgs/st/template | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/st/template b/srcpkgs/st/template
index 0041346d2b8..a20b44b548b 100644
--- a/srcpkgs/st/template
+++ b/srcpkgs/st/template
@@ -1,7 +1,7 @@
 # Template file for 'st'
 pkgname=st
 version=0.8.4
-revision=2
+revision=3
 build_style=gnu-makefile
 make_use_env=compliant
 hostmakedepends="pkg-config"
@@ -29,7 +29,20 @@ post_install() {
 
 st-terminfo_package() {
 	short_desc+=" - terminfo data"
+	depends="ncurses"
+
 	pkg_install() {
 		vmove usr/share/terminfo
+
+		# Avoid conflicts with ncurses-term
+		vmkdir usr/share/xbps.d
+		local _conflicts="${PKGDESTDIR}/usr/share/xbps.d/${pkgname}.conf"
+		cat > "$_conflicts" >> EOF
+		noextract=/usr/share/terminfo/s/st
+		noextract=/usr/share/terminfo/s/st-256color
+		noextract=/usr/share/terminfo/s/stterm
+		noextract=/usr/share/terminfo/s/stterm-256color
+		EOF
+		chmod 644 "$_conflicts"
 	}
 }

From acd084516a784251c380083f701ca8437c171da5 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Wed, 25 Nov 2020 10:36:30 -0500
Subject: [PATCH 3/3] dvtm: prevent ncurses-term from extracting conflicting
 files

Fixes: #26700.
---
 srcpkgs/dvtm/template | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/dvtm/template b/srcpkgs/dvtm/template
index a65c17c2d9c..b2e2ee7538d 100644
--- a/srcpkgs/dvtm/template
+++ b/srcpkgs/dvtm/template
@@ -1,7 +1,7 @@
 # Template file for 'dvtm'
 pkgname=dvtm
 version=0.15
-revision=2
+revision=3
 makedepends="ncurses-devel"
 depends="ncurses" # needs tic at post-install
 short_desc="Tiling window manager for the console"
@@ -16,8 +16,18 @@ do_build() {
 	sed -i 's,tic,/bin/true,g' Makefile
 	make CC=$CC V=1
 }
+
 do_install() {
 	make PREFIX=/usr DESTDIR=${DESTDIR} install
 	vlicense LICENSE
 	vinstall dvtm.info 644 usr/share/terminfo/d
+
+	# Avoid conflicts with ncurses-term
+	vmkdir usr/share/xbps.d
+	local _conflicts="${DESTDIR}/usr/share/xbps.d/${pkgname}.conf"
+	cat > "$_conflicts" <<-EOF
+	noextract=/usr/share/terminfo/d/dvtm
+	noextract=/usr/share/terminfo/d/dvtm-256color
+	EOF
+	chmod 644 "$_conflicts"
 }

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

end of thread, other threads:[~2020-12-09 21:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-25 16:00 [PR PATCH] alacritty, st, dvtm: prevent ncurses-term from installing conflicting files ahesford
2020-11-25 16:03 ` ericonr
2020-11-25 16:04 ` ericonr
2020-11-25 16:08 ` [PR PATCH] [Updated] " ahesford
2020-11-25 16:13 ` ahesford
2020-11-25 16:56 ` ericonr
2020-12-09 21:09 ` ahesford
2020-12-09 21:09 ` [PR PATCH] [Closed]: " ahesford

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