delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/07/10/00:21:43

X-Recipient: archive-cygwin AT delorie DOT 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 AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT 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 AT yahoo DOT com>
X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9
Date: Sat, 10 Jul 2021 00:14:37 -0400
To: cygwin AT cygwin DOT com
Subject: Re: search and install packages via bash?
In-Reply-To: <20210708211451.0007A3888821@sourceware.org>
References: <20210708084556 DOT GA7359 AT tik DOT uni-stuttgart DOT de>
<bf14fb2b-ddf5-8618-0da3-9ea5531c5877 AT dronecode DOT org DOT uk>
<20210708141913 DOT GA21966 AT tik DOT uni-stuttgart DOT de>
<20210708211451 DOT 0007A3888821 AT sourceware DOT 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 AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Richard Beels via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Richard Beels <spiffnetservice AT gmail DOT com>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019