X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 742983AAB44F
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1625890901;
	bh=9cHhsdmPa0xcOkuLbXgD9weP3gnnWJYA3+8A0EV915E=;
	h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe:
	 List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
	 From;
	b=TQfCEF21OQzCKYcz6usMJg4fH0x3kcOKLCAXBW3a/G1IJ2oQRNG4oztwX9YCJ4Nxp
	 ZBiU/6jUhiyGtxKiACgCxP5972n21BL7800Vzg8/HSXAifR71kAkfbpTSA4qJBvLWk
	 L0osQRN851maZJKhj0iW7S1mMBBko942oFCESiUY=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 112653853817
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:message-id:from:date:to:subject:in-reply-to
 :references:mime-version;
 bh=BNQZe2ixqXqzOCp1+NJf9khO92Ics02/p/bCnxWgGr0=;
 b=PZtdMXQQOfUCU2dhxQsLUFgaGmysGaMLJuSNRUpNfwy9WxL9Ckvu0fxEmoxzvT2vN/
 mKVjQYPXIXUG7rwgm1s21Yj40SuEwhc3dJtAY4XhWEl6NYc5T9vBaIMG1Ly6N82KTp5Y
 H33MaUv3928DOrFxv4Qn1U4Fvy2SG+MIZ6cWebyNy0/eRObpjwdhRLN4EMtsPretc7OD
 2D1r64poXUsVqGhrJpvz0WWVeM5x0TNA81W8ww/lzyePN6aAMxwGxChp7qjihoLCtNcP
 qy7vGF9UcLH3MJ98lF+eSABE2cSB55G7yytAXXnW9kJitM91vX7uTnduVaBfEiaiTBy3
 rZ7w==
X-Gm-Message-State: AOAM532rh1m278fnhk6d6+flk7l2Wi+R5grAhtzOiz2lk/i3Ozy1fIK/
 7J7MGNi8H2z7S/UDaez5u6SEJVKMglw=
X-Google-Smtp-Source: ABdhPJzyA/cefFlLnfqsxPKUzLdK+vgnvaYNMyV9teXSqpJEubg1XFiWqWadfhikYT+A8KyGJB7ZsA==
X-Received: by 2002:a05:620a:166d:: with SMTP id
 d13mr12918879qko.248.1625890870410; 
 Fri, 09 Jul 2021 21:21:10 -0700 (PDT)
Message-ID: <60e92035.1c69fb81.da2f6.8414@mx.google.com>
X-Google-Original-From: Richard Beels <rbeels@yahoo.com>
X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9
Date: Sat, 10 Jul 2021 00:14:37 -0400
To: cygwin@cygwin.com
Subject: Re: search and install packages via bash?
In-Reply-To: <20210708211451.0007A3888821@sourceware.org>
References: <20210708084556.GA7359@tik.uni-stuttgart.de>
 <bf14fb2b-ddf5-8618-0da3-9ea5531c5877@dronecode.org.uk>
 <20210708141913.GA21966@tik.uni-stuttgart.de>
 <20210708211451.0007A3888821@sourceware.org>
Mime-Version: 1.0
X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, DKIM_SIGNED,
 DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,
 SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 server2.sourceware.org
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Richard Beels via Cygwin <cygwin@cygwin.com>
Reply-To: Richard Beels <spiffnetservice@gmail.com>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Errors-To: cygwin-bounces+archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.com>

At 07/08/2021 at 17:11, Shakespearean monkeys danced on Richard Beels 
via Cygwin's keyboard and said:

><snipped>
>2, use fzf.  i don't use it (yet?) but it should be something like:


I decided to download fzf and play with this since the itch grabbed 
me...  It took all of 5 seconds for me to remember a bunch of 
packages with a "-" in the name, so came up with this instead:

cyginst() { # install cygwin package(s) from the commandline, can't do *-src
_pkg=$(cygcheck -p "$1"       \
     | grep "$1"               \
     | fzf --multi --reverse   \
     | sed -E 's_-[0-9]+.*$__' \
     | tr '\n' ','             \
     | sed 's_,$__')
/setup-x86_64.exe --packages "$_pkg"
}

Since this would whack -src, I tried to figure out how to install 
just a source package from the commandline to see if this would 
matter but couldn't figure it out, so I guess the -I option is there 
for a reason.

But I came across a weirdity with setup (2.908).  While you can 
change the mode into download (-D) only or local-install (-L) via 
commandline, I couldn't figure out how to change it back to "install 
from the internet" from the commandline.  I think there should be a 
parameter for this, but heck if I I have any idea about C++ (I can 
barely spell it).

At a minimum, it seems that the code currently is in contradiction to 
the --help output: once you choose -L or -D, that becomes the default 
mode for subsequent runs.  Until explicitly changed back by running 
setup and clicking the appropriate button on the second dialog.  It 
looks like the "last-action" setting in /etc/setup/setup.rc controls 
what is used as the default: "Download", "Install" (local install) 
and "Download, Install" (internet install).  The expected behavior 
would be as the --help output describes.




Cheers!


-- 
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
