Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 565823

Summary: cups scheduler do not save classes when deleting a printer
Product: Red Hat Enterprise Linux 5 Reporter: Olivier Fourdan <ofourdan>
Component: cupsAssignee: Tim Waugh <twaugh>
Status: CLOSED ERRATA QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: medium    
Version: 5.4CC: azelinka, kem, pknirsch, tao, ykopkova
Target Milestone: rcKeywords: Patch, ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: cups-1.3.7-20.el5 Doc Type: Bug Fix
Doc Text:
When the class members were changed, /etc/cups/classes.conf was not always updated accordingly. This issue has been resolved, and the configuration file is now always updated as expected.
Story Points: ---
Clone Of:
: 565878 (view as bug list) Environment:
Last Closed: 2011-01-13 23:29:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 565829    
Bug Blocks: 594621    
Attachments:
Description Flags
Proposed patch for cups-1.3.x
none
Similar patch for current svn
none
Alternative 1.3.x patch based on upstream commit r8996 none

Description Olivier Fourdan 2010-02-16 13:11:33 UTC
Created attachment 394532 [details]
Proposed patch for cups-1.3.x

Description of problem:

When deleting a printer, the classes are not saved.

Version-Release number of selected component (if applicable):

cups-1.3.7

How reproducible:

Always

Steps to Reproduce:
1. Make sure classes.conf is empty (not required but easier to follow)

    # cat /etc/cups/classes.conf
    # Class configuration file for CUPS v1.3.7
    # Written by cupsd on 2010-02-16 12:40

2. Create a printer and a class, the printer belonging to the class:

    # lpadmin -p p1 -E -v socket://p1:9100 -c c1
 
3. Check that the class is created and the printer added:

    # cat /etc/cups/classes.conf
    # Class configuration file for CUPS v1.3.7
    # Written by cupsd on 2010-02-16 12:41
    <Class c1>
    Info c1
    State Stopped
    StateMessage 
    StateTime 1266324078
    Accepting No
    Shared Yes
    JobSheets none none
    Printer p1
    QuotaPeriod 0
    PageLimit 0
    KLimit 0
    OpPolicy default
    ErrorPolicy retry-job
    </Class>

4. Delete the printer

    # lpadmin -x p1
  
Actual results:

The printer is still listed in classes.conf:

    # cat /etc/cups/classes.conf
    # Class configuration file for CUPS v1.3.7
    # Written by cupsd on 2010-02-16 12:41
    <Class c1>
    Info c1
    State Stopped
    StateMessage 
    StateTime 1266324078
    Accepting No
    Shared Yes
    JobSheets none none
    Printer p1             <===== here
    QuotaPeriod 0
    PageLimit 0
    KLimit 0
    OpPolicy default
    ErrorPolicy retry-job
    </Class>

Expected results:

The printer is no part of the class anymore:

    # cat /etc/cups/classes.conf
    # Class configuration file for CUPS v1.3.7
    # Written by cupsd on 2010-02-16 12:41
    <Class c1>
    Info c1
    State Stopped
    StateMessage 
    StateTime 1266324078
    Accepting No
    Shared Yes
    JobSheets none none
    QuotaPeriod 0
    PageLimit 0
    KLimit 0
    OpPolicy default
    ErrorPolicy retry-job
    </Class>

Additional info:

The bug is also present in 1.4.x

Comment 1 Olivier Fourdan 2010-02-16 13:12:35 UTC
Created attachment 394534 [details]
Similar patch for current svn

This patch has not been tested (only the patch for 1.3.x has been tested)

Comment 3 Tim Waugh 2010-02-17 11:34:36 UTC
Created attachment 394714 [details]
Alternative 1.3.x patch based on upstream commit r8996

Comment 4 Ben 2010-04-16 17:28:58 UTC
Is anyone working on this issue?

Comment 7 Jaromir Hradilek 2010-08-06 12:58:31 UTC
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.

New Contents:
When the class members were changed, /etc/cups/classes.conf was not always updated accordingly. This issue has been resolved, and the configuration file is now always updated as expected.

Comment 12 errata-xmlrpc 2011-01-13 23:29:07 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0095.html