[MacPorts] #34619: prevent use of unknown subports
MacPorts
noreply at macports.org
Fri May 25 01:58:19 PDT 2012
#34619: prevent use of unknown subports
-------------------------------------+--------------------------------------
Reporter: ryandesign@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: base | Version: 2.1.1
Keywords: | Port:
-------------------------------------+--------------------------------------
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
}}}
--
Ticket URL: <https://trac.macports.org/ticket/34619>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list