Mail Archives: cygwin/2008/12/23/09:21:19
X-Recipient: | archive-cygwin AT delorie DOT com
|
X-SWARE-Spam-Status: | No, hits=2.4 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_43,J_CHICKENPOX_64,RCVD_IN_CHINA,RCVD_IN_DNSWL_LOW,RCVD_NUMERIC_HELO,SPF_HELO_PASS,SPF_PASS
|
X-Spam-Check-By: | sourceware.org
|
To: | cygwin AT cygwin DOT com
|
From: | Hongyi Zhao <hongyi DOT zhao AT gmail DOT com>
|
Subject: | Re: About the spec of cygwin's setup.ini file.
|
Date: | Tue, 23 Dec 2008 22:19:37 +0800
|
Lines: | 106
|
Message-ID: | <ohr1l411obcs3f1nmt0qleckb8fg2alek6@4ax.com>
|
References: | <cda1l41ijuiottqselvfab1buh21n8le37 AT 4ax DOT com> <4950E19E DOT 6020803 AT byu DOT net>
|
Mime-Version: | 1.0
|
X-IsSubscribed: | yes
|
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm
|
List-Id: | <cygwin.cygwin.com>
|
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com>
|
List-Archive: | <http://sourceware.org/ml/cygwin/>
|
List-Post: | <mailto:cygwin AT cygwin DOT com>
|
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
|
Sender: | cygwin-owner AT cygwin DOT com
|
Mail-Followup-To: | cygwin AT cygwin DOT com
|
Delivered-To: | mailing list cygwin AT cygwin DOT com
|
On Tue, 23 Dec 2008 06:03:26 -0700, Eric Blake <ebb9 AT byu DOT net> wrote:
>> 2- Furthermore, if I want make a local repository based on the
>> setup.ini file, where should I put these pakcages? More specifically,
>> should I use the field value of _install:_ or the field value of
>> _source:_ to construct the local directory tree for my cygwin's
>> repository?
>
>Depends on whether you want to install the binaries or the sources used to
>generate those binaries. But why not use setup.exe, and let it do the
>work for you?
Let me describe the things in my case and the things I've done in more
detail:
1- If I use the setup.exe to install the cygwin directly from a
remote mirror, it will take me more time to do this thing.
Furthermore, due to the poor quality of my internet connection speed,
the installation process mabe be interrupted.
2- In light of the actual situation of my case, I write some bash
scripts to extract the partial content of the _source_ field in the
setup.ini file, than I incombinate it with a cygwin mirror to get the
real url addresses list for all of the cygwin packages like this:
------------------
#! /bin/sh
# This script. use to generate a download script. for cygwin !
#
# Usage : ./cyg_scratch.sh setup.ini
DEFAULT_SETUP_INI=setup.ini
BASE_MIRROR_SITE=http://cygwin.internet.bs/
## If the setup.ini specified ?
if [ -z $1 ] ; then
SETUP_INI=$DEFAULT_SETUP_INI
else
SETUP_INI=$1
fi
## If the SETUP_INI exists ?
if [ ! -f $SETUP_INI ] ; then
echo "$SETUP_INI does not exists !"
exit 0
fi
## Scratch the package file names in the setup.ini
for fname in `gawk '/^install:|^source:/ {print $2}' $SETUP_INI`
do
echo $BASE_MIRROR_SITE$fname
# wget -P `dirname $fname` $BASE_MIRROR_SITE$fname
## You can change to any statements to download the file you want.
# `dirname $fname` : the directory prefix
#
done
------------------
3- Based on the above script, I'll get all of the cygwin's packges
list into a file, say, file.lst files. But considering that the
duplicate issues I've posted here, I must then delete the duplicate
lines in this file firstly in order for the furer use of it to build
my own repository.
4- Then I use other multi-thread downloading tool to load the file.lst
in order to obtain all of the packages quickly and safely.
5- Once the above step completed successfully, I then the other script
to re-put these packages into the right directories as they are like
this:
---------------------
#!/bin/sh
if [ $# -ne 1 ]
then
cat << EOF
Usage: `basename $0` Path/to/packages/of/cygwin
Path/to/packages/of/cygwin: Is the path of the Cygwin's packages
downloaded by multithread tools, such as thunder.
An example: `basename $0` /cygdrive/e/OS_and_Manage/cygwin/downoaded
EOF
exit 1
fi
DOWNLOAD_DIR=$1
chmod +r ./files.lst
if [ -f ./move-packages.lst ];then rm -f ./move-packages.lst; fi
cp ./files.lst ./move-packages.lst
sed -i 's/^.*\/release\///g' ./move-packages.lst
if [ -f ./move-packages.lst.temp ];then rm -f
./move-packages.lst.temp; fi
sort -k2n ./move-packages.lst | uniq >> ./move-packages.lst.temp
mv -f ./move-packages.lst.temp ./move-packages.lst
FILELIST=`cat move-packages.lst`
for thefile in $FILELIST; do
PACKAGE_DIR="release/"`dirname $thefile`
mkdir -p $PACKAGE_DIR
chmod +rw $DOWNLOAD_DIR"/"`basename $thefile`
cp -f $DOWNLOAD_DIR"/"`basename $thefile` $PACKAGE_DIR
done
----------------------
These are the case of mine.
--
.: Hongyi Zhao [ hongyi.zhao AT gmail.com ] Free as in Freedom :.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -