Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#20489 closed defect (fixed)

devel/caml-json-wheel installs file outside of destroot

Reported by: anil@… Owned by: nerdling (Jeremy L)
Priority: Normal Milestone:
Component: ports Version: 1.7.1
Keywords: Cc: ryandesign (Ryan Schmidt)
Port: caml-json-wheel


This small patch fixes it:

Index: Portfile
--- Portfile	(revision 54590)
+++ Portfile	(working copy)
@@ -26,6 +26,7 @@
 use_configure       no
+destroot.env-append BINDIR=${destroot}/${prefix}/bin
 post-patch {
     set ocaml_site_path [exec ocamlfind printconf destdir]

Change History (4)

comment:1 Changed 9 years ago by nerdling (Jeremy L)

Owner: changed from macports-tickets@… to snc@…
Port: caml-json-wheel added
Status: newassigned

comment:2 Changed 9 years ago by nerdling (Jeremy L)

Resolution: fixed
Status: assignedclosed

Committed in r54632.

comment:3 Changed 9 years ago by ryandesign (Ryan Schmidt)

Cc: ryandesign@… added

Jeremy, I corrected the log message from r54632. This wasn't an mtree violation; it was that the port installed a file directly into ${prefix}/bin, outside of ${destroot}.

Anil, a few notes:

  • Since this changes what files are registered to the port, you must increase the port's revision (if you are not already increasing the version)
  • There's no need to put a slash before ${prefix} because ${prefix} already begins with a slash
  • Using code I copied from my lisaem port, I added a pre-activate phase to remove the rogue file from ${prefix}/bin if it's there; otherwise, the user would get this message:
--->  Activating caml-json-wheel @1.0.6_1
Error: Target org.macports.activate returned: Image error: /opt/local/bin/jsoncat already exists and does not belong to a registered port.  Unable to activate port caml-json-wheel.
Error: Status 1 encountered during processing.

I committed these changes in r54686.

comment:4 Changed 9 years ago by anil@…

thanks for the tips, all noted.

Note: See TracTickets for help on using tickets.