5long / p3wm

Three-way merge .pacnew file
ISC License
13 stars 4 forks source link

Unset variable in function find_cached_pkg() #6

Closed skysley closed 3 years ago

skysley commented 3 years ago

During program execution I get an error that the variable pkg_cached is not set in function find_cached_pkg().

(translation below)

$ p3wm /path/to/some_file.pacnew 
/usr/bin/p3wm: Zeile 156: pkg_cached ist nicht gesetzt.
tar: : Funktion open fehlgeschlagen: Datei oder Verzeichnis nicht gefunden
tar: Error is not recoverable: exiting now
C /etc/makepkg.conf cannot be cleanly merged
(V)iew diff, (D)elete .pacnew, (A)ccept merge, (R)un resolve tool, (Q)uit? ^C

English:

$ p3wm /path/to/some_file.pacnew 
/usr/bin/p3wm: Line 156: pkg_cached is not set.
tar: : Function has failed: File or directory not found
tar: Error is not recoverable: exiting now
C /etc/makepkg.conf cannot be cleanly merged
(V)iew diff, (D)elete .pacnew, (A)ccept merge, (R)un resolve tool, (Q)uit? ^C
5long commented 3 years ago

Thanks for your bug report.

The script is supposed to print an error message like this:

Unable to find package ‘$pkg_name-$ver-$arch’ in cache

... which means p3wm can't find any package file (.pkg.zst) owning the original file in your pacman cache directories.

But there is a bug, so it didn't happen.

I just released version 0.6.3 trying to fix this issue. Would you install the new version to confirm if it works better?

skysley commented 3 years ago

I am not sure, whether it works now because I have other files to merge now or because you fixed it. Anyway, thanks for fixing!

By the way: I have the feeling that this is something one should rewrite in another language (e. g. Python).