public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* setup-1.7 with -D and -L options
@ 2008-08-20 15:11 Ralph Hempel
  2008-08-20 15:39 ` Dave Korn
  0 siblings, 1 reply; 5+ messages in thread
From: Ralph Hempel @ 2008-08-20 15:11 UTC (permalink / raw)
  To: cygwin-apps

When I run a command-line setup-1.7 with various combinations
of -D and -L, I get the following results, and the last combination
is a bit strange.

I'm not sure what is supposed to happen when we specify both -D
and -L on the command line....

neither -D nor -L

Downloads packages from mirror specified with -s to local directory
specified with -l and installs to root directory specified with -R

-D only

Downloads packages from mirror specified with -s to local directory
specified with -l

-L only

Installs from local directory specified with -l to root directory
specified with -R

-D and -L

Downloads packages from mirror specified with -s to local directory
specified with -l and installs ONLY etc/setup/* to root directory
specified with -R

Comments?

Ralph

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: setup-1.7 with -D and -L options
  2008-08-20 15:11 setup-1.7 with -D and -L options Ralph Hempel
@ 2008-08-20 15:39 ` Dave Korn
  2008-08-20 16:00   ` Ralph Hempel
  0 siblings, 1 reply; 5+ messages in thread
From: Dave Korn @ 2008-08-20 15:39 UTC (permalink / raw)
  To: cygwin-apps

Ralph Hempel wrote on 20 August 2008 16:11:

> I'm not sure what is supposed to happen when we specify both -D
> and -L on the command line....

  It's an undiagnosed usage error.  The -D and -L options are equivalents to
the radio buttons on the "choose installation type" page and it shouldn't be
possible to select both simultaneously; we should (but currently don't) issue
an error and quit.

> Comments?

  Basically a WDDTT situation, but you're right, we should forbid it rather
than allow what is effectively "undefined behaviour".  Care to file a
bugzilla?


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: setup-1.7 with -D and -L options
  2008-08-20 15:39 ` Dave Korn
@ 2008-08-20 16:00   ` Ralph Hempel
  2008-08-20 17:26     ` Dave Korn
  0 siblings, 1 reply; 5+ messages in thread
From: Ralph Hempel @ 2008-08-20 16:00 UTC (permalink / raw)
  To: cygwin-apps

Dave Korn wrote:

>   Basically a WDDTT situation, but you're right, we should forbid it rather
> than allow what is effectively "undefined behaviour".  Care to file a
> bugzilla?

Sure, but I'd also like to be able to make sure that there's not another
issue lurking in there :-)

If I do not specify either -D or -L, then I would expect that setup
would download the packages from a mirror into the local directory
and then do the install.

Infortunately, this is not the case when you add packages to an existing
cygwin install.

If I run the following command line:

setup -q -n -s http://mirror.csclub.uwaterloo.ca/cygwin/
   -l c:\cygwin\SetupTest\1.7 -R c:\cygwinTest -P autoconf,gcc-core,make

Then the required packages and dependencies get downloaded to a local
directory, but the install does not happen.

I have to run setup.exe again and specify the -L option....

setup -q -n -L -s http://mirror.csclub.uwaterloo.ca/cygwin/
   -l c:\cygwin\SetupTest\1.7 -R c:\cygwinTest -P autoconf,gcc-core,make

Ralph

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: setup-1.7 with -D and -L options
  2008-08-20 16:00   ` Ralph Hempel
@ 2008-08-20 17:26     ` Dave Korn
  2008-08-20 18:22       ` Ralph Hempel
  0 siblings, 1 reply; 5+ messages in thread
From: Dave Korn @ 2008-08-20 17:26 UTC (permalink / raw)
  To: cygwin-apps

Ralph Hempel wrote on 20 August 2008 17:00:

> Dave Korn wrote:
> 
>>   Basically a WDDTT situation, but you're right, we should forbid it
>> rather than allow what is effectively "undefined behaviour".  Care to
>> file a bugzilla?
> 
> Sure, but I'd also like to be able to make sure that there's not another
> issue lurking in there :-)

  Ahh, hang on ... maybe -D and -L /should/ be allowed together.
 
> If I run the following command line:
> 
> setup -q -n -s http://mirror.csclub.uwaterloo.ca/cygwin/
>    -l c:\cygwin\SetupTest\1.7 -R c:\cygwinTest -P autoconf,gcc-core,make
> 
> Then the required packages and dependencies get downloaded to a local
> directory, but the install does not happen.

  See /etc/setup/last-action.  It memorized your "-D" from last time round
(just as it would memorise which radio button you selected).
 
> I have to run setup.exe again and specify the -L option....
> 
> setup -q -n -L -s http://mirror.csclub.uwaterloo.ca/cygwin/
>    -l c:\cygwin\SetupTest\1.7 -R c:\cygwinTest -P autoconf,gcc-core,make

  So my first thought was that the real issue here is that we need to add a
"-I".  But then looking at last-action I see that it works how the
command-line options could/should work: it has "Download" or "Install" or
"Download,Install"; i.e. it's like checkboxes rather than radioboxes.

  So I figure we ought to make -D and -L together work as if you had specified
nothing at all.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: setup-1.7 with -D and -L options
  2008-08-20 17:26     ` Dave Korn
@ 2008-08-20 18:22       ` Ralph Hempel
  0 siblings, 0 replies; 5+ messages in thread
From: Ralph Hempel @ 2008-08-20 18:22 UTC (permalink / raw)
  To: cygwin-apps

Dave Korn wrote:

>   So my first thought was that the real issue here is that we need to add a
> "-I".  But then looking at last-action I see that it works how the
> command-line options could/should work: it has "Download" or "Install" or
> "Download,Install"; i.e. it's like checkboxes rather than radioboxes.
> 
>   So I figure we ought to make -D and -L together work as if you had specified
> nothing at all.

I guess if we take a step back and figure out what the goal is, then we
can figure out how to get there. If I understand correctly

1. last-action should be consulted only if _neither_ -D nor -L are given
2. if -D is given, then download to local directory only
3. if -L is given, then install from local directory only
4. if both -D and -L are given, download and install

In cases 2,3,4 - set last-action based on the state of -D and -L

Ralph

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-08-20 18:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-20 15:11 setup-1.7 with -D and -L options Ralph Hempel
2008-08-20 15:39 ` Dave Korn
2008-08-20 16:00   ` Ralph Hempel
2008-08-20 17:26     ` Dave Korn
2008-08-20 18:22       ` Ralph Hempel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).