-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Wget2 #619
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see you mostly copied the existing wget call and removed the --show-progress
option. I found two problems in this solution:
--progress=dot
has not yet been implemented in wget2- The Zenity progress bar is not working because the output for version 2 is different
True, will remove it for now
I don't think it is currently possible to get it to work with wget2. The file completion percentage just isn't sent to output, not even with --debug. So, there are several paths to take now:
What do you think? |
I checked wget 2.1.0 and it sends progress to stdout as documented in its man pages. This is the line I used:
|
Ok, I messed around with the grep search pattern, which caused me to not see that --force-progress works. I can grep the progress bar to output the percentages. I may have too high download speed to see the zenity progress bar change between the values. In any case, I can only see an empty progress bar and then the window closes when the download is complete.
and it does work, but when I run
this is the result: (see attached video) Screencast.from.2024-05-02.09-12-28.mp4I tried running the install script with 'DOWNLOAD_BACKEND=curl' and the windows disappear just as fast. |
…implified backend conditions
It won't work because of buffering. Since there are no line feeds in the wget2 output, the Try looking into stdbuf, maybe There's also the possibility that wget2 itself buffers output (write behaviour may differ when piping into another command vs writing to a terminal), so also take a look at that if stdbuf on grep isn't enough. |
stdbuf on grep doesn't work, stdbuf on wget2 doesn't work why did RH think shipping wget2 as wget was a good idea |
@swjzielinski I've added a generic progress bar in #629 that should work with wget2. Merge it with your changes and let me know if the progress bar works. |
Yes it works, thank you :) |
I noticed you changed the detection mechanism to look for the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR is good to go as-is, even without the additional wget2 check I mentioned. I'll give you some time in case you want to add that change, but if not we can just move on to a merge and release.
Ok, I pushed the additional check.
The whole problem was that F40 was shipped with the wget command redirecting to wget2. |
Added support for Wget2 in the download.sh script.
It would now also check if "wget --version" contains "Wget2".
If it does, the script will say that it uses wget2 and will omit the --show-progress option that wget2 doesn't understand.
Hopefully, it will work the same way on wget earlier than 2 (testing probably needed)
There's probably a better way to do this, but I'm not experienced enough.