public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@Shaw.ca>
To: cygwin@cygwin.com
Subject: Re: Capturing a Cygwin instance from another PC
Date: Mon, 27 Nov 2023 10:43:54 -0700	[thread overview]
Message-ID: <7b39e912-1cf4-4ab7-b3a4-c0973d186594@Shaw.ca> (raw)
In-Reply-To: <87plzvd2ok.fsf@>

On 2023-11-27 01:24, ASSI via Cygwin wrote:
> Chris Wagner via Cygwin writes:
>> If you just want to duplicate the package selection this trick is all
>> you need.
>> 1. Get the current list: cygcheck -cd |perl -ane '$\=","; print $F[0]'
>> 2. Ignore the "Cygwin,Package" at the front.
>> 3. Copy all that and put it as the command line argument to setup.exe -P

> That will lose the information about which packages were installed by
> explicit user request vs. installed as a dependency.

What that means is the complete information is only available in:

	/etc/setup/installed.db

which has header:

	INSTALLED.DB 3

then a list of installed packages in which each line specifies 3 fields:

	NAME NAME-VERSION-RELEASE.tar.bz2 MANUALLY_PICKED_FLAG

in that 2nd field .tar.bz2 is the historically available download format but 
only VERSION-RELEASE is now significant, and the only packages you should be 
selecting to install are those which have a 3rd field manually picked flag == 1 
as the others with 0 are automatically installed dependencies e.g.

$ awk '1 < FNR && /1/ == $3 { printf( "%s ", $1) }; END { printf( "\n" ) }' \
	~/cygwin-64t/etc/setup/installed.db | wc
       1      52     686
$ grep -c '\s0$' ~/cygwin-64t/etc/setup/installed.db
364
$ awk '1 < FNR && /1/ == $3 { printf( "%s ", $1) }; END { printf( "\n" ) }' \
	~/cygwin-64/etc/setup/installed.db | wc
       1     884   12124
$ grep -c '\s0$' ~/cygwin-64/etc/setup/installed.db
1638

so from 2-7 times as many packages as manually picked could be dependencies 
automatically installed.

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                 -- Antoine de Saint-Exupéry

  reply	other threads:[~2023-11-27 17:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-22 14:53 Jose Isaias Cabrera
2023-11-22 15:43 ` Bill Stewart
2023-11-22 16:15   ` Eliot Moss
2023-11-22 21:38     ` Jose Isaias Cabrera
2023-11-22 22:01       ` Ken Brown
2023-11-23  3:25       ` Eliot Moss
2023-11-23  9:12         ` Backwoods BC
2023-11-22 22:44     ` Cedric Blancher
2023-11-23 15:24       ` Corinna Vinschen
2023-11-22 16:20 ` EXTERNAL SENDER: " Dale Lobb (Sys Admin)
2023-11-22 21:49   ` Jose Isaias Cabrera
2023-11-23 18:40 ` ASSI
2023-11-23 20:27   ` Doug Henderson
2023-11-27  2:36 ` Chris Wagner
2023-11-27  8:24   ` ASSI
2023-11-27 17:43     ` Brian Inglis [this message]
2023-11-29 17:42       ` Jose Isaias Cabrera
2024-01-14 19:23       ` Andrey Repin
2023-11-27  2:46 ` Capturing a Cygwin instance from another PC (CORRECTION) Chris Wagner
2023-12-07 22:59 ` Capturing a Cygwin instance from another PC Andrew Schulman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7b39e912-1cf4-4ab7-b3a4-c0973d186594@Shaw.ca \
    --to=brian.inglis@shaw.ca \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).