Greetings, Brian Inglis via Cygwin! >> 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 Been struck by the same situation (though, in a less distributed environment - I've had to move Cygwin installation from one partition to another), I went with a simple sed script: >> sed -Ee '/ 1$/s/^([^[:space:]]+) [^[:space:]]+?(\.tar[^[:space:]]+ 1)$/\1 >> \1-0\2/; t; d;' < installed.db In essence: - for each line that ends with "1" (for packages, that were manually installed), replace version string with "0"; - if replacement was successful, go to next line; - delete line. Once I made sure the script is right, I just appended its output to the end of installed.db on target partition. Then run setup.exe and everything happened according to plan. This works for v3 database, so to be on a safe side, run setup once on the source machine to update installation and database to the latest version. -- With best regards, Andrey Repin Sunday, January 14, 2024 22:15:59 Sorry for my terrible english... -- 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