Bug 62342

Summary: no /usr/bin/lpr
Product: [Retired] Red Hat Raw Hide Reporter: ellson
Component: LPRngAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0CC: notting
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-04-02 16:41:44 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:

Description ellson 2002-03-29 21:50:06 UTC
Description of Problem:
There was no /usr/bin/lpr on my system.
It doesn't seem to be created from any rpm
The config tool "redhat-switch-printer" doesn't create one.  

I was able to get printing working with "ln -s /usr/bin/lpr.LPRng /usr/bin/lpr"

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


How Reproducible:


Steps to Reproduce:
1. 
2. 
3. 

Actual Results:


Expected Results:


Additional Information:

Comment 1 Sammy 2002-04-01 13:49:36 UTC
I did the same on my system. I am surprised this had not been reported
from -1 to -2. Is there a reason  for this name change?


Comment 2 Bill Nottingham 2002-04-01 20:53:37 UTC
What version of chkconfig do you have installed?

Comment 3 ellson 2002-04-01 21:07:00 UTC
# chkconfig -v
chkconfig version 1.3.4

(Why is run-level relevant?)

Comment 4 Bill Nottingham 2002-04-01 22:52:07 UTC
Hm... was that version installed when you installed LPRng?

Comment 5 ellson 2002-04-02 13:40:20 UTC
Judging by the timestamps on the rpms they probably arrived from the
Rawhide collection on the same day - Mar 18.

Probably I installed them in alphabetic order - i.e. LPRng first.

I just tried removing and reinstalling LPRng.  I got:
    # rpm -e LPRng
    /usr/bin/lpr.LPRng has not been configured as an alternative for print
    error: execution of %preun scriptlet from LPRng-3.8.9-2 failed, exit status 2

I tried replacing LPRng:
    # rpm -Uvh --replacepkgs LPRng-3.8.9-2.i386.rpm
    Preparing...                ########################################### [100%]
       1:LPRng                  ########################################### [100%]
    the primary link for print must be /usr/bin/cancel
    error: execution of %post scriptlet from LPRng-3.8.9-2 failed, exit status 2

Comment 6 Tim Waugh 2002-04-02 14:05:53 UTC
LPRng-3.8.9-2 has 'PreReq: /usr/sbin/alternatives'.  Did you use --force when
installing LPRng?

Comment 7 ellson 2002-04-02 14:16:14 UTC
No.  Perhaps that suggests that chkconfig was in fact installed first.

/usr/sbin/alternatives is there now, but attempts to remove and reinstall 
LPRng produce errors as above.

Comment 8 Bill Nottingham 2002-04-02 15:55:25 UTC
It probably needs to prereq chkconfig 1.3.4-1 or greater, as the bugfixes that
went in are fairly significant.

What you should be able to do is to remove LPRng, remove
/var/lib/alternatives/print, and then reinstall LPRng.

Comment 9 ellson 2002-04-02 16:09:41 UTC
    rm /var/lib/alternatives/print
    rpm -e LPRng
still didn't work because the %preun seems to expect a consistent state of the
system.  This is a bug IMHO.

This worked OK:
    rm /var/lib/alternatives/print
    rpm -Uvh --replacepkgs LPRng-3.8.9-2.i386.rpm


Now /usr/bin/lpr -> /etc/alternatives/print
and /etc/alternatives/print -> /usr/bin/lpr.LPRng
(a bit convoluted... but OK)

Comment 10 Tim Waugh 2002-04-02 16:41:39 UTC
Alternatively you could have used --noscripts.

In 3.8.9-3 I'll put in a prereq for chkconfig >= 1.3.4-1.  We'll put it down to
chkconfig(alternatives) bugs in a version before that I guess.