pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: print/a2ps from pkgsrc-2023Q1 broken.
On Wed, 12 Apr 2023, Thomas Klausner wrote:
> I've filed an upstream bug report and the next version will use
> getopts.
>
> https://savannah.gnu.org/bugs/?64035
I see you've updated pkgsrc-HEAD with this new version. I've updated
and built it.
Unfortunately, it doesn't work as it seems 'a2ps' and 'a2ps-lpr-wrapper'
are talking at cross purposes to each other.
A simple request:
$ a2ps -1 -s2 /etc/printcap
results in:
[/etc/printcap (plain): 2 pages on 1 sheet]
Usage: a2ps-lpr-wrapper [-d printer] FILE...
a2ps: received SIGPIPE
Adding a 'set -x' to '/usr/pkg/bin/a2ps-lpr-wrapper' shows:
+ printer=''
+ getopts 'd:' flag
+ shift 0
+ '[' 0 -eq 0 ']'
+ usage
+ basename /usr/pkg/bin/a2ps-lpr-wrapper
+ echo 'Usage: a2ps-lpr-wrapper [-d printer] FILE...' >&2
+ exit 1
So, it appears 'a2ps-lpr-wrapper' is expecting at least one filename,
which 'a2ps' fails to provide. Specifying a printer name does the
expected thing, but the 'getopts' loop consumes all positional parameters
and we're once-again left with '[' 0 -eq 0 ']' causing an error exit.
+ printer=''
+ getopts 'd:' flag
+ printer=hp4100mfp
+ getopts 'd:' flag
+ shift 2
+ '[' 0 -eq 0 ']'
+ usage
+ basename /usr/pkg/bin/a2ps-lpr-wrapper
+ echo 'Usage: a2ps-lpr-wrapper [-d printer] FILE...' >&2
+ exit 1
--
|/"\ John D. Baker, KN5UKS NetBSD Darwin/MacOS X
|\ / jdbaker[snail]consolidated[flyspeck]net OpenBSD FreeBSD
| X No HTML/proprietary data in email. BSD just sits there and works!
|/ \ GPGkeyID: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
Home |
Main Index |
Thread Index |
Old Index