This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Fix ecosadmin.tcl on cygwin
- From: Jonathan Larmour <jlarmour at jifvik dot org>
- To: ecos-patches at sources dot redhat dot com
- Date: Thu, 24 Oct 2002 04:16:43 +0100
- Subject: Fix ecosadmin.tcl on cygwin
Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/ChangeLog,v
retrieving revision 1.82
diff -u -5 -p -r1.82 ChangeLog
--- ChangeLog 18 Oct 2002 16:56:52 -0000 1.82
+++ ChangeLog 24 Oct 2002 03:16:40 -0000
@@ -1,5 +1,10 @@
+2002-10-24 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * ecosadmin.tcl (ecosadmin::process_add_package): Use gzip -d, not
+ gunzip, as the latter fails with TCL on cygwin.
+
2002-10-18 Gary Thomas <gthomas@ecoscentric.com>
* ecos.db: Change package name for TS1000 flash part (consistency).
* NEWS: Add note about Allied Telesyn TS1000 port.
Index: ecosadmin.tcl
===================================================================
RCS file: /cvs/ecos/ecos/packages/ecosadmin.tcl,v
retrieving revision 1.9
diff -u -5 -p -r1.9 ecosadmin.tcl
--- ecosadmin.tcl 23 May 2002 22:59:54 -0000 1.9
+++ ecosadmin.tcl 24 Oct 2002 03:16:41 -0000
@@ -1071,11 +1071,11 @@ proc ecosadmin::filter_old_packages { ol
file rename -force $ecosfile $filename
}
# ----------------------------------------------------------------------------
# Process_add_packages. This routine is responsible for installing packages
-# into the eCos repository using the gunzip and tar tools which must be on
+# into the eCos repository using the gzip and tar tools which must be on
# the path
#
proc ecosadmin::process_add_package { } {
ASSERT { $ecosadmin::add_package != "" }
@@ -1093,16 +1093,16 @@ proc ecosadmin::process_add_package { }
# check for --extract_license on command line
if { $ecosadmin::extract_license_arg == 1 } {
# extract the license file (if any) from the specified gzipped tar archive
file delete $licensefile
- catch { exec > $ecosadmin::null_device gunzip < $abs_package | tar xf - $licensefile }
+ catch { exec > $ecosadmin::null_device gzip -d < $abs_package | tar xf - $licensefile }
return
}
# extract the package data file from the specified gzipped tar archive
- if { [ catch { exec > $ecosadmin::null_device gunzip < $abs_package | tar xf - $datafile } message ] != 0 } {
+ if { [ catch { exec > $ecosadmin::null_device gzip -d < $abs_package | tar xf - $datafile } message ] != 0 } {
fatal_error "extracting $datafile:\n$message"
}
# obtain license acceptance
if { [ ecosadmin::accept_license $abs_package $licensefile ] != "y" } {
@@ -1110,11 +1110,11 @@ proc ecosadmin::process_add_package { }
file delete $licensefile
fatal_error "license agreement not accepted"
}
# extract the remaining package contents and generate a list of extracted files
- if { [ catch { exec gunzip < $abs_package | tar xvf - > $logfile } message ] != 0 } {
+ if { [ catch { exec gzip -d < $abs_package | tar xvf - > $logfile } message ] != 0 } {
file delete $logfile
fatal_error "extracting files:\n$message"
}
# read the list of extracted files from the log file
@@ -1200,11 +1200,11 @@ proc ecosadmin::accept_license { archive
# --accept_license specified so do not prompt for acceptance
return "y"
}
# extract the specified license file from the specified gzipped tar archive
- if { [ catch { exec > $ecosadmin::null_device gunzip < $archivename | tar xf - $filename } message ] != 0 } {
+ if { [ catch { exec > $ecosadmin::null_device gzip -d < $archivename | tar xf - $filename } message ] != 0 } {
# no license file
return "y"
}
# read in the file and output to the user