Skip to content

Use "purge-job" instead of "purge-jobs" when canceling a single job#742

Merged
zdohnal merged 3 commits intoOpenPrinting:masterfrom
bmasonrh:fix-cancel
Jun 27, 2023
Merged

Use "purge-job" instead of "purge-jobs" when canceling a single job#742
zdohnal merged 3 commits intoOpenPrinting:masterfrom
bmasonrh:fix-cancel

Conversation

@bmasonrh
Copy link
Contributor

The command "cancel -x " adds "purge-jobs true" to the Cancel-Job operation; however, the correct attribute to use for Cancel-job is "purge-job" (singular), not "purge-jobs" (plural). As a result, job files are not removed from /var/spool/cups when "cancel -x " is executed.

The command "cancel -x <job>" adds "purge-jobs true" to the Cancel-Job
operation; however, the correct attribute to use for Cancel-job is
"purge-job" (singular), not "purge-jobs" (plural).  As a result, job
files are not removed from /var/spool/cups when "cancel -x <job>" is
executed.

This patch resolves the issue by adding "purge-job" when the IPP
operation is Cancel-Job and "purge-jobs" for other IPP operations
(Purge-Jobs, Cancel-Jobs, and Cancel-My-Jobs)
@zdohnal
Copy link
Member

zdohnal commented Jun 26, 2023

@michaelrsweet would you mind looking into it? Only reference I found about purge-jobs/purge-job is that Purge Jobs operation is deprecated http://ftp.pwg.org/pub/pwg/standards/std-ipp20-20151030-5100.12.pdf .

Bryan sent me a link to old pwg email conversation https://www.pwg.org/archives/ipp/2009/016226.html which mentions the attributes, but it looks it is not mention in IPP 2.0+ standard.

@zdohnal zdohnal requested a review from michaelrsweet June 26, 2023 15:36
@michaelrsweet
Copy link
Member

@zdohnal The "purge-job" attribute is a CUPS extension and has never been standardized. Given that it removes job history, the PWG is not interested in standardizing it (thus the deprecation of Purge-Jobs).

Copy link
Member

@michaelrsweet michaelrsweet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor coding style issue, otherwise LGTM.

@michaelrsweet michaelrsweet added bug Something isn't working priority-medium labels Jun 26, 2023
@michaelrsweet michaelrsweet added this to the v2.4.x milestone Jun 26, 2023
@michaelrsweet michaelrsweet self-assigned this Jun 26, 2023
@zdohnal zdohnal merged commit c5ad7aa into OpenPrinting:master Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority-medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants