You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a check for packages distributed via sourceforge to check if a mirror link is used in yaml file #673
Add a check for packages distributed via sourceforge to check if a mirror link is used in yaml file
There are users reporting they cannot install a certain package due to a mirror link is used in yaml file, and he/she cannot connect to the mirror. (microsoft/winget-pkgs#5770 )
If we add a check for this situation and change the link to sourceforge main site link like what in microsoft/winget-pkgs#5772 , at least users can go to sourceforge main site to change which mirror server to use and therefor can finish the install.
I think it would make sense to have the bot automatically update installer URLs that tend to break easily as witnessed with the sourceforge mirrors. This would not only cut down on manual work by the community but also ensure a certain level of standardization.
Edit: Chi Lei (@lychichem) is the URL scheme consistent for mirror and main sourceforge download links respectively? In that case a simple conversion could be done by the winget bot.
I think it would make sense to have the bot automatically update installer URLs that tend to break easily as witnessed with the sourceforge mirrors. This would not only cut down on manual work by the community but also ensure a certain level of standardization.
Edit: Chi Lei (@lychichem) is the URL scheme consistent for mirror and main sourceforge download links respectively? In that case a simple conversion could be done by the winget bot.
I think a pattern may be written. You can see, the mirror is like this: https://<abbr. for the mirror>.dl.sourceforge.net/project/<project name,no capital letters>/<project name, capital letter can be used>/<version>/<installer name>, and the direct link is like this: https://sourceforge.net/projects/<project name, no capital letters>/files/<project name, capital letter can be used>/<version>/<installer name>/download. So a bot only need to delete <abbr. for the mirror>.dl, add s after project, and add files between two <project name>
Okay, I've checked the sourceforge documentation for command line based downloads and it seems that there are two URL schemes that work reliably and people who submitted the manifests managed to pick the one and only URL that is not expected to work at all times.
The first correct link type 1 will actually redirect to the link type 2 so it would make sense to always use 2. Using the use_mirror query parameter is optional as it seems to get appended automatically.
In that case a simple regular expression based replacement could be done based on following URL pattern:
Activity
denelon commentedon Dec 29, 2020
This seems like more of a client feature that may also require some changes to the manifest.
doctordns commentedon Dec 29, 2020
Great idea.
question: what is the support status of Sourceforge? Does MSFT support this repo officially?
lychichem commentedon Dec 30, 2020
I mean, if a PR uses a mirror link in yaml file, like https://ayera.dl.sourceforge.net/project/xming/Xming/6.9.0.31/Xming-6-9-0-31-setup.exe, a robot will automatically change the link to https://sourceforge.net/projects/xming/files/Xming/6.9.0.31/Xming-6-9-0-31-setup.exe/download, or note the contributor "Seems you used a mirror link. You should use direct link when submitting." I believe this is just related to the winget/pkgs repo. As for which mirror sourceforge really use, it relates to users' cookie on sourceforge but not this repo.
megamorf commentedon Dec 31, 2020
I think it would make sense to have the bot automatically update installer URLs that tend to break easily as witnessed with the sourceforge mirrors. This would not only cut down on manual work by the community but also ensure a certain level of standardization.
Note: The original issue is microsoft/winget-pkgs#5787 with microsoft/winget-pkgs#5770 being a duplicate.
Edit: Chi Lei (@lychichem) is the URL scheme consistent for mirror and main sourceforge download links respectively? In that case a simple conversion could be done by the winget bot.
lychichem commentedon Dec 31, 2020
I think a pattern may be written. You can see, the mirror is like this:
https://<abbr. for the mirror>.dl.sourceforge.net/project/<project name,no capital letters>/<project name, capital letter can be used>/<version>/<installer name>, and the direct link is like this:https://sourceforge.net/projects/<project name, no capital letters>/files/<project name, capital letter can be used>/<version>/<installer name>/download. So a bot only need to delete<abbr. for the mirror>.dl, addsafterproject, and addfilesbetween two<project name>megamorf commentedon Dec 31, 2020
Okay, I've checked the sourceforge documentation for command line based downloads and it seems that there are two URL schemes that work reliably and people who submitted the manifests managed to pick the one and only URL that is not expected to work at all times.
CorrectCorrectWrongThe first correct link type
1will actually redirect to the link type2so it would make sense to always use2. Using theuse_mirrorquery parameter is optional as it seems to get appended automatically.In that case a simple regular expression based replacement could be done based on following URL pattern:
As regex that would be:
Here's a practical example: https://regexr.com/5jesj