Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

cancel -a not working per documentation #4513

Closed

Description

@michaelrsweet

Version: 1.7.2
CUPS.org User: nminkler

OS: Ubuntu Trusty Tahr 14.04
Cups: 1.7.2-0ubuntu1.2

Attempted to cancel all print jobs on the system using cancel -a and lprm -

Expected: all print jobs are removed.

What happened:
No print jobs were removed from the system.

Workaround:
I was only able to get the print jobs removed by specifying cancel -a or lprm

The man page documentation states that cancel -a without a destination
will remove all print jobs on the system but this is not the case, same for lprm -

Setup Info:
Destination name: lp
Setup to a printer that does not pysically exist and is not plugged in on the specified port.

Activity

  1. michaelrsweet commented on Oct 30, 2014

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

    Please re-test with CUPS 2.0 and let me know if the problem persists for you.

    Also, make sure the PRINTER and LPDEST environment variables are not set to "lp"...

  2. michaelrsweet commented on Oct 30, 2014

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: nminkler

    I'm not able to retest with cups 2.0 as it's not available as part of the Trusty packages. I was told to report this issue here from launchpad. LPDEST and PRINTER are not set during this test.

  3. michaelrsweet commented on Nov 12, 2014

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

    Fixed in Subversion repository.

    FWIW, "lprm -" only cancels jobs on the default destination.

  4. michaelrsweet commented on Nov 12, 2014

    @michaelrsweet
    ContributorAuthor

    "str4513.patch":

    Index: systemv/cancel.c

    --- systemv/cancel.c (revision 12243)
    +++ systemv/cancel.c (working copy)
    @@ -315,7 +315,7 @@
    ippDelete(response);
    }

    • if (num_dests == 0 && op == IPP_PURGE_JOBS)
    • if (num_dests == 0 && op != IPP_CANCEL_JOB)
      {
      /*
    • Open a connection to the server...
      Index: test/run-stp-tests.sh

      --- test/run-stp-tests.sh (revision 12243)
      +++ test/run-stp-tests.sh (working copy)
      @@ -875,7 +875,7 @@

    Requests logged

    count=wc -l $BASE/log/access_log | awk '{print $1}'
    -expected=expr 37 + 18 + 28 + $pjobs \* 8 + $pprinters \* $pjobs \* 4
    +expected=expr 37 + 18 + 29 + $pjobs \* 8 + $pprinters \* $pjobs \* 4
    if test $count != $expected; then
    echo "FAIL: $count requests logged, expected $expected."
    echo "

    FAIL: $count requests logged, expected $expected.

    " >>$strfile

  5. michaelrsweet commented on Nov 12, 2014

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: nminkler

    Thanks Michael. The issue with lprm is more of a documentation issue then. The docs only state that: "If no arguments are specified the current job on the default destination is cancelled. You can specify one or more job ID numbers to cancel those jobs or use the - option to cancel all jobs"

    I thought this simply meant that when '-' was specified it was an argument so it would cancel all jobs on the system. As the only time the first statement is accurat is when no arguments are supplied to the program. A better wording may be to say 'When no destination is specified, jobs are removed from the default printer.'

    Thanks!

  6. added this to the Stable milestone on Mar 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions