Closed dylanaraps closed 3 years ago
The most obvious cause is that $mak_dir
ceases to exist though this implies that pkg_clean
was executed early.
Already fixed in master.
It lives!
More logs:
/usr/bin/kiss: line 933: can't create /root/.cache/kiss/proc/813465/build/v: nonexistent directory
/usr/bin/kiss: line 1442: can't create /root/.cache/kiss/proc/1370977/build/m: nonexistent directory
Also, I'm still trying to find a reliable way to reproduce this. I can sometimes make the error occur in a chroot but it's quite random.
This should fix the issue.
https://github.com/kisslinux/kiss/commit/b1332a309afa5ad2e200f36b1d0749a69e12a46a
I can almost always get this to reproduce in a fresh chroot after updating kiss
. You can probably do it right now too; download kiss-chroot-2021.7-6.tar.xz
, chroot in, clone the repo, kiss u
. See the following:
-> kiss Building package (1/1)
-> kiss Extracting sources
-> kiss Starting build
-> kiss Successfully built package
-> kiss Stripping binaries and libraries
-> kiss Generating manifest
-> kiss looking for dependencies (using readelf)
-> kiss Generating manifest
-> kiss Generating etcsums
-> kiss Creating tarball
-> kiss Successfully created tarball
-> Install built packages? [kiss]
-> Continue?: Press Enter to continue or Ctrl+C to abort
-> kiss Checking if manifest valid
-> kiss Checking if package installable
-> kiss Checking for package conflicts
-> kiss Installing package (kiss@5.5.2-2.tar.gz)
-> kiss Installed successfully
-> kiss Checking if manifest valid
-> kiss Checking if package installable
-> kiss Checking for package conflicts
/usr/bin/kiss: line 954: can't create /root/.cache/kiss/proc/8012/build/cf_m: nonexistent directory
grep: /root/.cache/kiss/proc/8012/build/cf: No such file or directory
-> kiss Installing package (kiss@5.5.2-2.tar.gz)
/usr/bin/kiss: line 1441: can't create /root/.cache/kiss/proc/8012/build/m: nonexistent directory
SOMETIMES, it's a different error - a syntax error, although the syntax error it complains about varies by update. That one is a bit tougher.
Error does NOT seem to happen in the case where first you nab kiss
from its repo, swap that for /usr/bin/kiss
, MODIFY the source/version of kiss
in repo/core to be git+https://github.com/kisslinux/kiss, and then update.
If you instead swap kiss
and then just go straight to a kiss u
, the same error occurs. So it looks like it may indeed be fixed in master.
It gets weirder. If you add an ls -ld "$mak_dir"
to the code (right before the offending line) the first error goes away.
-> kiss Checking if manifest valid
-> kiss Checking if package installable
-> kiss Checking for package conflicts
drwxr-xr-x 3 root root 4096 Jul 16 04:35 /root/.cache/kiss/proc/3145/build
-> kiss Installing package (kiss@5.5.2-2.tar.gz)
-> kiss Installed successfully
-> kiss Checking if manifest valid
-> kiss Checking if package installable
-> kiss Checking for package conflicts
ls: /root/.cache/kiss/proc/3145/build: No such file or directory
But! It truly doesn't seem to exist in the second iteration.
OK. That error (updating kiss) has been solved. I think I know what the issue is as well.
Pushed another potential fix. Now, the cache directory is only cleaned in the top-level process and not any children spawned by it. Let me know if you can still reproduce (my reliable test case now has no errors).
Please try the latest master. I pushed a series of commits (and fixed unrelated bugs too).
I discovered and fixed many errors within our temporary directory/file handling and can no longer reproduce this (even unreliably).
Temporary file names were reused meaning a failed write to a file would keep the previous contents intact. The next read of the file would have bogus information in it. Temporary files are now all uniquely named and used for singular purposes.
The entire <pid>
directory would be wiped on each subshell exit. This caused the non-existent directory errors. The code has been updated so that <pid>
is only wiped when the "top-level" package manager process exit.
Temporary files were stored in the build directory. This polluted the build directory for no good reason. All temporary files now live in their own directory <pid>/tmp
.
Added back KISS_PID
to ensure that sub-processes look in the original cache for their files. This fixes file access issues whereby the package manager looks in the wrong place for temporary files.
Fixed errors when updating kiss by removing a redundant args i
call (as the prompt behavior has now changed).
Let me know if there are still issues.
Please reopen if the issue still occurs.
Pushed a new package manager release, please try it out.
It... SEEMS fixed. :)