basher icon indicating copy to clipboard operation
basher copied to clipboard

Upgrading a package does not add/remove links

Open pjeby opened this issue 7 years ago • 5 comments

The upgrade command issues a pull, but before that it should unlink everything, then relink after pulling. Otherwise, new commands, completions and man pages aren't installed, and old ones aren't removed.

pjeby avatar Jun 23 '17 23:06 pjeby

That is true.

juanibiapina avatar Jun 24 '17 10:06 juanibiapina

I was thinking in actually just running uninstall and install again, which would solve problems with links, completions, man pages, etc.

This would also upgrade packages which were installed with a tag, effectively making them upgradable. cc @YarekTyshchenko

juanibiapina avatar Aug 17 '17 19:08 juanibiapina

I often run:

basher outdated | xargs -n 1 basher upgrade

But I have seen problems where weird repo history caused the simple git commands run by basher to fail. I'd be happy with a re-install instead of upgrade. Makes the whole thing simpler, and therefore more predictable when shipping software. +1.

YarekTyshchenko avatar Aug 18 '17 12:08 YarekTyshchenko

This only causes a problem when the repo is saving information inside its own directory structure, which I would argue it shouldn't (but basher does 😭 )

juanibiapina avatar Sep 30 '17 19:09 juanibiapina

@juanibiapina Hacktoberfest is right around the corner ;)

@YarekTyshchenko You might like this..

while read -r pkg; do basher uninstall "$pkg" && basher install "$pkg"; done < <(basher outdated)

cornfeedhobo avatar Sep 30 '23 18:09 cornfeedhobo