[MacPorts] #48965: Add subport as a dependency
MacPorts
noreply at macports.org
Thu Sep 24 10:18:05 PDT 2015
#48965: Add subport as a dependency
--------------------------------+--------------------------------
Reporter: tiagofrepereira@… | Owner: macports-tickets@…
Type: defect | Status: closed
Priority: Normal | Milestone:
Component: ports | Version: 2.3.3
Resolution: invalid | Keywords:
Port: |
--------------------------------+--------------------------------
Changes (by ryandesign@…):
* cc: ryandesign@… (added)
* status: new => closed
* resolution: => invalid
Old description:
> Hi,
>
> I'm creating a Portfile which contains several subports.
>
> I would like to add these subports as a dependency of my main Portfile,
> but it seems not possible.
> When I try to install I have the following error.
>
> $$$
> ---> Dependencies to be installed: py-bob.blitz py-bob.core py-
> bob.io.base
> Error: The following dependencies were not installed: py-bob.blitz py-
> bob.core py-bob.io.base
> $$$$
>
> Those packages "py-bob.blitz py-bob.core py-bob.io.base" are my subports.
> The dependencies are defined in the line 64 of the attached file.
>
> Thank you very much in advance!!
New description:
Hi,
I'm creating a Portfile which contains several subports.
I would like to add these subports as a dependency of my main Portfile,
but it seems not possible.
When I try to install I have the following error.
{{{
---> Dependencies to be installed: py-bob.blitz py-bob.core py-
bob.io.base
Error: The following dependencies were not installed: py-bob.blitz py-
bob.core py-bob.io.base
}}}
Those packages "py-bob.blitz py-bob.core py-bob.io.base" are my subports.
The dependencies are defined in the line 64 of the attached file.
Thank you very much in advance!!
--
Comment:
In the Portfile you've written
{{{
depends_run \
port:py-bob.blitz \
port:py-bob.core \
port:py-bob.io.base
}}}
outside of any blocks or conditionals. That means it applies to all ports,
both the "main" port and all the subports. So, for example, you've asked
the subport py-bob.blitz to have a dependency on itself, which of course
can't work. If you only want the main port to have those dependencies, say
that:
{{{
if {${subport} eq ${name}} {
depends_run \
port:py-bob.blitz \
port:py-bob.core \
port:py-bob.io.base
}
}}}
But there are additional problems here. You're using the python portgroup,
whose purpose is to let you create one port (named py-''something'') and
it will create subports for you (named py26-''something'',
py27-''something'', py33-''something'', py34-''something'', etc.) based on
how you set `python.versions`. But then you're trying to create additional
py-''somethingelse'' subports as well. The python portgroup doesn't know
anything about these other subports you've created, and will not create
py26-''somethingelse'' etc. subports for you, so that won't work right.
Furthermore, these subports are all for different software, which have
their own version numbers, master_sites, distfiles and checksums. I think
you'll find things will work correctly if you create a separate portfile
for each software, and not try to put them all into the same portfile.
If you need further help developing portfiles, please write to the
macports-dev mailing list rather than filing tickets in the issue tracker.
--
Ticket URL: <https://trac.macports.org/ticket/48965#comment:1>
MacPorts <https://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list