[PATCH] Setup.exe: New commandline option --only-site

Dave Korn dave.korn.cygwin@googlemail.com
Wed Nov 4 17:32:00 GMT 2009


    Hello perverts and non-perverts alike!

  Having recently become a pervert, oops I mean provider, I wanted to provide
a full turnkey installation on a DVD for offline use, and to avoid confusing
any cygn00bs among them, I wanted it to have a setup.exe that would just
install from the provided disk and not scare them with any of that stuff about
external mirrors.  I also wanted it to work regardless of whether there was an
existing installation on the local drive or not, and when there was one,
setup.exe would of course pick up the user settings from it, most of which is
desirable, but I didn't want them to be shown a whole long list of mirrors and
have to do something potentially offputting like multi-selecting stuff, nor
want them to be confused by all these external sites showing up (perhaps not
realising that the local mirror will have been added right at the very bottom
of the list and won't be visible without scrolling down).

  So, the --only-site option lets you invoke setup.exe in locked-down mode
where the only site it shows is the one you've specified on the command-line
using the -s option.  It doesn't bother to download the mirrors list, but it
doesn't update the local mirrors list either, so it won't wipe out any
existing one.  I didn't make it disable the "Add" button or skip the mirror
page altogether, because I didn't want to take away the user's "get out of
jail free card" for when something goes wrong, or if they want to change from
installing from a local DVD to installing from a network-drive copy of the
install disk, and besides if you want that then what you're really looking for
is probably to use full-blown unattended mode, but maybe we might add another
option in the future that specifies "Unattended mode for everything except the
package chooser page"?  Anyway, here it is for your consideration.

	* site.cc: Add #include of BoolOption header from libgetopt.
	(OnlySiteOption): New BoolOption for command-line -O option.
	(get_site_list): Respect BoolOption by not downloading mirror
	list, nor using nor updating cached mirrors.

  OK?

    cheers,
      DaveK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: setup-only-site-option.diff
Type: text/x-c
Size: 1496 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20091104/e83ac485/attachment.bin>


More information about the Cygwin-apps mailing list