Bug 145605 - Uninitialized value in perl substitution when configuring HP DeskJet 3650
Summary: Uninitialized value in perl substitution when configuring HP DeskJet 3650
Alias: None
Product: Fedora
Classification: Fedora
Component: foomatic   
(Show other bugs)
Version: 3
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2005-01-20 01:40 UTC by Dave Mielke
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-02-28 10:53:29 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Dave Mielke 2005-01-20 01:40:09 UTC
Description of problem:

Using foomatic-configure to configure an HP DeskJet 3650 seems to work but
displays a perl warning which doesn't look good.

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


How reproducible:

All the time.

Steps to Reproduce:

1. foomatic-configure -s cups -n deskjet-3600-2 -p HP-DeskJet_3650 -d hpijs
Actual results:

The following warning is displayed:
   Use of uninitialized value in substitution (s///) at
   /usr/lib/perl5/vendor_perl/5.8.5/Foomatic/DB.pm line 3427.

The printer itself seems to be properly configured except that I do need to
change the page size from A4 to Letter.

Expected results:

No output.

Additional info:

Comment 1 Tim Waugh 2005-01-20 10:20:53 UTC
I think line 3427 of that file needs to be changed to:

    $tmpl =~ s!\@\@IEEE1284\@\@!$ieee1284!g if $ieee1284;

(i.e. add "if $ieee1284" before the semi-colon)

Can you try that and see if it prevents the warning?

Comment 2 Dave Mielke 2005-01-21 03:58:33 UTC
Yes, that makes the warning go away. Thanks.

Comment 3 Tim Waugh 2005-01-21 09:42:28 UTC
Fixed in CVS.  Thanks.

Comment 4 Till Kamppeter 2005-01-23 19:26:15 UTC
Tim, your fix caused another problem: If $ieee1284 is not defined
(printer has no autodetection info supplied in its Foomatic XML file)
the placeholder "@@IEEE1284@@" in the PPD file template is not
replaced and so the placeholder stays in the final PPD file. Such a
PPD file fails when run through "cupstestppd" and CUPS (1.1.19 or
newer) does not accept it. So jobs do not get printed by CUPS.

The correct way to fix the bug is to replace the line "my $ieee1284;"
by "$ieee1284 = '';". Then the variable is always predefined even if
no autodetection info will be found. This leads to the placeholder
being replaced by an empty string without warning.

I have fixed this on the Foomatic CVS now.

See also http://www.linuxprinting.org/pipermail/hp-list/2005q1/006247.html

Comment 5 Dave Mielke 2005-01-24 00:38:15 UTC
What information do you need in order to have the HP DeskJet 3650 autodetected?
If it helps, it's a USB printer with:
   Vendor Identifier: 03F0
   Product Identifier: 7204
   Manufacturer String: hp
   Product String: deskjet 3600

Please let me know if you could use some more information.

Comment 6 Tim Waugh 2005-01-24 09:49:09 UTC
Till: thanks, and sorry for breaking it.

Dave: you need to open a separate bug report so that it can be tracked
correctly.  This bug report is for the uninitialized value warning. 
The information we need is the stuff that system-config-printer
displays in the terminal when you run it in a terminal.

Comment 7 Tim Waugh 2005-02-28 10:53:29 UTC
Fixed foomatic built in rawhide.

Note You need to log in before you can comment on or make changes to this bug.