phenax / bsp-layout

Manage layouts in bspwm (tall and wide)
MIT License
373 stars 30 forks source link

bsp-layout won't reinstall after uninstall #45

Open amtoine opened 2 years ago

amtoine commented 2 years ago

I was trying to look at which files were being installed with bsp-layout and bsp-layout-git through the AUR, see #44. I tried to uninstall the packages and reinstall them to see the changes in /usr/ but now i am not able to reinstall the packages anymore...

i'll investigate that further tomorrow and keep you up to date on that :+1:

amtoine commented 2 years ago

early investigation, that is strange

https://asciinema.org/a/nK01Us3Npbb0JO2icE7xxWiFn

manual install: sudo make install works fine and results in

~ ❯ tree $(find bsp-layout /usr/)
 /usr/local/lib/bsp-layout
├──  layouts
│  ├──  even.sh
│  ├──  grid.sh
│  ├──  rgrid.sh
│  ├──  rtall.sh
│  ├──  rwide.sh
│  ├──  tall.sh
│  └──  wide.sh
├──  utils
│  ├──  common.sh
│  ├──  config.sh
│  ├──  desktop.sh
│  ├──  layout.sh
│  └──  state.sh
└──  layout.sh
 /usr/local/bin/bsp-layout -> /usr/local/lib/bsp-layout/layout.sh
 /usr/local/man/man1/bsp-layout.1

and sudo make uninstall works fine as well and gives

~ ❯ find bsp-layout /usr/
                     # <-- that is an empty stdout lol
amtoine commented 2 years ago

i did just launch a fresh virtual machine running a very bare install of ArchLinux, i.e. base-devel, git and paru.

paru -S bsp-layout does install the package and the script, i.e. pacman -Q | grep bsp-layout, ls /usr/local/lib/bsp-layout and bsp-layout show some level of results.

after a paru -R bsp-layout, the three commands above give errorsi, as expected.

however, even with a paru -S bsp-layout again, /usr/local/libbsp-layout does not exist, bsp-layout is not a known command and bsp-layout is not known by pacman :thinking:

and apart from that the sudo make method works fine :ok_hand:

amtoine commented 2 years ago

i think bsp-layout and bsp-layout-git do not uninstall properly with the PKGBUILDs

on the VM above, after paru -R bsp-layout[-git], i have an empty pacman -Q | grep bsp-layout output however, when reinstalling, paru tells me

:: bsp-layout-0.0.10-1 is up to date -- skipping build

or

:: bsp-layout-git-0.0.10-1 is up to date -- skipping build

that looks quite supsicious to me :thinking:

any idea @phenax? could that be the use of the install.sh script in the PKGBUILDs of bsp-layout and bsp-layout-git? :thinking:

for instance, i've got other projects that require building the code with make and i do the following instead:

build() {
    cd st
    make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11
}

package() {
    cd st
    mkdir -p ${pkgdir}/opt/${pkgname}
    cp -rf * ${pkgdir}/opt/${pkgname}
    make PREFIX=/usr DESTDIR="${pkgdir}" install
    install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
    install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
}

see here

phenax commented 2 years ago

Not sure. I'll look into this as well

amtoine commented 2 years ago

Not sure. I'll look into this as well

thanks a lot :yum:

not a huge deal as sudo make install and sudo make uninstall work just fine :wink: but the fact that i get the exact issue in a VM looks like a bug :thinking:

phenax commented 2 years ago

@a2n-s, I've created a bsp-layout-git 0.0.11 testing out a change. I saw that the path for uninstalling the source was wrong. Can you check if this issue is fixed in bsp-layout-git?

amtoine commented 2 years ago

@phenax

I saw that the path for uninstalling the source was wrong.

yes i see that in the diff of the PKGBUILD :+1:

Can you check if this issue is fixed in bsp-layout-git?

still not reinstalling, both on my personal machine and on a VM :thinking: i get the same skipping build thing

amtoine commented 2 years ago

the thing is that the package, i.e. the object in the package tree of pacman is tracked, installed and removed correctly. files are installed and removed once without any issue! it's during following installs that the files are not installed anymore :thinking:

amtoine commented 2 years ago

can you reproduce that bug @phenax? :yum: