mirror of
https://github.com/89luca89/distrobox.git
synced 2026-08-17 16:34:42 -05:00
feat(compat): preserve v1 entry points after v2 single-binary split
v1 containers bind-mount distrobox-{init,export,host-exec} from host
$bindir, and v1 desktop entries launch via `distrobox-enter`. Both
would silently break under v2's single binary. argv[0] dispatch
routes distrobox-* symlinks to the right subcommand, and the helpers
ship at the v1 paths so v1 containers keep working.
BREAKING CHANGE: v2 rc1 and rc2 prerelease containers used ~/.local/share/distrobox/v2/
for their helpers and must be recreated.
Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
This commit is contained in:
@@ -34,6 +34,8 @@ ICONDIR ?= $(PREFIX)/share/icons/hicolor
|
||||
|
||||
ICON_SIZES := 16 22 24 32 36 48 64 72 96 128 256
|
||||
|
||||
V1_SUBCOMMANDS := assemble create enter ephemeral generate-entry ls list rm stop upgrade
|
||||
|
||||
.PHONY: install
|
||||
install: build
|
||||
install -d $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR) $(DESTDIR)$(BASHCOMPDIR) $(DESTDIR)$(ZSHCOMPDIR)
|
||||
@@ -41,6 +43,12 @@ install: build
|
||||
install -m 0644 man/man1/*.1 $(DESTDIR)$(MANDIR)/
|
||||
install -m 0644 completions/bash/distrobox $(DESTDIR)$(BASHCOMPDIR)/distrobox
|
||||
install -m 0644 completions/zsh/_distrobox $(DESTDIR)$(ZSHCOMPDIR)/_distrobox
|
||||
for sub in $(V1_SUBCOMMANDS); do \
|
||||
ln -sf distrobox $(DESTDIR)$(BINDIR)/distrobox-$${sub}; \
|
||||
done
|
||||
install -m 0755 internal/inside-distrobox/assets/distrobox-init $(DESTDIR)$(BINDIR)/distrobox-init
|
||||
install -m 0755 internal/inside-distrobox/assets/distrobox-export $(DESTDIR)$(BINDIR)/distrobox-export
|
||||
install -m 0755 internal/inside-distrobox/assets/distrobox-host-exec $(DESTDIR)$(BINDIR)/distrobox-host-exec
|
||||
install -d $(DESTDIR)$(ICONDIR)/scalable/apps
|
||||
install -m 0644 icons/terminal-distrobox-icon.svg $(DESTDIR)$(ICONDIR)/scalable/apps/
|
||||
for sz in $(ICON_SIZES); do \
|
||||
@@ -51,7 +59,7 @@ install: build
|
||||
|
||||
.PHONY: uninstall
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)$(BINDIR)/distrobox
|
||||
rm -f $(DESTDIR)$(BINDIR)/distrobox $(DESTDIR)$(BINDIR)/distrobox-*
|
||||
rm -f $(DESTDIR)$(MANDIR)/distrobox.1 $(DESTDIR)$(MANDIR)/distrobox-*.1
|
||||
rm -f $(DESTDIR)$(BASHCOMPDIR)/distrobox
|
||||
rm -f $(DESTDIR)$(ZSHCOMPDIR)/_distrobox
|
||||
|
||||
Reference in New Issue
Block a user