Bug#353486: [patch] apt-zip-0.13.5 improvements / maybe a 0.13.6 release

2006-03-06 Thread Eddy Petrişor
On 2/28/06, Eddy Petrişor [EMAIL PROTECTED] wrote:
  I think you should introduce the test only if fetch script
  should wait. And in this case we have already a numeric argument.
 

 Done, but i am not sure if the generated code is the correct one. (I
 just made the modifications and I can't test them.)

 Could you, please, test that the generated code is correct?


I managed to test it on MAC OS X with fink and found an interesting
thing: not all regex implmentation work well enough to write something
like: 'sed -e s/[, ]\+/ /g' so I changed this into sed -e s/[, ]/ /g
| tr -s ' '

I have also disabled (commented) the code that was supposed to
calculate the size of the block because the obtained info was not used
at all.

I added the missing shift commands in the parameter interpretation in common.sh
and added a TODO list for developemnt (this should be different than
ENHANCEMENTS)

The generated code looks good.


Please apply the attached patch over your apt-zip-0.13.6 variant.


--
Regards,
EddyP
=
Imagination is more important than knowledge A.Einstein
diff -ruN apt-zip-0.13.6/TODO apt-zip-0.13.6.real_sleep_fix/TODO
--- apt-zip-0.13.6/TODO	Thu Jan  1 02:00:00 1970
+++ apt-zip-0.13.6.real_sleep_fix/TODO	Mon Mar  6 09:43:56 2006
@@ -0,0 +1,10 @@
+Hey Emacs, this is -*- text -*- file.
+
+Open points that should be closed:
+- document in the man page the newly added options: -S/--use-sleep
+- document in the man page that apt-zip-list can now be ran as non-root
+- use a consistent indenting schema (take care that method scripts are
+  dealt differently and should have mixed indenting in order to have nicely
+  indeneted generated scripts)
+
+* -- File last reviewed: 2006/03/06
diff -ruN apt-zip-0.13.6/apt-zip-list apt-zip-0.13.6.real_sleep_fix/apt-zip-list
--- apt-zip-0.13.6/apt-zip-list	Sat Feb 18 18:16:12 2006
+++ apt-zip-0.13.6.real_sleep_fix/apt-zip-list	Mon Mar  6 09:37:00 2006
@@ -2,7 +2,8 @@
 
 exithook()
 {
-rm -f $TMP $TEMP $BSTMP
+#rm -f $TMP $TEMP $BSTMP
+rm -f $TMP $TEMP
 }
 
 SHAREDIR=$(cd $(dirname $0)  pwd)
@@ -18,15 +19,15 @@
 APTGETEXTRAOPTS=${APTGETEXTRAOPTS} -o Debug::NoLocking=true
 
 # Find block size on zip
-BSTMP=$(tempfile -d $MEDIUM -p aptzip)
-if [ $? != 0 ]
-then
-error Could not create temporary file
-fi
-
-echo bs test  $BSTMP
-BLOCKSIZE=$(du -b $BSTMP | cut -f1)
-rm $BSTMP
+#BSTMP=$(tempfile -d $MEDIUM -p aptzip)
+#if [ $? != 0 ]
+#then
+#error Could not create temporary file
+#fi
+
+#echo bs test  $BSTMP
+#BLOCKSIZE=$(du -b $BSTMP | cut -f1)
+#rm $BSTMP
 #echo 2 Block size = $BLOCKSIZE
 
 TMP=$(tempfile -p aptzip)
@@ -64,6 +65,10 @@
 #SIZE0=$(echo 'n' | apt-get ${APTGETEXTRAOPTS} dselect-upgrade | grep '^Need to get' | cut -d' ' -f4)
 
 #error Size0 = $SIZE0 - Size = $SIZE blocks = $[ $SIZE * $BLOCKSIZE ]
+
+#export the sleep command so it is visible in the method script
+export SLEEPTIME
+export SLEEPCMD=`eval $SLEEPEVALCMD`
 
 # Write the script
 SCRIPT=${MEDIUM}/fetch-script-$METHOD-$(uname -n)
diff -ruN apt-zip-0.13.6/common.sh apt-zip-0.13.6.real_sleep_fix/common.sh
--- apt-zip-0.13.6/common.sh	Tue Feb  7 01:50:50 2006
+++ apt-zip-0.13.6.real_sleep_fix/common.sh	Mon Mar  6 09:50:04 2006
@@ -54,6 +54,7 @@
  Overrides the name of the options file with the given FILENAME
  -f, --fix-brokenCall apt-get with this flag
  -s, --skip-mountDo not mount a device on the dir specified by --medium 
+ -S, --use-sleep=SEC Wait SEC seconds after each download
 EOF
 }
 
@@ -99,7 +100,7 @@
 }
 check_packages()
 {
-PACKAGES=$(echo $PACKAGES | sed -e s/[, ]\+/ /g)
+PACKAGES=$(echo $PACKAGES | sed -e s/[, ]/ /g | tr -s ' ')
 }
 check_aptgetaction()
 {
@@ -109,7 +110,9 @@
 }
 az_loadconf()
 {
-	SLEEPTIME=0
+# make sure that we will have a valid command for sleep
+SLEEPTIME=0
+SLEEPEVALCMD='true'
 [ -r $CONFFILE ]  . $CONFFILE
 METHOD=${METHOD-wget}
 MEDIUM=${MEDIUM-/ZIP}
@@ -162,12 +165,17 @@
 	shift
 	;;
 	--use-sleep=*)
-		SLEEPTIME=${1#--use-sleep=}
-		;;
-	--use-sleep)
+	SLEEPTIME=${1#--use-sleep=}
+	SLEEPEVALCMD='echo [ ! -z \`type sleep\` ]  sleep ${SLEEPTIME}'
+	shift
+	;;
+	--use-sleep|-S)
 	if [ $# -lt 2 ]; then syntax_error $1 needs an argument; fi
-		SLEEPTIME=$2
-		;;
+	SLEEPTIME=$2
+	SLEEPEVALCMD='echo [ ! -z \`type sleep\` ]  sleep ${SLEEPTIME}'
+	shift
+	shift
+	;;
 	--aptgetaction=*)
 	APTGETACTION=${1#--aptgetaction=}
 	shift
@@ -251,9 +259,9 @@
 # ensure known opts are set to 0 if not requested
 for kopt in $KNOWNOPTIONS
 do
-	eval export OPTION_${kopt}=0
+eval export OPTION_${kopt}=0
 done
-
+
 for opt in $OPTIONS
 do
 	# Warn if unknown option
@@ -297,7 +305,7 @@
 	WAS_MOUNTED=1
 	if mount | grep ${MEDIUM}.*[(,]ro[,)] /dev/null
 	then
-		error $MEDIUM is mounted READ ONLY
+	error $MEDIUM is mounted READ ONLY
 	fi
 	else
 	WAS_MOUNTED=0

Bug#353486: [patch] apt-zip-0.13.5 improvements / maybe a 0.13.6 release

2006-03-06 Thread Giacomo A. Catenazzi
Eddy Petrişor wrote:
 I managed to test it on MAC OS X with fink and found an interesting
 thing: not all regex implmentation work well enough to write something
 like: 'sed -e s/[, ]\+/ /g' so I changed this into sed -e s/[, ]/ /g
 | tr -s ' '

correct. + is an extended regex, and sed should not understand it
(but in extended mode -r)


 I have also disabled (commented) the code that was supposed to
 calculate the size of the block because the obtained info was not used
 at all.

 I added the missing shift commands in the parameter interpretation in 
 common.sh
 and added a TODO list for developemnt (this should be different than
 ENHANCEMENTS)

 The generated code looks good.


 Please apply the attached patch over your apt-zip-0.13.6 variant.

BTW I had already applied and upload your previous patch.
Now I reverted it and applied the new patch.

You patch format seems to have problems:
debian/changelog and not debian/Changelog
and some of (Stripping trailing CRs from patch.)
warning.

And I've uploaded apt-zip 0.13.7 with the new changes.

ciao
cate




 

 diff -ruN apt-zip-0.13.6/TODO apt-zip-0.13.6.real_sleep_fix/TODO
 --- apt-zip-0.13.6/TODO   Thu Jan  1 02:00:00 1970
 +++ apt-zip-0.13.6.real_sleep_fix/TODOMon Mar  6 09:43:56 2006
 @@ -0,0 +1,10 @@
 +Hey Emacs, this is -*- text -*- file.
 +
 +Open points that should be closed:
 +- document in the man page the newly added options: -S/--use-sleep
 +- document in the man page that apt-zip-list can now be ran as non-root
 +- use a consistent indenting schema (take care that method scripts are
 +  dealt differently and should have mixed indenting in order to have nicely
 +  indeneted generated scripts)
 +
 +* -- File last reviewed: 2006/03/06
 diff -ruN apt-zip-0.13.6/apt-zip-list 
 apt-zip-0.13.6.real_sleep_fix/apt-zip-list
 --- apt-zip-0.13.6/apt-zip-list   Sat Feb 18 18:16:12 2006
 +++ apt-zip-0.13.6.real_sleep_fix/apt-zip-listMon Mar  6 09:37:00 2006
 @@ -2,7 +2,8 @@

  exithook()
  {
 -rm -f $TMP $TEMP $BSTMP
 +#rm -f $TMP $TEMP $BSTMP
 +rm -f $TMP $TEMP
  }

  SHAREDIR=$(cd $(dirname $0)  pwd)
 @@ -18,15 +19,15 @@
  APTGETEXTRAOPTS=${APTGETEXTRAOPTS} -o Debug::NoLocking=true

  # Find block size on zip
 -BSTMP=$(tempfile -d $MEDIUM -p aptzip)
 -if [ $? != 0 ]
 -then
 -error Could not create temporary file
 -fi
 -
 -echo bs test  $BSTMP
 -BLOCKSIZE=$(du -b $BSTMP | cut -f1)
 -rm $BSTMP
 +#BSTMP=$(tempfile -d $MEDIUM -p aptzip)
 +#if [ $? != 0 ]
 +#then
 +#error Could not create temporary file
 +#fi
 +
 +#echo bs test  $BSTMP
 +#BLOCKSIZE=$(du -b $BSTMP | cut -f1)
 +#rm $BSTMP
  #echo 2 Block size = $BLOCKSIZE

  TMP=$(tempfile -p aptzip)
 @@ -64,6 +65,10 @@
  #SIZE0=$(echo 'n' | apt-get ${APTGETEXTRAOPTS} dselect-upgrade | grep '^Need 
 to get' | cut -d' ' -f4)

  #error Size0 = $SIZE0 - Size = $SIZE blocks = $[ $SIZE * $BLOCKSIZE ]
 +
 +#export the sleep command so it is visible in the method script
 +export SLEEPTIME
 +export SLEEPCMD=`eval $SLEEPEVALCMD`

  # Write the script
  SCRIPT=${MEDIUM}/fetch-script-$METHOD-$(uname -n)
 diff -ruN apt-zip-0.13.6/common.sh apt-zip-0.13.6.real_sleep_fix/common.sh
 --- apt-zip-0.13.6/common.sh  Tue Feb  7 01:50:50 2006
 +++ apt-zip-0.13.6.real_sleep_fix/common.sh   Mon Mar  6 09:50:04 2006
 @@ -54,6 +54,7 @@
   Overrides the name of the options file with the given FILENAME
   -f, --fix-brokenCall apt-get with this flag
   -s, --skip-mountDo not mount a device on the dir specified by --medium
 + -S, --use-sleep=SEC Wait SEC seconds after each download
  EOF
  }

 @@ -99,7 +100,7 @@
  }
  check_packages()
  {
 -PACKAGES=$(echo $PACKAGES | sed -e s/[, ]\+/ /g)
 +PACKAGES=$(echo $PACKAGES | sed -e s/[, ]/ /g | tr -s ' ')
  }
  check_aptgetaction()
  {
 @@ -109,7 +110,9 @@
  }
  az_loadconf()
  {
 - SLEEPTIME=0
 +# make sure that we will have a valid command for sleep
 +SLEEPTIME=0
 +SLEEPEVALCMD='true'
  [ -r $CONFFILE ]  . $CONFFILE
  METHOD=${METHOD-wget}
  MEDIUM=${MEDIUM-/ZIP}
 @@ -162,12 +165,17 @@
   shift
   ;;
   --use-sleep=*)
 - SLEEPTIME=${1#--use-sleep=}
 - ;;
 - --use-sleep)
 + SLEEPTIME=${1#--use-sleep=}
 + SLEEPEVALCMD='echo [ ! -z \`type sleep\` ]  sleep 
 ${SLEEPTIME}'
 + shift
 + ;;
 + --use-sleep|-S)
   if [ $# -lt 2 ]; then syntax_error $1 needs an argument; fi
 - SLEEPTIME=$2
 - ;;
 + SLEEPTIME=$2
 + SLEEPEVALCMD='echo [ ! -z \`type sleep\` ]  sleep 
 ${SLEEPTIME}'
 + shift
 + shift
 + ;;
   --aptgetaction=*)
   APTGETACTION=${1#--aptgetaction=}
   shift
 @@ -251,9 +259,9 @@
  # ensure known opts are set to 0 if not requested
  for kopt in $KNOWNOPTIONS
  do
 - eval export OPTION_${kopt}=0
 +eval export 

Bug#353486: [patch] apt-zip-0.13.5 improvements / maybe a 0.13.6 release

2006-02-28 Thread Eddy Petrişor
On 2/27/06, Giacomo A. Catenazzi [EMAIL PROTECTED] wrote:
  I was refering to this:
 
  give in my debian machine:
  do_wget()
   { wget -t3 -nv -O $2 $1
   [ ! -z sleep is /bin/sleep ]  sleep 
  return $?
 
  the 'sleep ' should be sleep SOMETHING-NUMERIC
 
  or was this the consequence of running from the console?

 I think you should introduce the test only if fetch script
 should wait. And in this case we have already a numeric argument.


Done, but i am not sure if the generated code is the correct one. (I
just made the modifications and I can't test them.)

Could you, please, test that the generated code is correct?

I prefered to use 'true' when the sleep command should not be ran
because this would allow us to safely write lines like:

command_A || ${SLEEPCMD} || command_B



[ After an idea poped in my head ]

Hmm, I realised that I should isolate the commands (success format):
SLEEPCMD='[ ! -z \`type sleep\` ]  sleep ${SLEEPTIME}'
should be somethig like:
SLEEPCMD='( [ ! -z \`type sleep\` ]  sleep ${SLEEPTIME})'

because the command above would expand to:
command_A || [ ! -z \`type sleep\` ]  sleep ${SLEEPTIME} || command_B

which changes the meaning of the last part of the command (but
that is a corner case and we don't use it currently anywhere in this
form).

--
Regards,
EddyP
=
Imagination is more important than knowledge A.Einstein


apt-zip-0.13.6.sleep_fix.diff
Description: Binary data


Bug#353486: [patch] apt-zip-0.13.5 improvements / maybe a 0.13.6 release

2006-02-27 Thread Giacomo A. Catenazzi
Eddy Petrişor wrote:
an other maybe better version

at the beginning (only on home computer)
if [ ${SLEEPTIME} ] ; then
SLEEPCMD=sleep ${SLEEPTIME} || true


 I don't understand the reason behind the part with || true

 This should do:
 SLEEPCMD=type sleep  sleep ${SLEEPTIME}

I usually put || true because I use a lot of -e shell script.
But I agree, in this (the nested) script is not necessary.


 Yes, but is a lot uncleaner than testing for the existance of the
 cammand, then running it if it does exist.

But it is the standard way. (IIRC).
The shell (aka the system library) should return 127 if command
doesn'exists.

Opps. I think the right command should be:
SLEEPCMD=sleep ${SLEEPTIME}


 The only thing that I don't like about the solution with:

 type command  command

 is that it will generate noise on the console, that's why I prefer:

 [ ! -z \`type command\` ]  command


type is not a POSIX/SuS command, so I think it is better to avoid it.
[ http://www.unix.org/single_unix_specification/ ]
On a system without type (if such system exists) will not
execute sleep.
Anyway this is not a big issue, because this sleep function is not an
inportant option, and I think it is resonable to require sane
implementation to use this extra feature.
So I would apply any your solution that works on normal case.

ciao
cate



Bug#353486: [patch] apt-zip-0.13.5 improvements / maybe a 0.13.6 release

2006-02-27 Thread Eddy Petrişor
On 2/27/06, Giacomo A. Catenazzi [EMAIL PROTECTED] wrote:
 Eddy Petrişor wrote:
 an other maybe better version
 
 at the beginning (only on home computer)
 if [ ${SLEEPTIME} ] ; then
 SLEEPCMD=sleep ${SLEEPTIME} || true
 
 
  I don't understand the reason behind the part with || true
 
  This should do:
  SLEEPCMD=type sleep  sleep ${SLEEPTIME}

 I usually put || true because I use a lot of -e shell script.
 But I agree, in this (the nested) script is not necessary.


  Yes, but is a lot uncleaner than testing for the existance of the
  cammand, then running it if it does exist.

 But it is the standard way. (IIRC).
 The shell (aka the system library) should return 127 if command
 doesn'exists.

 Opps. I think the right command should be:
 SLEEPCMD=sleep ${SLEEPTIME}

Note: I din't understood what has changed, but the test for the
existance of sleep should not miss as it would break the whole
download script instead of gracefully failing ;-)

  The only thing that I don't like about the solution with:
 
  type command  command
 
  is that it will generate noise on the console, that's why I prefer:
 
  [ ! -z \`type command\` ]  command

just tested this, and looks ok:

$ cat aaa.sh
cat -EOF
 [ ! -z \`type sleep\` ]  sleep 1
EOF

[EMAIL PROTECTED] ~
$ sh aaa.sh  script

[EMAIL PROTECTED] ~
$ cat script
 [ ! -z `type sleep` ]  sleep 1

[EMAIL PROTECTED] ~
$ sh script

(here there is a sleep)

I guess this is ok and has no noise.

 type is not a POSIX/SuS command, so I think it is better to avoid it.
 [ http://www.unix.org/single_unix_specification/ ]
 On a system without type (if such system exists) will not
 execute sleep.
 Anyway this is not a big issue, because this sleep function is not an
 inportant option, and I think it is resonable to require sane
 implementation to use this extra feature.

type is present in the specification (not sure if this implies that is
POSIX) - see Utilities in ShelUtilities.

 So I would apply any your solution that works on normal case.
Only the sleep period issue should be fixed first.
Have you made any changes from the zip you send previously?

--
Regards,
EddyP
=
Imagination is more important than knowledge A.Einstein


Bug#353486: [patch] apt-zip-0.13.5 improvements / maybe a 0.13.6 release

2006-02-27 Thread Giacomo A. Catenazzi

Eddy Petrişor wrote:

On 2/27/06, Giacomo A. Catenazzi [EMAIL PROTECTED] wrote:

Eddy Petrişor wrote:

an other maybe better version

at the beginning (only on home computer)
if [ ${SLEEPTIME} ] ; then
   SLEEPCMD=sleep ${SLEEPTIME} || true


I don't understand the reason behind the part with || true

This should do:
SLEEPCMD=type sleep  sleep ${SLEEPTIME}

I usually put || true because I use a lot of -e shell script.
But I agree, in this (the nested) script is not necessary.



Yes, but is a lot uncleaner than testing for the existance of the
cammand, then running it if it does exist.

But it is the standard way. (IIRC).
The shell (aka the system library) should return 127 if command
doesn'exists.

Opps. I think the right command should be:
SLEEPCMD=sleep ${SLEEPTIME}


Note: I din't understood what has changed, but the test for the
existance of sleep should not miss as it would break the whole
download script instead of gracefully failing ;-)


I don't understand.
It would write an error message every at sleep message
(OK, not the right thing to do).
So I think a test at the beginning of the (nested) script
would be better. And the eventually (but single) error message
is correct, so that user see that it want to use sleep (via option),
but sleep doesn't exits.


I guess this is ok and has no noise.

type is not a POSIX/SuS command, so I think it is better to avoid it.
[ http://www.unix.org/single_unix_specification/ ]
On a system without type (if such system exists) will not
execute sleep.
Anyway this is not a big issue, because this sleep function is not an
inportant option, and I think it is resonable to require sane
implementation to use this extra feature.


type is present in the specification (not sure if this implies that is
POSIX) - see Utilities in ShelUtilities.


oops. I didn't see it.




So I would apply any your solution that works on normal case.

Only the sleep period issue should be fixed first.
Have you made any changes from the zip you send previously?


No, no further changes.


ciao
cate


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#353486: [patch] apt-zip-0.13.5 improvements / maybe a 0.13.6 release

2006-02-27 Thread Eddy Petrişor
On 2/27/06, Giacomo A. Catenazzi [EMAIL PROTECTED] wrote:
  Note: I din't understood what has changed, but the test for the
  existance of sleep should not miss as it would break the whole
  download script instead of gracefully failing ;-)

 I don't understand.
 It would write an error message every at sleep message
 (OK, not the right thing to do).
 So I think a test at the beginning of the (nested) script
 would be better. And the eventually (but single) error message
 is correct, so that user see that it want to use sleep (via option),
 but sleep doesn't exits.

Ok, now is clear; I was pointing out that there should be a test.

  type is present in the specification (not sure if this implies that is
  POSIX) - see Utilities in ShelUtilities.

 oops. I didn't see it.

 
  So I would apply any your solution that works on normal case.
  Only the sleep period issue should be fixed first.
  Have you made any changes from the zip you send previously?

 No, no further changes.

Would you like to make the changes for the sleep period to be always
defined? I will have access to the code only this evening, so the
patch would be available only tomorrow.

BTW: do you have some tests frame you run for apt-zip? It would be
nice to have that.

And another thing, do you have a svn/dracs/arch/... repository where
you keep the apt-zip source? I have my own copy in my own SVN repo,
but it would be nice to have a common one, I guess. (WIth some luck I
will have it public sometime during the next week, depending on the
seriosity of my ISP and the time I will have). Or we could use alioth?

--
Regards,
EddyP
=
Imagination is more important than knowledge A.Einstein



Bug#353486: [patch] apt-zip-0.13.5 improvements / maybe a 0.13.6 release

2006-02-27 Thread Giacomo A. Catenazzi

Eddy Petrişor wrote:

Would you like to make the changes for the sleep period to be always
defined? I will have access to the code only this evening, so the
patch would be available only tomorrow.


What do you mean? On normal usage, the fetch script should not
sleep. And the other issues are only implementation details.



BTW: do you have some tests frame you run for apt-zip? It would be
nice to have that.


No. I should do some test script, but I don't know how
to do in an automatic way.
Usually i test the main functionality in my machine
(it will simulate the two machine (local and remote).
My /bin/sh is dash (the login shell is bash anyway),
so I detect most invalid/non portable shell costructs.

On big changes on fetch script, I test it also on a
remote solaris machine.




And another thing, do you have a svn/dracs/arch/... repository where
you keep the apt-zip source? I have my own copy in my own SVN repo,
but it would be nice to have a common one, I guess. (WIth some luck I
will have it public sometime during the next week, depending on the
seriosity of my ISP and the time I will have). Or we could use alioth?


I will set up an alioth project.

ciao
cate



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#353486: [patch] apt-zip-0.13.5 improvements / maybe a 0.13.6 release

2006-02-27 Thread Eddy Petrişor
On 2/27/06, Giacomo A. Catenazzi [EMAIL PROTECTED] wrote:
 Eddy Petrişor wrote:
  Would you like to make the changes for the sleep period to be always
  defined? I will have access to the code only this evening, so the
  patch would be available only tomorrow.

 What do you mean? On normal usage, the fetch script should not
 sleep. And the other issues are only implementation details.

Yes...

I was refering to this:

 give in my debian machine:
 do_wget()
  { wget -t3 -nv -O $2 $1
  [ ! -z sleep is /bin/sleep ]  sleep 
 return $?

the 'sleep ' should be sleep SOMETHING-NUMERIC

or was this the consequence of running from the console?

  BTW: do you have some tests frame you run for apt-zip? It would be
  nice to have that.

 No. I should do some test script, but I don't know how
 to do in an automatic way.

I would place this in the TODO file (newly available, as the old
contents was moved to ENHANCEMENTS ;-)

 Usually i test the main functionality in my machine
 (it will simulate the two machine (local and remote).
 My /bin/sh is dash (the login shell is bash anyway),
 so I detect most invalid/non portable shell costructs.

 On big changes on fetch script, I test it also on a
 remote solaris machine.


Oh, ok; I could set up a cygwin system here to make more tests...

 
  And another thing, do you have a svn/dracs/arch/... repository where
  you keep the apt-zip source? I have my own copy in my own SVN repo,
  but it would be nice to have a common one, I guess. (WIth some luck I
  will have it public sometime during the next week, depending on the
  seriosity of my ISP and the time I will have). Or we could use alioth?

 I will set up an alioth project.


Please also make a request for a SVN repository and add eddyp-guest to
the project.

[Me is looking on alioth to see alioth.debian.org/pkg-apt-zip]

--
Regards,
EddyP
=
Imagination is more important than knowledge A.Einstein


Bug#353486: [patch] apt-zip-0.13.5 improvements / maybe a 0.13.6 release

2006-02-27 Thread Giacomo A. Catenazzi

Eddy Petrişor wrote:

On 2/27/06, Giacomo A. Catenazzi [EMAIL PROTECTED] wrote:

Eddy Petrişor wrote:

Would you like to make the changes for the sleep period to be always
defined? I will have access to the code only this evening, so the
patch would be available only tomorrow.

What do you mean? On normal usage, the fetch script should not
sleep. And the other issues are only implementation details.


Yes...

I was refering to this:


give in my debian machine:
do_wget()
 { wget -t3 -nv -O $2 $1
 [ ! -z sleep is /bin/sleep ]  sleep 
return $?


the 'sleep ' should be sleep SOMETHING-NUMERIC

or was this the consequence of running from the console?


I think you should introduce the test only if fetch script
should wait. And in this case we have already a numeric argument.

ciao
cate


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#353486: [patch] apt-zip-0.13.5 improvements / maybe a 0.13.6 release

2006-02-26 Thread Eddy Petrişor
 an other maybe better version

 at the beginning (only on home computer)
 if [ ${SLEEPTIME} ] ; then
 SLEEPCMD=sleep ${SLEEPTIME} || true

I don't understand the reason behind the part with || true

This should do:
SLEEPCMD=type sleep  sleep ${SLEEPTIME}

 else
 SLEEPCMD=# don't sleep
 fi

 and in the scripts you use
 $SLEEPCMD

 It should work also if sleep doesn't exist.

Yes, but is a lot uncleaner than testing for the existance of the
cammand, then running it if it does exist.


The only thing that I don't like about the solution with:

type command  command

is that it will generate noise on the console, that's why I prefer:

[ ! -z \`type command\` ]  command

--
Regards,
EddyP
=
Imagination is more important than knowledge A.Einstein



Bug#353486: [patch] apt-zip-0.13.5 improvements / maybe a 0.13.6 release

2006-02-18 Thread Eddy Petrişor
Package: apt-zip
Severity: wishlist
Tags: patch

Hello Giacomo,

I have worked a little on the apt-zip package trying to close a few
bugs ad making improvemnts.

I have attached a current (my version) modified version of apt-zip
(full source) and a patch that should provide the same thing starting
from 0.13.5's source.

Please review it and make a newer release of apt-zip.

Note: there are some bugs which state more than one issue, so although
I have treated one or some other issue, the whole bug was not closed.

--
Regards,
EddyP
=
Imagination is more important than knowledge A.Einstein


apt-zip-0.13.5+200602181935.diff.gz
Description: GNU Zip compressed data


apt-zip-0.13.5+200602181935.tar.gz
Description: GNU Zip compressed data