09.09.2011 11:33, Andy Koppe пишет:
> On 8 September 2011 19:02, Oleksandr Gavenko wrote:
>> I install Cygwin and Cygwinports.
>>
>> Every time I update Cygwin (thus run setup.exe for Cygwin
>> and Next ==> Next ==> ... ==> OK) setup.exe
>> remove
>>
>> GCC, some xorg, Python, ...
>>
>> packages and install another from Cygwinports.
>>
>> This take a long time... (15 min).
>>
>> Next when I decide update Cygwinports same happen.
>>
>> How avoid a lot of package reinstallation and save life time?
>
> Select both a Cygwin mirror and a Cygwin Ports one in setup.exe. You
> can select a mirror without deselecting already selected ones by
> holding Ctrl while clicking on it.
>
I modify suggested techniques as use local install instead of network
(I get own copies of 'cygwin' and 'cygwinports' repos by rsync
to simplify distribution in organisation).
To achieve this goal I simply concatenate 'cygwin/setup.ini' and
'cygwinports/setup.ini'.
It works! Complete script to get repos
and generate new 'setup.ini' (note, it is not exactly that I use,
but simplified in some way and not tested):
#!/bin/sh
export LC_ALL=C
destdir=/srv/ftp/pub
mirror=rsync://mirrors.kernel.org/mirrors/sourceware
cd $destdir
log=/srv/ftp/pub/cygwin-rsync.sh.log
date +"================ %F %T%:z ================" >>$log
RSYNC_FLAGS="-va --delete --no-g --no-o --no-p"
rsync $RSYNC_FLAGS \
--exclude='*-src.tar.bz2' \
--include='/release/***' --include='/setup.*' \
--exclude='*' \
$mirror/cygwin/ $destdir/cygwin/ 2>&1 | tee -a $log
rsync $RSYNC_FLAGS \
--exclude='*-src.tar.bz2' \
--include='/release-2/***' --include='/setup.*' \
--exclude='*' \
$mirror/cygwinports/ $destdir/cygwinports/ 2>&1 | tee -a $log
cp cygwinports/setup.bz2 cygwinports/setup.ini.bz2
bzip2 -d cygwinports/setup.ini.bz2
wget -N http://cygwin.com/setup.exe 2>&1 | tee -a $log
cp -f setup.exe cygwin-setup.exe
mkdir -p cygwin-ini
{
sed \
-e 's=^install: release/=install: ../cygwin/release/=' \
-e 's=^source: release/=source: ../cygwin/release/=' \
<cygwin/setup.ini
sed \
-e '/^setup-timestamp: /d' \
-e 's=^install: release-2/=install: ../cygwinports/release-2/=' \
-e 's=^source: release-2/=source: ../cygwinports/release-2/=' \
<cygwinports/setup.ini
} >cygwin-ini/setup.ini
After script made job you get such hierarchy:
setup.exe
cygwin-ini/setup.ini
cygwin/
cygwin/release/...
cygwin/setup.ini
cygwinports/
cygwinports/release-2/...
cygwinports/setup.ini
Next time you run 'setup.exe' you need select 'cygwin-ini' dir as path
to local Cygwin packages.
------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the
BlackBerry® mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry® DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1
_______________________________________________
Cygwin-ports-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cygwin-ports-general