Opened 11 years ago

Last modified 11 years ago

#38381 new enhancement

RFE: pseudo-portnames `depof:` and `rdepof:` should be more granular

Reported by: cooljeanius (Eric Gallager) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 2.1.3
Keywords: Cc:
Port:

Description

What I mean is I want to be able to do something like port echo lib_depof:foo or port echo lib_rdepof:foo to get just the (recursive) library dependencies of port foo. This would be useful for my port-depcheck.sh script so I can have it not list build dependencies as unnecessary dependencies.

Change History (5)

comment:1 in reply to:  description Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to egall@…:

I want to be able to do something like port echo lib_depof:foo

There's already port deps --no-build foo which is a shortcut for port info --pretty --depends_lib --depends_run foo so you could customize the port info invocation further. But it would be nice to have it as a pseudo-port.

or port echo lib_rdepof:foo

That functionality would be good to have.

comment:2 Changed 11 years ago by jmroot (Joshua Root)

You probably want --line rather than --pretty if you're parsing the output.

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

port info prints full path-style dependencies when they're used, is there a way to get just the portnames when path-style dependencies are used? Preferably without too many pipes through cut and tr...

(currently I'm trying port info --line --depends_lib foo | tr \, \\n | cut -d: -f2)

comment:4 in reply to:  3 ; Changed 11 years ago by larryv (Lawrence Velázquez)

Replying to egall@…:

port info prints full path-style dependencies when they're used, is there a way to get just the portnames when path-style dependencies are used? Preferably without too many pipes through cut and tr...

(currently I'm trying port info --line --depends_lib foo | tr \, \\n | cut -d: -f2)

There are plenty of ways.

% port info --line --depends_build fish | tr ',' '\n' | awk -F ':' '{ print $NF; }'

comment:5 in reply to:  4 Changed 11 years ago by cooljeanius (Eric Gallager)

Replying to larryv@…:

Replying to egall@…:

port info prints full path-style dependencies when they're used, is there a way to get just the portnames when path-style dependencies are used? Preferably without too many pipes through cut and tr...

(currently I'm trying port info --line --depends_lib foo | tr \, \\n | cut -d: -f2)

There are plenty of ways.

% port info --line --depends_build fish | tr ',' '\n' | awk -F ':' '{ print $NF; }'

Thanks; I guess I'll use this for now, but it'd still be a lot easier if there were a pseudo-portname that I could use instead of having to know awk...

Note: See TracTickets for help on using tickets.