Skip to content

New feature: am -a will now list the latest available version for an app - #2650

Closed
vishnu350 wants to merge 2 commits into
ivan-hc:mainfrom
vishnu350:main
Closed

New feature: am -a will now list the latest available version for an app#2650
vishnu350 wants to merge 2 commits into
ivan-hc:mainfrom
vishnu350:main

Conversation

@vishnu350

Copy link
Copy Markdown
Contributor

New feature: am -a will now list the latest available version for any app that is not yet installed. Fixes #1832.

Example: am -a firefox

 PACKAGE: firefox
 STATUS: not installed
 VERSION: 154.0

 Firefox is a powerful, extensible web browser with support for modern web application technologies.

 This is the Stable release.

 This script provides both the official portable build with automatic updates and the AppImage.

 SCREENSHOTS:
 https://user-images.githubusercontent.com/88724353/235563850-61d359ff-53ac-43a6-ab1d-33297dc4df73.jpg

 SITES:
 https://www.firefox.com

 SOURCES:
 https://github.com/ivan-hc/Firefox-appimage

@ivan-hc

ivan-hc commented Aug 25, 2026

Copy link
Copy Markdown
Owner

No @vishnu350 , its not so easy.

Try to repeat the command more than 60 times in 1 hour (on a app hosted on Github), you will reach the rate limit.

The proxy we use as a fallback is for more important things: installations and updates. I cannot risk to overload it.

@vishnu350

vishnu350 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

Is it the _use_online_reading_tool function in the PR that is consuming API calls?

We just need the download URL from the install script to get the version number. Is there a way to do this without using API calls?

@ivan-hc

ivan-hc commented Aug 25, 2026

Copy link
Copy Markdown
Owner

Is it the _use_online_reading_tool function in the PR that is consuming API calls?

Is the eval that you are trying to use.

We just need the download URL from the install script to get the version number. Is there a way to do this without using API calls?

Yes, using a proxy. But I don't own a proxy and I can't abuse of the existing one.

@ivan-hc

ivan-hc commented Aug 25, 2026

Copy link
Copy Markdown
Owner

@vishnu350 see my answer here #1835 (comment)

@vishnu350

Copy link
Copy Markdown
Contributor Author

Made some changes to support -av, now VERSION will only be listed if the user does am -av app. The vanilla am -a command will not attempt to curl the version number.

I have tried with many apps, it works quite well. Apps with multiple sources (or if the curl fails) will return version number of '-', thanks to my previous cleanups of the check_version_filters awk code. Eg. am -av gimp.

So users will have the option to check the version num if they wish. We just have to make sure they understand the limitations.

@ivan-hc

ivan-hc commented Aug 25, 2026

Copy link
Copy Markdown
Owner

We just have to make sure they understand the limitations.

The only thing many will understand is that AM is broken.

@ivan-hc

ivan-hc commented Aug 25, 2026

Copy link
Copy Markdown
Owner

@vishnu350 Honestly, not to disparage your work here, but this is a mechanism I haven't implemented precisely because I know how limited it is: API limits, geographic restrictions, slow domains... all these things make these options slow or useless. Otherwise, I would have implemented this a long time ago.

There are people on the AUR who update versions, commands, and checksums on individual PKGBUILDs daily, or even days/weeks/months late. This makes the AUR no less organized than APT, DNF, and PacMan.

But AM is different. Here, everything happens in real time, and to do so, you need to rely on continuous connections, with all the limitations that entails.

You don't need to add a -av. Existing options could already include all this, but it's not convenient, as usual due to API limits, geographic restrictions, and slow domains, as I mentioned.

No, we can't do that.

This would only be possible in am-extras, which, while more "organized" in this regard, is limited to being updated every half hour, so a link might become invalid after just two minutes.

The only viable alternative would be to move the database to a community-maintained one. It doesn't matter if hundreds or thousands of volunteers upload PKGBUILD-style scripts or real packages: the control would be complete.

But unfortunately, we don't have the resources.

About the use of the proxy, I can't abuse it, nor can I allow others to. I've set minimum limits in AM for continuous installations and updates based on what's officially allowed by certain domains, so that those are consumed first, without immediately falling back on the proxy. Adding this to an "info" option would be excessive.

@ivan-hc ivan-hc closed this Aug 25, 2026
@ivan-hc

ivan-hc commented Aug 25, 2026

Copy link
Copy Markdown
Owner

@vishnu350 contact me on Discord (ivanhc_60850) or Reddit (u/am-ivan), we can keep talk in private there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How can I get the version of a software without installing it?

2 participants