topgrade-rs / topgrade

Upgrade all the things
GNU General Public License v3.0
1.95k stars 127 forks source link

Try to find outdated manually installed binaries #740

Open j-lakeman opened 6 months ago

j-lakeman commented 6 months ago

On Linux, it would be nice if Topgrade could try to find outdated binaries manually installed by the user e.g. in ~/.local/bin/. I know this might not be trivial, however, if an application hasn't been packaged yet for your distro, I think its common for folks to keep the binaries in said folder. But without a package manager taking care about the updates, those binaries often tend to be outdated IMHO. Maybe GitHub and other platforms could be queried for more recent versions? I believe https://github.com/ImranR98/Obtainium does that for Android. Nevertheless great application! Love it!

SteveLauC commented 6 months ago

Hi

I know this might not be trivial

Yeah, this is not something easy, the best thing I can imagine is that there is a dedicated tool for this functionality and Topgrade can involve it to implement this feature

j-lakeman commented 5 months ago

That would be https://github.com/zyedidia/eget, only recently found it

Stef16Robbe commented 3 months ago

@j-lakeman Even so, that would only fix half of the issue, right. It requires the owner + repo name, and figuring that out from a binary name would be the hard part, I'd say.

Thinking out loud here, a hard-coded list could be used as initial lookup, and if the binary name could not be matched in there it could be looked up on Github, and in that case verify with the user before updating?

Like you already mentioned, not trivial :).

j-lakeman commented 3 months ago

@j-lakeman Even so, that would only fix half of the issue, right. It requires the owner + repo name, and figuring that out from a binary name would be the hard part, I'd say.

There would be eget --download-all which downloads all projects defined in the eget config file. topgrade could look for the eget binary and the config file and if both present run eget --download-all. This could be a pretty straightforward approach. I agree that trying to guess where a binary comes from is not an option.