Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update built in stack causes creation copy with the same name #384

Closed
kuba3351 opened this issue Aug 3, 2024 · 1 comment · Fixed by #405
Closed

Update built in stack causes creation copy with the same name #384

kuba3351 opened this issue Aug 3, 2024 · 1 comment · Fixed by #405
Assignees
Labels
bug Something isn't working

Comments

@kuba3351
Copy link

kuba3351 commented Aug 3, 2024

When I try to update built in stack using apx stacks update command, it creates a copy of the stack with the same name. There is no way do distinguish these stacks when I am creating an subsystem.

Also, it is impossible to delete stack created that way.

Steps to reproduce the bug:

  1. Try to update built in stack, and make some changes e.g. add packages:
jakub@apx-vso-pico:~$ apx stacks update arch
 INFO  Wpisz nową bazę lub zatwierdź aktualną (ghcr.io/archlinux/archlinux:multilib-devel):

 INFO  Wybierz nowy menedżer pakietów lub zatwierdź aktualny (pacman):

 INFO  You have not provided any packages to install in the stack. Do you want to add some now?[y/N]
y
 INFO  Napisz nazwy pakietów oddzielone spacją, które chcesz zainstalować w stosie, lub zatwierdź aktualne (%s):
figlet sl neofetch
 INFO  Zaktualizowano stos 'arch'.
  1. See that there are two stacks with the same name:
jakub@apx-vso-pico:~$ apx stacks list
Znaleziono 10 stosów:┼┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┼
┊ NAZWA       ┊ BASE                                             ┊ WBUDOWANY ┊ PKGS ┊ PKG MANAGER ┊
┼┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┼
┊ alpine      ┊ alpine:latest                                    ┊ tak       ┊ 0    ┊ apk         ┊
┼┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┼
┊ alpine2     ┊ alpine                                           ┊ nie       ┊ 3    ┊ apk         ┊
┼┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┼
┊ arch        ┊ ghcr.io/archlinux/archlinux:multilib-devel       ┊ tak       ┊ 3    ┊ pacman      ┊
┼┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┼
┊ arch        ┊ ghcr.io/archlinux/archlinux:multilib-devel       ┊ tak       ┊ 3    ┊ pacman      ┊
┼┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┼
┊ fedora      ┊ fedora:latest                                    ┊ tak       ┊ 0    ┊ dnf         ┊
┼┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┼
┊ opensuse    ┊ registry.opensuse.org/opensuse/tumbleweed:latest ┊ tak       ┊ 0    ┊ zypper      ┊
┼┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┼
┊ ubuntu      ┊ ubuntu:latest                                    ┊ tak       ┊ 0    ┊ apt         ┊
┼┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┼
┊ vanilla-dev ┊ ghcr.io/vanilla-os/dev:main                      ┊ tak       ┊ 0    ┊ apt         ┊
┼┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┼
┊ vanilla     ┊ ghcr.io/vanilla-os/pico:main                     ┊ tak       ┊ 0    ┊ apt         ┊
┼┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┼
  1. It is impossible to delete the stack:
jakub@apx-vso-pico:~$ apx stacks rm -n arch
 INFO  Czy jesteś pewien, że chcesz usunąć 'arch'? [y/N] [y/N]
y
Error: cannot remove built-in stack
Użycie:
  apx stacks rm [flags]

Flagi:
  -f, --force         Wymuś usunięcie stosu.
  -h, --help          help for rm
  -n, --name string   Nazwa stosu do usunięcia.

  ERROR   cannot remove built-in stack

I expect that updating built in stacks should be locked or updating built-in stack should produce stack with different name.

@kbdharun kbdharun added the bug Something isn't working label Aug 4, 2024
@jardon jardon self-assigned this Oct 15, 2024
@jardon
Copy link
Member

jardon commented Oct 15, 2024

You can remove the stack by deleting the yaml with rm ~/.local/share/apx/stacks/arch.yml.

I'm looking into an actual fix instead of a workaround.

jardon added a commit to jardon/apx that referenced this issue Oct 15, 2024
- throw error if stack is built-in
- add english translation for update built-in stack error
jardon added a commit to jardon/apx that referenced this issue Oct 16, 2024
- throw error if stack is built-in
- add english translation for update built-in stack error
jardon added a commit that referenced this issue Oct 16, 2024
- throw error if stack is built-in
- add english translation for update built-in stack error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants