kisslinux / kiss

KISS Linux - Package Manager
https://kisslinux.github.io
MIT License
464 stars 62 forks source link

Problem installing new packages #279

Closed TAAPArthur closed 3 years ago

TAAPArthur commented 3 years ago

Description

Cannot install new package.

Assuming the package is already built but not yet installed, kiss i dash fails. The issue isn't specific to dash; created a simple pkg that just touched "$1/foo" and ran into the same issue. However if the package is already installed, the issue doesn't occur.

Just to make sure I was in a clean env, I set KISS_ROOT=/tmp/fakeroot and created the dir. I know I was talking about this in #278, but I checked-out out master directly and didn't use that pending change.

Error message

/usr/bin/kiss: line 164: cd: /tmp/fakeroot/var/db/kiss/installed/dash: No such file or directory

From this it makes since why installed packages are fine since /var/db/kiss/installed would exists then.

Verbose log

log.txt

(PS may want to change the issue template to log.txt since github doesn't like extension-less files)

For the most part I'm using sbase/ubase instead of busybox. I imagine that I'm doing something unpopular since no one else seems to be having this issue

dylanaraps commented 3 years ago

Does /var/db/kiss/installed/dash exist inside the cached tarball?

dylanaraps commented 3 years ago

Also, it is failing to do cd "$OLDPWD" in resolve_path. This means the initial cd to this directory works but a later cd back to it does not.

dylanaraps commented 3 years ago

Please try the latest commit. I believe the issue is that the OLDPWD is incorrect when the cd fails breaking the whole purpose of its use.

dylanaraps commented 3 years ago

These values should (in theory) match.

  + cd /home/arthur/Forks/kiss                   # FIRST OLDPWD                                                                               
  + cd /tmp/fakeroot/var/db/kiss/installed/dash  # SECOND OLDPWD                                   
TAAPArthur commented 3 years ago

Yup that resolves my problem. Thanks

TAAPArthur commented 3 years ago

Also glad that old code where we manually changed PWD got removed