Re: Setup not accepting multiple pkgs on the commandline anymore?

Jon Turney via Cygwin <[email protected]>
Newsgroups gmane.os.cygwin
Message-ID <[email protected]>
On 16/12/2025 18:22, Soren via Cygwin wrote:
> Hello Jon, Cygwinstas,
> I am attempting to operate setup.exe by commandline arguments and what I'd
> like to have happen, doesn't. In advance, sorry to bore readers if this is
> an often-discussed issue or whatever. The point I want to make is that
> `--packages' does not seem to work as how it's documented.
> 
> First I tried building this pipeline (I am not a shell genius, but I get by
> ...anyway, improvement suggestions welcome):
> 
> cygcheck -e 'perl-pod-*' | sed -ne 's/\s:.\+//p' | xargs | sed -ne 's/
> /,/gp' |
>    tee Documents/script-data/CygwinPodDists.lst
> 
> Tmpfile Documents/script-data/CygwinPodDists.lst now contains:
> 
> perl-Pod-Coverage,perl-Pod-Coverage-TrustPod,perl-Pod-Escapes,perl-Pod-Eventual,perl-Pod-LaTeX,perl-Pod-Markdown,perl-Pod-Parser,perl-Pod-Perldoc,perl-Pod-Plainer
> 
> ...which ought to be valid arguments for --packages
> 
> However, what I intended to have happen does not. Even when I simplify it
> to offer only a single package name it does not do the right thing:
> 
> $ "/cygdrive/c/Program Files/setup-x86_64.exe" -q --download --root
> C:\ix\cygwin  --local-package-dir "C:/Users/soren/cygDL.dir" --site
> https://cygwin.mirror.constant.com --include-source --packages
> "perl-Pod-Eventual"
> 
> What DOES it do? It downloads all (AFAICT) of base cygwin!:
> $ find cygDL.dir/ -type f
> cygDL.dir/https%3a%2f%2fcygwin.mirror.constant.com
> %2f/noarch/release/base-cygwin/base-cygwin-3.8-2-src.tar.xz
> cygDL.dir/https%3a%2f%2fcygwin.mirror.constant.com
> %2f/noarch/release/base-cygwin/base-cygwin-3.8-2.tar.xz
> cygDL.dir/https%3a%2f%2fcygwin.mirror.constant.com
> %2f/noarch/release/base-files/base-files-4.3-3-src.tar.zst
> cygDL.dir/https%3a%2f%2fcygwin.mirror.constant.com
> %2f/noarch/release/base-files/base-files-4.3-3.tar.zst
> ... etc etc ...
> 
> Is setup in fact trying to fulfill all the dependency prerequisits for
> "perl-Pod-Eventual"?!? As a write this, that just occured to me. Sure
> enough:

Yeah, specifying '--packages foo' doesn't mean "only install foo", 
because that would probably be useless, but "add foo to installation."

What you'll get is the union of:

* all base packages
* foo
* the recursive dependencies of foo

This hopefully results in 'foo' working.

Of course, setup shouldn't download and install things which are already 
installed, but if the root and local package directory specified are 
empty, what you describe is expected.

All of which isn't to say there isn't a bug here, or there's something 
less surprising we could do, because this code isn't too clever, but 
more details are required to make that determination.

> And couldn't setup print SOMETHING to the console to mark the operation of
> fetching each package, so that the user has some idea of what it's doing?
> That would be really sweet.
  Unfortunately, setup disconnects from the terminal when it elevates 
for administrator privileges.

Maybe this is a misfeature, but I suspect it's unavoidable.

You can use -B/--no-admin, or run in an already elevated session to 
avoid that. Adding -v/--verbose will produce lots of pointless debug output.


-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.