Cal no longer prints month of a given year

Bug #693499 reported by Martin Owens
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bsdmainutils
Fix Released
Unknown
bsdmainutils (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: bsdmainutils

The command:

cal -m feb 2022

Used to print just the month feb in 2022, now it prints the entire 2022 year calendar.

Tags: patch
Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

Confirmed in 8.017 on Natty, does the correct (i.e. matches man page and expectation) behavior on a debian box with 6.1.10 ; not tried anything in between to see where it went.

Changed in bsdmainutils (Ubuntu):
status: New → Confirmed
Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

OK, this looks like an old bug.
It seems to stem from a change to the way the option parsing was done, it used to be that getopt didn't know that -m took a parameter and it was fixed up later, leaving the argc to be 2 (in the same way as if you hadn't said -m at all and specified a month + year).

This fix seems to do it, and I've tried a bunch of options. Note I also looked at the upstream FreeBSD code and that's changed a lot more and probably doesn't still have this problem.

Dave

Revision history for this message
Martin Owens (doctormo) wrote :

Thanks Dave, I can confirm your workaround too of using it without the -m flag.

Changed in bsdmainutils (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Low
tags: added: patch
Changed in bsdmainutils:
status: Unknown → Fix Released
Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

Seems to work in Oneiric (bsdmainutils 8.2.3)

Changed in bsdmainutils (Ubuntu):
status: Triaged → 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.