Mail Archives: cygwin/2013/05/02/04:10:23
X-Recipient: | archive-cygwin AT delorie DOT com
|
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
|
| :list-unsubscribe:list-subscribe:list-archive:list-post
|
| :list-help:sender:to:from:subject:date:message-id:mime-version
|
| :content-type:content-transfer-encoding:cc; q=dns; s=default; b=
|
| HifHrvhoc9sYXQWsP56/RS/SNTGUAsA1ddi0cXYb5NM8+7aBqvhsJztMEfgv0/Ql
|
| gBuMCLzL4hAjfQo+kaF/tKUUOQaby4zHOZh0lmkhaVtffqZhc7WzO9sVHKBPDTho
|
| 6YO3biGzsdhazhfmoO/zniwyYetIXPW+OypjYKYSKoI=
|
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
|
| :list-unsubscribe:list-subscribe:list-archive:list-post
|
| :list-help:sender:to:from:subject:date:message-id:mime-version
|
| :content-type:content-transfer-encoding:cc; s=default; bh=oomN2T
|
| EMIohsdYF5xyXpIa5RSBY=; b=i6zUwEEFeOboDgbtGLnNGDeAWPOB93Q1NDiCLv
|
| OhvvchYgpztnZUoPY9WD+s1Y8KLFQilS9AR5uJVid1SbLc2gUph+VPwF1RtphfWY
|
| EJBDoOuwCrQMTZuTavGS5kH+yWMlaJJIRR/pA5BwBoY51bKKsGJtqV26aLJv//kf
|
| GXfug=
|
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
|
X-Spam-SWARE-Status: | No, score=-4.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1
|
To: | cygwin AT cygwin DOT com
|
From: | Sebastian Schuberth <sschuberth AT gmail DOT com>
|
Subject: | [PATCH] Do not confuse MinGW/MSYS users with talking about Cygwin when rebasing
|
Date: | Thu, 02 May 2013 10:05:30 +0200
|
Lines: | 163
|
Message-ID: | <51821E4A.8000706@gmail.com>
|
Mime-Version: | 1.0
|
Cc: | jason AT tishler DOT net
|
User-Agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080213 Thunderbird/2.0.0.12 Mnenhy/0.7.5.0
|
Hi,
here's a small patch against the rebase 4.4.0-1 package to the rebaseall / peflagsall scripts that avoid talking about "cygwin" when running under MSYS / MinGW to not confuse the user.
diff -Nur a/peflagsall.in b/peflagsall.in
--- a/peflagsall.in Mon Apr 30 15:37:16 2012
+++ b/peflagsall.in Thu May 2 09:54:24 2013
@@ -43,10 +43,22 @@
exit 1
}
+# Determine platform
+Platform=`uname -s`
+case $Platform in
+ *MINGW* | *mingw* ) Platform=MinGW ;;
+ *CYGWIN* | *cygwin* ) Platform=Cygwin ;;
+ *MSYS* | *msys* ) Platform=MSYS ;;
+ * )
+ echo "Unsupported platform: $Platform" 1>&2
+ exit 1
+ ;;
+esac
+
long_help ()
{
echo "$usage_string"
- echo "When invoked with no arguments, $ProgramName modifies every cygwin $DefaultSuffixes"
+ echo "When invoked with no arguments, $ProgramName modifies every $Platform $DefaultSuffixes"
echo "on the system: .exe files have their tsaware flag set, while .dll, .so and .oct"
echo "files have their dynamicbase flag removed. However, if any of [-d|-t|-s] are"
echo "specified then ONLY the actions so specified will occur."
@@ -137,22 +149,10 @@
# First see if caller requested help
check_args_for_help "$@"
-# Determine platform
-Platform=`uname -s`
-case $Platform in
- *MINGW* | *mingw* ) Platform=mingw ;;
- *CYGWIN* | *cygwin* ) Platform=cygwin ;;
- *MSYS* | *msys* ) Platform=msys ;;
- * )
- echo "Unsupported platform: $Platform" 1>&2
- exit 1
- ;;
-esac
-
# Verify only ash or dash processes are running
ProcessResult=0
case $Platform in
- mingw|msys )
+ MinGW|MSYS )
/bin/ps -s | /bin/gawk '\
# Count number of running ash or dash. \
/\/bin\/(d)?ash(\.exe)?$/{ ash_cnt++; } \
@@ -174,7 +174,7 @@
}'
ProcessResult=$?
;;
- cygwin )
+ Cygwin )
grep -E -q -i -v '/d?ash(.exe)?$' /proc/[0-9]*/exename
ProcessResult=$?
;;
@@ -182,7 +182,7 @@
if [ $ProcessResult -eq 0 -a -z "$RebaseDebug" ]
then
echo "$ProgramName: only ash or dash processes are allowed during this process."
- echo " Exit all Cygwin processes and stop all Cygwin services."
+ echo " Exit all $Platform processes and stop all $Platform services."
echo " Execute ash (or dash) from Start/Run... or a cmd or command window."
echo " Execute '/bin/peflagsall' from ash (or dash)."
exit 2
@@ -256,14 +256,14 @@
# Create file list
case $Platform in
- cygwin)
+ Cygwin)
find /etc/setup -name '*.lst.gz' | xargs gzip -d -c |
grep -E "\.($Suffixes)\$" |
sed -e '/cygwin1\.dll$/d' -e '/cyglsa.*\.dll$/d' \
-e '/sys-root\/mingw/d' -e 's/^/\//' \
-e '/d?ash\.exe$/d' -e '/peflags\.exe$/d' >"${TmpFile}"
;;
- msys)
+ MSYS)
for f in /bin /lib
do
find $f -type f |
@@ -273,7 +273,7 @@
-e '/peflags\.exe$/d' >>"$TmpFile"
done
;;
- mingw) ;; # no automatic files; only command line
+ MinGW) ;; # no automatic files; only command line
esac
# Append user supplied file list, if any
diff -Nur a/rebaseall.in b/rebaseall.in
--- a/rebaseall.in Thu Jun 7 20:50:34 2012
+++ b/rebaseall.in Wed Apr 24 20:49:55 2013
@@ -79,9 +79,9 @@
# Determine platform
Platform=`uname -s`
case $Platform in
- *MINGW* | *mingw* ) Platform=mingw ;;
- *CYGWIN* | *cygwin* ) Platform=cygwin ;;
- *MSYS* | *msys* ) Platform=msys ;;
+ *MINGW* | *mingw* ) Platform=MinGW ;;
+ *CYGWIN* | *cygwin* ) Platform=Cygwin ;;
+ *MSYS* | *msys* ) Platform=MSYS ;;
* )
echo "Unsupported platform: $Platform" 1>&2
exit 1
@@ -124,7 +124,7 @@
then
ProcessResult=0
case $Platform in
- mingw|msys )
+ MinGW|MSYS )
/bin/ps -s | /bin/gawk '\
# Count number of running ash or dash. \
/\/bin\/(d)?ash(\.exe)?$/{ ash_cnt++; } \
@@ -146,7 +146,7 @@
}'
ProcessResult=$?
;;
- cygwin )
+ Cygwin )
grep -E -q -i -v '/d?ash(.exe)?$' /proc/[0-9]*/exename
ProcessResult=$?
;;
@@ -154,7 +154,7 @@
if [ $ProcessResult -eq 0 -a -z "${RebaseDebug}" ]
then
echo "${ProgramName}: only ash or dash processes are allowed during rebasing"
- echo " Exit all Cygwin processes and stop all Cygwin services."
+ echo " Exit all $Platform processes and stop all $Platform services."
echo " Execute ash (or dash) from Start/Run... or a cmd or command window."
echo " Execute '/bin/rebaseall' from ash (or dash)."
exit 2
@@ -199,7 +199,7 @@
# Create rebase list
case $Platform in
- cygwin)
+ Cygwin)
find /etc/setup -name '*.lst.gz' | xargs gzip -d -c |
grep -E "\.($Suffixes)\$" |
sed -e '/\/cygwin1\.dll$/d' -e '/\/cyglsa.*\.dll$/d' \
@@ -209,7 +209,7 @@
# dynamicbase flag removed.
NoDyn='-n'
;;
- mingw|msys)
+ MinGW|MSYS)
for f in /bin /lib
do
find $f -type f |
--
Sebastian Schuberth
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -