Re: Claiming a binary name used in Sarge but not in Etch.

2007-03-17 Thread Florent Rougon
Charles Plessy [EMAIL PROTECTED] wrote:

 #!/bin/sh
 echo -e AMAP is now available under /usr/bin/amap.\nThis wrapper 
 (/usr/bin/amap-align) will be removed in the future.
 exec /usr/bin/amap $@

'echo -e' is not specified by POSIX. If you want to use escapes such as
\n, you'd better use printf instead of echo.

 I am just wondering if the quotes around $@ are necessary...

Yes. The quotes are necessary so that arguments containing spaces aren't
mangled (yes, this is a weird syntax, but it's supposed to be used this
way).

-- 
Florent


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



Re: Claiming a binary name used in Sarge but not in Etch.

2007-03-17 Thread Charles Plessy
Le Sat, Mar 17, 2007 at 12:00:20PM +0100, Florent Rougon a écrit :
 Charles Plessy [EMAIL PROTECTED] wrote:
 
  #!/bin/sh
  echo -e AMAP is now available under /usr/bin/amap.\nThis wrapper 
  (/usr/bin/amap-align) will be removed in the future.
  exec /usr/bin/amap $@
 
 'echo -e' is not specified by POSIX. If you want to use escapes such as
 \n, you'd better use printf instead of echo.

Thanks a lot, I will use one echo per line.

-- 
Charles


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



Re: Claiming a binary name used in Sarge but not in Etch.

2007-03-17 Thread Emmanuel le Chevoir

Charles Plessy a écrit :

#!/bin/sh
echo -e AMAP is now available under /usr/bin/amap.\nThis wrapper 
(/usr/bin/amap-align) will be removed in the future.
exec /usr/bin/amap $@

I am just wondering if the quotes around $@ are necessary...



indeed, they are:

$ cat quotes.sh
#! /bin/sh

for i in $@; do echo $i; done
echo ---
for i in $@; do echo $i; done

$ sh quotes.sh 1 2 3
1
2
3
---
1 2 3
$


--
Emmanuel le Chevoir


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



Re: Claiming a binary name used in Sarge but not in Etch.

2007-03-17 Thread Charles Plessy
Le Sat, Mar 17, 2007 at 01:02:46PM -0400, Justin Pryzby a écrit :
 On Sat, Mar 17, 2007 at 08:12:47PM +0900, Charles Plessy wrote:
  Le Sat, Mar 17, 2007 at 12:00:20PM +0100, Florent Rougon a écrit :
   Charles Plessy [EMAIL PROTECTED] wrote:
   
#!/bin/sh
echo -e AMAP is now available under /usr/bin/amap.\nThis wrapper 
(/usr/bin/amap-align) will be removed in the future.
exec /usr/bin/amap $@
   
   'echo -e' is not specified by POSIX. If you want to use escapes such as
   \n, you'd better use printf instead of echo.
  
  Thanks a lot, I will use one echo per line.
 
 set -e
 
 {
   echo first line
   echo second line
 } 2

Oh, this is something I did not think about. But what is the set -e
doing?

Have a nice day,

-- 
Charles


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



Re: Claiming a binary name used in Sarge but not in Etch.

2007-03-17 Thread Roberto C . Sánchez
On Sun, Mar 18, 2007 at 09:50:16AM +0900, Charles Plessy wrote:
 
 Oh, this is something I did not think about. But what is the set -e
 doing?
 

   Every script you write should include set -e  at the top. This tells
   bash that it should exit the script if any statement returns a
   non-true return value. [0]

Regards,

-Roberto

[0] http://www.davidpashley.com/articles/writing-robust-shell-scripts.html

-- 
Roberto C. Sánchez
http://people.connexer.com/~roberto
http://www.connexer.com


signature.asc
Description: Digital signature


Re: Claiming a binary name used in Sarge but not in Etch.

2007-03-17 Thread Justin Pryzby
On Sun, Mar 18, 2007 at 09:50:16AM +0900, Charles Plessy wrote:
 Le Sat, Mar 17, 2007 at 01:02:46PM -0400, Justin Pryzby a écrit :
  On Sat, Mar 17, 2007 at 08:12:47PM +0900, Charles Plessy wrote:
   Le Sat, Mar 17, 2007 at 12:00:20PM +0100, Florent Rougon a écrit :
Charles Plessy [EMAIL PROTECTED] wrote:

 #!/bin/sh
 echo -e AMAP is now available under /usr/bin/amap.\nThis wrapper 
 (/usr/bin/amap-align) will be removed in the future.
 exec /usr/bin/amap $@

'echo -e' is not specified by POSIX. If you want to use escapes such as
\n, you'd better use printf instead of echo.
   
   Thanks a lot, I will use one echo per line.
  
  set -e
  
  {
  echo first line
  echo second line
  } 2
 
 Oh, this is something I did not think about. But what is the set -e
 doing?
It's essentially required for all scripts to be able to detect errors.

Justin


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



Re: Claiming a binary name used in Sarge but not in Etch.

2007-03-16 Thread Charles Plessy
Le Sat, Mar 10, 2007 at 09:09:23AM -0500, Justin Pryzby a écrit :

 A NEWS entry isn't unreasonable.  Supporting the old binary might be
 nice; a wrapper with a warning rather than a symlink is extra friendly.
 Be sure to use exec as the last line of a wrapper script to remove
 unnecessary memory footprint.

Hi,

something like this ?

#!/bin/sh
echo -e AMAP is now available under /usr/bin/amap.\nThis wrapper 
(/usr/bin/amap-align) will be removed in the future.
exec /usr/bin/amap $@

I am just wondering if the quotes around $@ are necessary...

Have a nice day,

-- 
Charles Plessy
http://charles.plessy.org
Wako, Saitama, Japan


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



Re: Claiming a binary name used in Sarge but not in Etch.

2007-03-10 Thread Justin Pryzby
On Sat, Mar 10, 2007 at 12:32:29PM +0900, Charles Plessy wrote:
 Dear mentors,
 
 When I created the package amap-align (bioinformatics), there was a
 already a program called amap in Debian. Therefore, I renamed the
 binary program of my package. However, the old amap package has been
 removed from Etch, so I would like to know if it is possible to provide
 our users the bioinformatical program amap under its real name, and
 not amap-align as it is the case for the moment.
Also removed from unstable: RoM; non-free.  So it seems unlikely to
return (that's important).

http://ftp-master.debian.org / removals

 What is the policy of Debian for pacakges which are not released
 anymore? Can I Conflict:amap with my package amap-align, and request the
 upgraded package to be hinted in Etch ? Importantly, there is little
 overlap between the field of usage of amap and amap-align, so I think
 that the conflict is unikely to happen in real life. (can popcon be
 mined for this kind of data ?).
The popcon interface can't, but if you mail the popcon group, they might
be willing to check for hosts with both installed, and of those with
recent access times.

 Also, I think that I should inform users that the name has changed, can
 I use NEWS for this ? Lastly, do I have to support the old
 /usr/bin/amap-align for some moment, as it was never released in a
 stable distribution ? For instance, I can provide a wrapper which issues
 a warning.
 
 http://packages.qa.debian.org/a/amap.html
 http://packages.qa.debian.org/a/amap-align.html
A NEWS entry isn't unreasonable.  Supporting the old binary might be
nice; a wrapper with a warning rather than a symlink is extra friendly.
Be sure to use exec as the last line of a wrapper script to remove
unnecessary memory footprint.

Cheers
Justin


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



Claiming a binary name used in Sarge but not in Etch.

2007-03-09 Thread Charles Plessy
Dear mentors,

When I created the package amap-align (bioinformatics), there was a
already a program called amap in Debian. Therefore, I renamed the
binary program of my package. However, the old amap package has been
removed from Etch, so I would like to know if it is possible to provide
our users the bioinformatical program amap under its real name, and
not amap-align as it is the case for the moment.

What is the policy of Debian for pacakges which are not released
anymore? Can I Conflict:amap with my package amap-align, and request the
upgraded package to be hinted in Etch ? Importantly, there is little
overlap between the field of usage of amap and amap-align, so I think
that the conflict is unikely to happen in real life. (can popcon be
mined for this kind of data ?).

Also, I think that I should inform users that the name has changed, can
I use NEWS for this ? Lastly, do I have to support the old
/usr/bin/amap-align for some moment, as it was never released in a
stable distribution ? For instance, I can provide a wrapper which issues
a warning.

http://packages.qa.debian.org/a/amap.html
http://packages.qa.debian.org/a/amap-align.html

Thank a lot for your comments, and have a nice week-end,

-- 
Charles Plessy
http://charles.plessy.org
Wako, Saitama, Japan


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