This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 145605 - Uninitialized value in perl substitution when configuring HP DeskJet 3650
Uninitialized value in perl substitution when configuring HP DeskJet 3650
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: foomatic (Show other bugs)
3
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-19 20:40 EST by Dave Mielke
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-02-28 05:53:29 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Dave Mielke 2005-01-19 20:40:09 EST
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):

foomatic-3.0.2-3
cups-1.1.22-0.rc1.8.3
perl-5.8.5-9

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 05:20:53 EST
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-20 22:58:33 EST
Yes, that makes the warning go away. Thanks.
Comment 3 Tim Waugh 2005-01-21 04:42:28 EST
Fixed in CVS.  Thanks.
Comment 4 Till Kamppeter 2005-01-23 14:26:15 EST
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-23 19:38:15 EST
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 04:49:09 EST
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 05:53:29 EST
Fixed foomatic built in rawhide.

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