How to reinstall everything?

Brian Inglis Brian.Inglis@SystematicSw.ab.ca
Sat Jun 27 17:39:28 GMT 2020


On 2020-06-26 12:17, Brian Inglis wrote:
> On 2020-06-26 11:47, Eliot Moss wrote:
>> I've moved to new computer and want to install the same packages I had
>> before. Is there a way to tell setup from the command line to re-install all
>> packages from my local package directory?  (Things are mostly installed, but
>> not working entirely properly, and it is tedious to go through an mouse-click
>> every item to "Reinstall"!)
> $ setup-x86/_64 -P "`ls .../*tp*%3a%2f%2f*%2f/*/release/ | sort -u`"

The previous command may miss some packages that are components of other
packages, so below are commands which produce complete lists:

installed packages:
$ awk '3 == NF {print $1}' /etc/setup/installed.db
$ sed '1d;/\s[01]$/s/\s.*$//' /etc/setup/installed.db

package directories:
$ find <local package directory>/*tp*%3a%2f%2f*%2f/*/release/*/ -type d | \
sed 's!/$!!;s!^.*/!!' | sort -u
but this may include some non-packages, as would similar approaches.

> where ... is the path to your local package directory, *tp*%3a%2f%2f*%2f should
> handle your download mirror directory, /*/ handles both noarch and x86/_64
> architecture directories, release directory contains the package name
> directories, and sort -u eliminates duplicates in noarch and x86/_64
> architecture directories.
> 
> Don't forget to cp -r ~/.[a-z]*, modified /etc/ files, and rerun
> {,/usr}/{s,}bin/*config scripts.

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

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in IEC units and prefixes, physical quantities in SI.]


More information about the Cygwin mailing list