I have a script that autoupdates some AppImage applications and then it creates/updates a symlink with the new application (as they have a hash in their filename when they integrate, the previous symlink gets outdated).
$ ls -l ~/.bin/taskwarrior-tui
/home/user/.bin/taskwarrior-tui -> /home/user/Apps/taskwarrior-tui-$HASH.AppImage
But, if I execute the app from the symlink, the old version gets called.
$ ~/.bin/taskwarrior-tui --version
taskwarrior-tui 0.13.8
$ ~/Apps/taskwarrior-tui-$HASH.AppImage --version
taskwarrior-tui 0.13.10
So I see two problems: (1) I don't get how the symlink is pointing to an old version of (2) a software that supposedly I do not have "installed" anymore (i.e., the auto-update script removes the old AppImage). If I try to search for files related to the application on my filesystem with locate
(after updatedb
), only the newer version files appear, so there isn't any residual stuff on the filesystem at least.
I tried to strace the execution of both commands (~/.bin/taskwarrior-tui and ~/Apps/taskwarrior-tui-$HASH.AppImage), but I cannot (easily) find any pointers there.
Eventually (probably after a reboot) the problem solves, but still this shouldn't be happening. Whatever help you could give me to solve this will be appreciated.
EDIT:
Even weirder. If I am in the folder of the symbolic link, and execute it with the relative path, it calls the new version. If I execute it calling it from the full path, it executes the old version.
$ ~/.bin/taskwarrior-tui --version
taskwarrior-tui 0.13.8
$ ./taskwarrior-tui --version
taskwarrior-tui 0.13.10
EDIT 2: Just in case, ~/.bin/ is also a symbolic link.
$ ls -l ~/.bin
/home/user/.bin -> /home/user/automation/bin/
$ ~/.bin/taskwarrior-tui --version
taskwarrior-tui 0.13.8
$ /home/user/automation/bin/taskwarrior-tui --version
taskwarrior-tui 0.13.10
set -x
, then try all the commands again. Do commands that print0.13.8
reveal something unexpected in the diagnostic output from the shell? Note:set -x
can be reverted byset +x
.