two-letter short option -rs doesn't work

Bug #1093672 reported by Sergey Romanov
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dpkg-awk (Debian)
Fix Released
Unknown
dpkg-awk (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

dpkg-awk has a two-letter short option -rs to set record separator, but /usr/share/awk/getlong.awk only allows one-letter short options as arguments to dpkg-awk. The equivalent long option --rec_sep works as advertised.

 Attached diff enables two-letter short options for dpkg-awk.

Besides -rs/--rec_sep, there is an undocumented option -of/--outform that also benefits from the patch. However, this option is of little use as all it does is suppress the output of fields not specified explicitly on command line (usually when negating the output fields). I.e. if
dpkg-awk -- ^description
will show all the records from /var/lib/dpkg/status omitting package descriptions then
dpkg-awk -of=x -- ^description
will show only empty lines, one for each record from /var/lib/dpkg/status

Tags: bitesize patch
Revision history for this message
Sergey Romanov (sml-uni) wrote :
Sergey Romanov (sml-uni)
description: updated
Changed in dpkg-awk (Debian):
status: Unknown → New
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Enable two-letter short options" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dpkg-awk - 1.2+nmu1

---------------
dpkg-awk (1.2+nmu1) unstable; urgency=medium

  * Non-maintainer upload.
  * Mark the package as M-A: foreign. Closes: #842525.
  * Fix sorting (-s option). LP: #1093674. Closes: #556651.
  * Enable two-letter short option -rs. LP: #1093672. Closes: #586040.
  * Drop dependency on gawk. The only feature used by dpkg-awk beyond those
    required by POSIX is 'delete array'. This extension is supported by all
    awk variants currently in Debian. LP: #1092539.
  * Bump standards version.

 -- Matthias Klose <email address hidden> Wed, 15 Nov 2017 08:23:19 +0100

Changed in dpkg-awk (Ubuntu):
status: New → Fix Released
Changed in dpkg-awk (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.