Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

drv files can cause duplicate PPD names from CUPS-Get-PPDs #3283

Closed

Description

@michaelrsweet

Version: 1.4rc1
CUPS.org User: twaugh.redhat

If a drv file contains more than one Product attribute for a PPD,
'lpinfo -m' will contain duplicates in its output.

I originally reported this as an HPLIP bug but HP claim this is valid PPD content and that 1.3.9 did not behave in this way:
https://bugs.launchpad.net/hplip/+bug/409928

Activity

  1. michaelrsweet commented on Aug 7, 2009

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: twaugh.redhat

    Untested patch attached.

  2. michaelrsweet commented on Aug 7, 2009

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

    We can't use your patch as-is since it is 100% possible and allowed to have multiple PPDs (or even a single PPD) matching a given product string.

    Will need to look elsewhere to filter out dupes.

  3. michaelrsweet commented on Aug 29, 2009

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

    The patch for STR #3297 addresses this issue by creating one entry with multiple product values instead.

  4. michaelrsweet commented on Aug 29, 2009

    @michaelrsweet
    ContributorAuthor

    "0001-Don-t-create-duplicate-entries-from-drv-files.patch":

    From 964ec8736dafb6bf096c31841136595cde448a4f Mon Sep 17 00:00:00 2001
    From: Tim Waugh twaugh@redhat.com
    Date: Fri, 7 Aug 2009 12:45:40 +0100
    Subject: [PATCH] Don't create duplicate entries from drv files.

    If a drv file contains more than one Product attribute for a PPD,

    'lpinfo -m' will contain duplicates in its output.

    scheduler/cups-driverd.cxx | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/scheduler/cups-driverd.cxx b/scheduler/cups-driverd.cxx
    index a014f1a..f842843 100644
    --- a/scheduler/cups-driverd.cxx
    +++ b/scheduler/cups-driverd.cxx
    @@ -1982,7 +1982,7 @@ load_drv(const char filename, / I - Actual filename */
    }

     for (product = (ppdcAttr *)d->attrs->first(), product_found = false;
    
    •     product;
      
    •     product && product_found == false;
      

      product = (ppdcAttr *)d->attrs->next())
      if (!strcmp(product->name->value, "Product"))
      {

      1.6.2.5
  5. added this to the Stable milestone on Mar 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions