OCaml Forge
SCM

Detail: [#1374] csvtool call function is broken

Bugs: Browse | Download .csv | Monitor

[#1374] csvtool call function is broken

Date:
2014-02-14 00:44
Priority:
3
State:
Closed
Submitted by:
Iain Elder (iainelder)
Assigned to:
Christophe Troestler (chris)
Hardware:
None
Resolution:
Fixed
Severity:
normal
Version:
None
Component:
None
Operating System:
None
Product:
None
 
URL:
Summary:
csvtool call function is broken

Detailed description
The call function of csvtool seems to be broken. It doesn't behave like the manual says.

This bug was originally reported by zasran on the Ubuntu bug tracker.

https://bugs.launchpad.net/ubuntu/+source/ocaml-csv/+bug/1177172

"""
csvtool man page claims that csvtool call would call exported bash function if it was exported using export -f.

However it does not work (assumes function hello that just echos 'hello'):

# not exported yet
$ bash -c hello
bash: yo: command not found
$ export -f hello
# verify export worked
$ bash -c hello
hello
# now try to use csvtool as described in the man page
$ csvtool call hello /some/file
sh: 1: hello: not found
hello: terminated with exit code 127

Per manual page the above should work.
"""

Followup

Message
Date: 2014-02-17 23:11
Sender: Christophe Troestler

> When the fix is is OPAM, will csvtool automatically be in Ubuntu apt-get as well?

It will not. The ubuntu maintainer has to release a new package. However, if you are in a hurry, you may want to uninstall csv using aptitude, install opam (it should be available in ubuntu repositories) and install csv through it. See https://opam.ocaml.org/
Date: 2014-02-17 22:10
Sender: Iain Elder

Thanks for responding so quickly, Christophe.

When the fix is is OPAM, will csvtool automatically be in Ubuntu apt-get as well?

Or should I ask the Ubuntu package maintainer to package the fix?
Date: 2014-02-16 20:36
Sender: Christophe Troestler

This is because /bin/sh is no longer /bin/bash.

I commited a fix and released a tarball. It will soon be in OPAM too.

Attached Files:

Changes:

Field Old Value Date By
status_idOpen2014-02-16 20:38chris
close_dateNone2014-02-16 20:38chris
assigned_tonone2014-02-16 20:38chris
ResolutionNone2014-02-16 20:36chris