Skip to content
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

after wget and lynx, apt-cyg should fallback to curl too, if available #99

Open
zaxebo1 opened this issue Jan 7, 2017 · 14 comments
Open

Comments

@zaxebo1
Copy link

zaxebo1 commented Jan 7, 2017

apt-cyg downloads packages using wget and falls back to lynx. I will request to kindly make apt-cyg fallback to "curl" too, if available.

even if curl is not available then it should fallback to the following script(which is pure bash)
http://superuser.com/a/496572

@keithdtyler
Copy link

curl is part of default Cygwin install and is required by other base tools, iirc, so it would be best if curl wasn't just the fallback, but the primary option.

$ apt-cyg install nano
Installing nano
wget is not installed, using lynx as fallback
/usr/bin/apt-cyg: line 128: lynx: command not found
nano-2.6.2-1.tar.xz: FAILED

alas

@native-api
Copy link

native-api commented Jan 19, 2017

And what if I prefer elinks? Or pwget? Or perl/python/you-name-it?

wget is the simplest way. It has the fewest dependencies of all options and, unlike reading from /tcp/<whatever>, it's sophisticated enough to handle things like unreliable transmission/throttling (not to mention FTP). So, I don't even see a use to fall back to anything else.

@zaxebo1
Copy link
Author

zaxebo1 commented Jan 20, 2017

it is not about "preference", it is about "practicality" . Most of the installations (across globes) we have encountered has only curl installed, no wget/lynx. In that case if one has this apt-cyg script, then atleast apt-cyg should be able to download either fallback or atleast download wget using curl or the pure bash code.
And then apt-cyg can continue with downloading packages with wget or lynx as it already does.


That is, in this way one can be able to download most of the apt-cyg pre-requisites using apt-cyg script itself. It is about self-bootstrapping flexibly .

@h3ct0rjs
Copy link

I was testing this tool, because I was unaware of the requirements of apt-cyg I just install the base packages giving by cygwin in the default installation, so the default package curl is already installed but not lynx/wget so why no change this @zaxebo1 you could do a fork of this project and change the script

@zaxebo1
Copy link
Author

zaxebo1 commented Jan 21, 2017

if we go by that above logic, as wget,lynx are not in base install, then we should drop the support of wget and lynx too from apt-cyg


proposal:
Somehow, with some choice installation of packages it happens that either curl or wget is there in most installations. This we have seen in many organizations installation. So, why not support that: if wget is not found, then apt-cyg can download wget using curl etc,for bootstrapping its pre-requisites

@zaxebo1
Copy link
Author

zaxebo1 commented Jan 21, 2017

  1. if MSWindows ftp.exe based solution is implemented, then i am happy with that 👍 (The only caution is that currently invoking Mswindows "ftp.exe" hangs the cygwin on my machine. )

  2. If you implement ftp.exe based solution for installing wget, then the line to download "lynx -source rawgit.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg" can also be alternatively put in terms of "ftp.exe ????" , then it will solve chicken and egg problem of having lynx through commandline for download apt-cyg itself. Hence, ftp.exe can help here too

@keithdtyler
Copy link

keithdtyler commented Jan 22, 2017

Guys, the point is that apt-cyg needs something to download with. It doesn't matter what it is. I thought curl was in base because I seem to recall it being used during cygwin base installation and for a long time I cursed the installer because it would install curl and NOT wget, which I prefer.

For me, the issue was that I ended up in a situation where I had neither wget or lynx. So in order to use apt-cyg, I had to go back to the GUI installer, which kind of feels like defeating the purpose. At least it was only one-time thing.

But bottom line, to be completely fair, a robust piece of software should not just go "Oop! Kablooey!" because something it expects to be there isn't there. It should either explain the problem or work around it. And right now, if you don't have wget or lynx, apt-cyg goes the "kablooey" route.

@native-api
Copy link

native-api commented Jan 22, 2017

https://github.com/kou1okada/apt-cyg simply checks at startup if tar, wget and awk are installed and bails out with an error message if not. My vote goes there.

It's not much to ask from a user to install a few prerequisites one-time with the GUI installer, and wget is preferable to curl here as I explained earlier.

@keithdtyler
Copy link

keithdtyler commented Jan 23, 2017

@svnpenn Sorry I added a constructive comment to your code. Didn't mean to brutally assault your ego. Jeebus Crips.

@ivandavidov
Copy link

I vote for including curl as either primary download option, or as primary backup option after wget. Otherwise, the current approach works fine and I'm OK with it.

@nhed
Copy link

nhed commented Jul 25, 2017

I really think you should include curl. I don't care if you include other fallbacks (wget->lynx->curl->/dev/tcp) - but you should do something before the world starts forking the heck out of this repo. This is a great tool but its broken (i.e. when i instruct newbs on how to use it and if need to tell them to go back to setup - its a fail)

@nhed nhed mentioned this issue Jul 25, 2017
@RichardBronosky
Copy link

The maintainer doesn't care. I give up. Which fork should I use?

@RichardBronosky
Copy link

Here is how you can get wget if all you have is curl:

# check to see if you are running 64 bit cygwin
$ uname -a
CYGWIN_NT-10.0 WINDOWS-ABMESEI 2.6.0(0.304/5/3) 2016-08-31 14:32 x86_64 Cygwin

# if you are not using 64 bit, get http://www.cygwin.com/setup-x86.exe instead of...
$ curl -o cygwin-setup.exe http://www.cygwin.com/setup-x86_64.exe
$ chmod +x cygwin-setup.exe

# now you are ready to use it according to: https://cygwin.com/faq/faq.html#faq.setup.cli
$ cygwin-setup.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode --packages wget

Now you have wget and can use apt-cyg. But, it begs the question… now why do I need it anyway.

@nhed
Copy link

nhed commented Mar 30, 2018

i agree - using setup in silent mode may be a better bigger picture solution for apt-cyg but you can develop it, and invest and maintainers still wont take your contrib, or even interact - so why bother

feel free to use my fork - i don't have any plans to remove it till apt-cyg is made to just work regardless of guidance people received on initial install of cygwin

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

No branches or pull requests

7 participants