Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#52928 closed defect (fixed)

`port info --line` produces multi-line output

Reported by: raimue (Rainer Müller) Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts 2.4.0
Component: base Version: 2.3.5
Keywords: Cc: neverpanic (Clemens Lang), mojca (Mojca Miklavec)
Port:

Description

The multi-valued maintainers released with 2.3.5 broke the output of port info --line, which can now produce multiple lines per port.

$ port info --line --maintainers nginx
Email: cal@macports.org
Email: mps@macports.org
Policy: openmaintainer

This should produce only a single line.

Change History (9)

comment:1 Changed 7 years ago by raimue (Rainer Müller)

Milestone: MacPorts 2.3.6

comment:2 Changed 7 years ago by raimue (Rainer Müller)

As a follow-up, this output does not look good either. It should be one line per field.

$ port info --name --version --maintainer nginx
version: 1.11.6
maintainer: Email: cal@macports.org
Email: mps@macports.org
Policy: openmaintainer
name: nginx

comment:3 Changed 7 years ago by neverpanic (Clemens Lang)

I noticed this while implementing this, but the output is equally broken for other fields that contain linebreaks, e.g.:

$ port info --name --version --long_description moreutils
version: 0.59
long_description: moreutils includes the following utilities:
- chronic: runs a command quietly unless it fails
[…]
- zrun: automatically uncompress arguments to command
name: moreutils
$ port info --line --long_description moreutils
moreutils includes the following utilities:
- chronic: runs a command quietly unless it fails
[…]
- zrun: automatically uncompress arguments to command

How should we deal with those?

comment:4 Changed 7 years ago by mojca (Mojca Miklavec)

Cc: mojca added

comment:5 Changed 7 years ago by raimue (Rainer Müller)

comment:6 Changed 7 years ago by raimue (Rainer Müller)

Resolution: fixed
Status: newclosed

In ba2002c/macports-base:

port info: Re-implement broken subfield separators

The subfield_sep variable was not used anymore after 30c27d5, replace it
with specific separators for the different output modes.

Closes: #52928

comment:7 Changed 7 years ago by raimue (Rainer Müller)

In 3f372a5/macports-base:

port info: Print subfield labels only for --pretty

See: #52928

comment:8 Changed 7 years ago by raimue (Rainer Müller)

In b75ba55/macports-base:

port info: Flatten long_description

See: #52928#comment:3

comment:9 Changed 7 years ago by jmroot (Joshua Root)

Milestone: MacPorts 2.3.6MacPorts 2.4.0

Ticket retargeted after milestone deleted

Note: See TracTickets for help on using tickets.