Opened 5 years ago

Last modified 19 hours ago

#34619 new defect

prevent use of unknown subports

Reported by: ryandesign (Ryan Schmidt) Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts Future
Component: base Version: 2.1.1
Keywords: Cc: larryv (Lawrence Velázquez), cooljeanius (Eric Gallager), coke (Will Coleda), kurthindenburg (Kurt Hindenburg)
Port:

Description

It's possible to tell MacPorts to install a port with any arbitrary subport name, for example:

$ sudo port install zlib subport=foo
Password:
--->  Fetching distfiles for foo
--->  Verifying checksum(s) for foo
--->  Extracting foo
--->  Configuring foo
--->  Building foo
--->  Staging foo into destroot
--->  Installing foo @1.2.7_0
--->  Activating foo @1.2.7_0
Error: org.macports.activate for port foo returned: Image error: /opt/local/include/zconf.h is being used by the active zlib port.  Please deactivate this port first, or use 'port -f activate foo' to force the activation.
Please see the log file for port foo for details:
    /opt/local/var/macports/logs/_Users_rschmidt_macports_dports_archivers_zlib/foo/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port zlib failed

You could even impersonate one port with another:

$ sudo port install zlib subport=expat
--->  Fetching distfiles for expat
--->  Verifying checksum(s) for expat
--->  Extracting expat
--->  Configuring expat
--->  Building expat
--->  Staging expat into destroot
--->  Installing expat @1.2.7_0
--->  Deactivating expat @2.1.0_0
--->  Activating expat @1.2.7_0
Error: org.macports.activate for port expat returned: Image error: /opt/local/include/zconf.h is being used by the active zlib port.  Please deactivate this port first, or use 'port -f activate expat' to force the activation.
Please see the log file for port expat for details:
    /opt/local/var/macports/logs/_Users_rschmidt_macports_dports_archivers_zlib/expat/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port zlib failed

Obviously this only results in problems and MacPorts should prevent it. Expected result:

$ sudo port install zlib subport=foo
Error: port zlib does not have a subport foo

Change History (5)

comment:1 Changed 5 years ago by ryandesign (Ryan Schmidt)

  • Milestone set to MacPorts Future

comment:2 Changed 5 years ago by larryv (Lawrence Velázquez)

  • Cc larryv@… added

Cc Me!

comment:3 Changed 5 years ago by cooljeanius (Eric Gallager)

  • Cc egall@… added

Cc Me!

comment:4 Changed 2 years ago by coke (Will Coleda)

  • Cc will@… added

Cc Me!

comment:5 Changed 19 hours ago by kurthindenburg (Kurt Hindenburg)

  • Cc kurthindenburg added
Note: See TracTickets for help on using tickets.