ocaml-opam / opam-depext

Attempt to automate the installation of system packages required by OPAM packages
Other
33 stars 28 forks source link

Quoted OCaml package names causes the string "No packages found." to be passed to apt-get #100

Closed kevin1 closed 4 years ago

kevin1 commented 6 years ago

Users can pass a list of packages to depext:

$ opam depext core utop

Putting this in quotes makes it fail in a strange way:

$ opam depext "core utop"
# Detecting depexts using flags: armv6l linux debian
# The following system packages are needed:
#  - No
#  - packages
#  - found.
The following command needs to be run through "sudo":
    apt-get install No packages found.
Allow ? [Y/n] 

If I say yes, depext will actually run $ apt-get install No packages found.

Admittedly, this is an edge case. I encountered it by accidentally writing opam depext "$my_package_list" (with quotes) in a shell script.

What's interesting is that simply passing a nonexistent package name gives different behavior:

$ opam depext foobar
# Detecting depexts using flags: armv6l linux debian
[ERROR] No package named foobar found.
[ERROR] No package named foobar found.
# No extra OS packages requirements found.
# All required OS packages found.
rjbou commented 4 years ago

External dependencies handling is integrated in opam (since 2.1.0-alpha). If this is still an issue, please open one in opam bugtracker. Thanks!