1

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
3
  • 1
    @KamilMaciorowski Yes, that's the third command I showed. Directly executing the target of the symbolic link shows the new version (v0.13.10).
    – petemir
    Commented Apr 7, 2021 at 8:25
  • 1
    Just in case: what is the shell? Invoke set -x, then try all the commands again. Do commands that print 0.13.8 reveal something unexpected in the diagnostic output from the shell? Note: set -x can be reverted by set +x. Commented Apr 7, 2021 at 8:55
  • @KamilMaciorowski I am using zsh but I just spawned a bash shell and tried the commands and the version difference still occurs. I checked the diagnostic output but didn't see anything particular, they are similar for the different commands (the lines that differ are, of course, the command that was executed).
    – petemir
    Commented Apr 7, 2021 at 9:27

0

You must log in to answer this question.

Browse other questions tagged .