rpms/hplip/F-10 hplip-setup-getppd.patch, NONE, 1.1 hplip.spec, 1.196, 1.197
Tim Waugh
twaugh at fedoraproject.org
Mon Mar 16 12:33:30 UTC 2009
- Previous message (by thread): rpms/rubygem-picnic/devel .cvsignore, 1.2, 1.3 import.log, 1.1, 1.2 rubygem-picnic.spec, 1.2, 1.3 sources, 1.2, 1.3
- Next message (by thread): rpms/rubygem-rails/devel import.log, NONE, 1.1 .cvsignore, 1.7, 1.8 rubygem-rails.spec, 1.9, 1.10 sources, 1.7, 1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: twaugh
Update of /cvs/pkgs/rpms/hplip/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv28056
Modified Files:
hplip.spec
Added Files:
hplip-setup-getppd.patch
Log Message:
* Mon Mar 16 2009 Tim Waugh <twaugh at redhat.com> 2.8.12-7
- Backported fix for PPD matching logic from 3.9.2 (bug #490360).
hplip-setup-getppd.patch:
--- NEW FILE hplip-setup-getppd.patch ---
diff -up hplip-2.8.12/setup.py.setup-getppd hplip-2.8.12/setup.py
--- hplip-2.8.12/setup.py.setup-getppd 2009-03-16 11:50:44.000000000 +0000
+++ hplip-2.8.12/setup.py 2009-03-16 11:53:34.000000000 +0000
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
-# (c) Copyright 2003-2008 Hewlett-Packard Development Company, L.P.
+# (c) Copyright 2003-2009 Hewlett-Packard Development Company, L.P.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -452,66 +452,28 @@ else: # INTERACTIVE_MODE
default_model = utils.xstrip(model.replace('series', '').replace('Series', ''), '_')
stripped_model = default_model.lower().replace('hp-', '').replace('hp_', '')
- mins = cups.getPPDFile2(stripped_model, ppds)
- x = len(mins)
-
+ print_ppd = cups.getPPDFile2(stripped_model, ppds)
enter_ppd = False
- if x == 0:
+ if print_ppd is None:
enter_ppd = True
-
- elif x == 1:
- print_ppd = mins.keys()[0]
- log.info("\nFound a possible PPD file: %s" % print_ppd)
- log.info("Desc: %s" % mins[print_ppd])
-
- if not auto:
- log.info("\nNote: The model number may vary slightly from the actual model number on the device.")
- ok, ans = tui.enter_yes_no("\nDoes this PPD file appear to be the correct one")
- if not ok: sys.exit(0)
- if not ans: enter_ppd = True
+ log.error("Unable to find an appropriate PPD file.")
else:
- log.info("")
- log.warn("Found multiple possible PPD files")
-
- max_ppd_filename_size = 0
- for p in mins:
- max_ppd_filename_size = max(len(p), max_ppd_filename_size)
-
- log.info(log.bold("\nChoose a PPD file that most closely matches your device:"))
- log.info("(Note: The model number may vary slightly from the actual model number on the device.)\n")
-
- formatter = utils.TextFormatter(
- (
- {'width': 4},
- {'width': max_ppd_filename_size, 'margin': 2},
- {'width': 40, 'margin': 2},
- )
- )
+ print_ppd, desc = print_ppd
+ log.info("\nFound PPD file: %s" % print_ppd)
- log.info(formatter.compose(("Num.", "PPD Filename", "Description")))
- log.info(formatter.compose(('-'*4, '-'*(max_ppd_filename_size), '-'*40 )))
+ if desc:
+ log.info("Description: %s" % desc)
- mins_list = mins.keys()
+ if not auto:
+ log.info("\nNote: The model number may vary slightly from the actual model number on the device.")
+ ok, ans = tui.enter_yes_no("\nDoes this PPD file appear to be the correct one")
+ if not ok: sys.exit(0)
+ if not ans: enter_ppd = True
- for y in range(x):
- log.info(formatter.compose((str(y), mins_list[y], mins[mins_list[y]])))
-
- x += 1
- none_of_the_above = y+1
- log.info(formatter.compose((str(none_of_the_above), "(None of the above match)", '')))
-
- ok, i = tui.enter_range("\nEnter number 0...%d for printer (q=quit) ?" % (x-1), 0, (x-1))
- if not ok: sys.exit(0)
-
- if i == none_of_the_above:
- enter_ppd = True
- else:
- print_ppd = mins_list[i]
if enter_ppd:
- log.error("Unable to find an appropriate PPD file.")
enter_ppd = False
ok, enter_ppd = tui.enter_yes_no("\nWould you like to specify the path to the correct PPD file to use", 'n')
Index: hplip.spec
===================================================================
RCS file: /cvs/pkgs/rpms/hplip/F-10/hplip.spec,v
retrieving revision 1.196
retrieving revision 1.197
diff -u -r1.196 -r1.197
--- hplip.spec 27 Jan 2009 11:21:59 -0000 1.196
+++ hplip.spec 16 Mar 2009 12:32:59 -0000 1.197
@@ -1,7 +1,7 @@
Summary: HP Linux Imaging and Printing Project
Name: hplip
Version: 2.8.12
-Release: 6%{?dist}
+Release: 7%{?dist}
License: GPLv2+ and MIT
Group: System Environment/Daemons
Conflicts: system-config-printer < 0.6.132
@@ -20,6 +20,7 @@
Patch4: hplip-marker-supply.patch
Patch5: hplip-dbus.patch
Patch6: hplip-systray.patch
+Patch7: hplip-setup-getppd.patch
Patch8: hplip-libsane.patch
Patch12: hplip-no-root-config.patch
Patch13: hplip-ui-optional.patch
@@ -123,6 +124,9 @@
# in the right place.
%patch6 -p1 -b .systray
+# Backported fix for PPD matching logic from 3.9.2 (bug #490360).
+%patch7 -p1 -b .setup-getppd
+
# Link libsane-hpaio against libsane (bug #234813).
%patch8 -p1 -b .libsane
@@ -328,6 +332,9 @@
exit 0
%changelog
+* Mon Mar 16 2009 Tim Waugh <twaugh at redhat.com> 2.8.12-7
+- Backported fix for PPD matching logic from 3.9.2 (bug #490360).
+
* Tue Jan 27 2009 Tim Waugh <twaugh at redhat.com> 2.8.12-6
- Only ship compressed PPD files.
- Previous message (by thread): rpms/rubygem-picnic/devel .cvsignore, 1.2, 1.3 import.log, 1.1, 1.2 rubygem-picnic.spec, 1.2, 1.3 sources, 1.2, 1.3
- Next message (by thread): rpms/rubygem-rails/devel import.log, NONE, 1.1 .cvsignore, 1.7, 1.8 rubygem-rails.spec, 1.9, 1.10 sources, 1.7, 1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list