get portfiles from all sources

classic Classic list List threaded Threaded
7 messages Options
db
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

get portfiles from all sources

db
I don't seem to find a way to get all portfiles from sources listed in sources.conf. In my case:

file:///opt/local/myports
file:///opt/local/var/macports/sources/github.com/macports/macports-ports/ [default]
#rsync://rsync.macports.org/release/tarballs/ports.tar [default]

I thought this should have worked, but it doesn't.

port file all | grep port_name
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: get portfiles from all sources

Rainer Müller-4
On 2017-07-03 13:15, db wrote:
> I don't seem to find a way to get all portfiles from sources listed in sources.conf. In my case:
>
> file:///opt/local/myports
> file:///opt/local/var/macports/sources/github.com/macports/macports-ports/ [default]
> #rsync://rsync.macports.org/release/tarballs/ports.tar [default]
>
> I thought this should have worked, but it doesn't.
>
> port file all | grep port_name

You can only use the Portfile from the first ports tree providing a port
with that name. The idea is that ports trees listed first act as an
overlay for those below.

As a side note, you can always work with a Portfile in the current
working directory when running port commands. It does not even have to
be listed in sources.conf.

Rainer
db
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: get portfiles from all sources

db
On 3 Jul 2017, at 13:45, Rainer Müller <[hidden email]> wrote:
> You can only use the Portfile from the first ports tree providing a port with that name.

I though that `all` should get it from all trees, according to port's man page

The pseudo-portnames are:

       o   all: all the ports in each ports tree listed in sources.conf
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: get portfiles from all sources

Rainer Müller-4
On 2017-07-03 15:51, db wrote:
> On 3 Jul 2017, at 13:45, Rainer Müller <[hidden email]> wrote:
>> You can only use the Portfile from the first ports tree providing a port with that name.
>
> I though that `all` should get it from all trees, according to port's man page
>
> The pseudo-portnames are:
>
>        o   all: all the ports in each ports tree listed in sources.conf
>

Then this is a problem with the documentation. I am not sure how else
this could be expressed, but you will never see "duplicate ports" with
the same name.

Rainer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: get portfiles from all sources

Kenneth F. Cunningham
>
> Then this is a problem with the documentation. I am not sure how else
> this could be expressed, but you will never see "duplicate ports" with
> the same name.

As they said in "Independence Day" -- that may not be entirely true, Mr. President.

I have a local report /opt/myports, and in there have a port for PPC for libsdl2 I've been working on.

Look at this:

$ port search libsdl2
libsdl2 @2.0.3 (devel, multimedia)
    Cross-platform multi-media development API

libsdl2 @2.0.5_1 (devel, multimedia)
    Cross-platform multi-media development API

libsdl2_image @2.0.1 (devel, graphics)
    Add on library for libSDL handling several image formats

libsdl2_mixer @2.0.1 (audio, devel)
    Audio mixer library for SDL

libsdl2_net @2.0.1 (devel, net)
    cross-platform networking library

libsdl2_ttf @2.0.14 (devel, graphics)
    add on library for libSDL for rendering TrueType fonts

Found 6 ports.

$ port file libsdl2
/opt/myports/devel/libsdl2/Portfile


It's finding the correct one, but still is showing the one in the main repo when I look.
I updated the portindex in the local repo - same thing
If I disable the repo in sources.conf:

$ port search libsdl2
libsdl2 @2.0.5_1 (devel, multimedia)
    Cross-platform multi-media development API

libsdl2_image @2.0.1 (devel, graphics)
    Add on library for libSDL handling several image formats

libsdl2_mixer @2.0.1 (audio, devel)
    Audio mixer library for SDL

libsdl2_net @2.0.1 (devel, net)
    cross-platform networking library

libsdl2_ttf @2.0.14 (devel, graphics)
    add on library for libSDL for rendering TrueType fonts


$ port file libsdl2
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/libsdl2/Portfile


=======

go figure, eh?

Ken
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: get portfiles from all sources

Rainer Müller-4
On 2017-07-03 17:29, Ken Cunningham wrote:

> I have a local report /opt/myports, and in there have a port for PPC for libsdl2 I've been working on.
>
> Look at this:
>
> $ port search libsdl2
> libsdl2 @2.0.3 (devel, multimedia)
>     Cross-platform multi-media development API
>
> libsdl2 @2.0.5_1 (devel, multimedia)
>     Cross-platform multi-media development API

Hm, indeed. That happens when the ports have different versions.
Otherwise the list is made unique in the port client before printing
which effectively hides the problem.

I would consider this a bug in 'port search', as libsdl2 as a port
argument will always refer to the first one, so it does not make sense
to print additional results.

Could you please file a ticket in Trac for that?

Rainer
db
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: get portfiles from all sources

db
On 3 Jul 2017, at 18:02, Rainer Müller <[hidden email]> wrote:
> I would consider this a bug in 'port search', as libsdl2 as a port argument will always refer to the first one, so it does not make sense to print additional results.

Couldn't the pseudo-portname `all` do what the documentation says and port keep the first tree in sources.conf shadowing subsequent entries? Or must it be mutually exclusive?
Loading...