--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: Don't hardcore which zip tool to use
- From: Christian Kurz <shorty@debian.org>
- Date: Sun, 9 Feb 2003 14:15:47 +0100
- Message-id: <20030209131547.GA3506@salem.getuid.de>
Package: f-prot-installer
Version: 0.5.1
Severity: wishlist
Hi,
I've used f-prot some time before I decided to install the debian
package. I had already talked with the Matthias about this, but we
disagreed about the issue. Now I had some time and again looked at the
hardcoded usage of unzip. I'm not inclined to install about 200kb for
unzip to unzip the downloaded files, when miniunzip could fulfill the
same task and is already included in the package together with zlib. So
I worked on the check-updates.sh script. I came up with the following
patch:
,----[ patch ]
| --- /usr/lib/f-prot/check-updates.sh 2003-02-09 13:50:41.000000000 +0100
| +++ check-updates.sh 2003-02-09 14:07:00.000000000 +0100
| @@ -57,6 +57,20 @@
| SIGNINSTALLED=0
| NEWFILE=""
|
| +# Decide which zip tool is available
| +if [ -x `which unzip` ]; then
| + UNZIP=`which unzip`
| +elif [ -x `which miniunzip` ]; then
| + UNZIP=`which miniunzip`
| +else
| + echo "Error: Neither Unzip or miniunzip are installed."
| + echo "One of them is needed to unpack the downloaded"
| + echo "virus files."
| + echo ""
| + exit 1
| +fi
| +
| +
| # A function to check the parameters we are given.
| parseParameters ()
| {
| @@ -183,7 +197,7 @@
| # we need.
| checkForExternalPrograms ()
| {
| - for program in grep head wget unzip
| + for program in grep head wget $UNZIP
| do
| which $program > /dev/null 2>&1
| CMDRESULT=$?
| @@ -386,7 +400,7 @@
| downloadCompleted
| fi
|
| - unzip -o fp-def.zip > /dev/null 2>&1
| + $UNZIP -o fp-def.zip > /dev/null 2>&1
| CMDRESULT=$?
| if [ $CMDRESULT -ne 0 ]
| then
| @@ -404,7 +418,7 @@
| downloadCompleted
| fi
|
| - unzip -o macrdef2.zip > /dev/null 2>&1
| + $UNZIP -o macrdef2.zip > /dev/null 2>&1
| CMDRESULT=$?
| if [ $CMDRESULT -ne 0 ]
| then
`----
This doesn't hardcore the information which unzip tool is available, but
will figure it out when started. Please consider forwarding the patch to
F-Secure or using it in the Debian Patch. I can tell you that miniunzip
works fine as replacement for unzip. I gave the patch a short test and
didn't see any problems, but you might want to double-check. Thanks for
considering it.
Christian
-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux salem 2.4.19 #1 Wed Dec 4 19:02:50 CET 2002 i586
Locale: LANG=POSIX, LC_CTYPE=de_DE@euro
Versions of packages f-prot-installer depends on:
ii wget 1.8.2-9 retrieves files from the web
-- no debconf information
--
Life's most urgent question is: what are you doing for others?
Martin Luther King, Jr.
--- End Message ---