Hello community,
here is the log from the commit of package yast2-printer for openSUSE:Factory
checked in at Tue Mar 3 22:54:14 CET 2009.
--------
--- yast2-printer/yast2-printer.changes 2009-02-27 15:46:09.000000000 +0100
+++ yast2-printer/yast2-printer.changes 2009-03-03 15:07:33.469346000 +0100
@@ -1,0 +2,13 @@
+Tue Mar 3 14:55:40 CET 2009 - jsmeix@suse.de
+
+- Fixed a few bugs in the "More Drivers" functionality.
+ In particular it works now always based on the current visible
+ search string and no longer on whatever obsure other stuff.
+- The DriverItems function in Printer.ycp searches the model name
+ now also in the 1284DeviceID entry in the PPDs because this entry
+ should contain the exact model name how it is autodetected
+ while the NickName entry (which is still searched) may contain
+ a different model name (e.g. what is labeled on the device).
+- 2.18.9
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
yast2-printer-2.18.8.tar.bz2
New:
----
yast2-printer-2.18.9.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-printer.spec ++++++
--- /var/tmp/diff_new_pack.e14838/_old 2009-03-03 22:52:49.000000000 +0100
+++ /var/tmp/diff_new_pack.e14838/_new 2009-03-03 22:52:49.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-printer (Version 2.18.8)
+# spec file for package yast2-printer (Version 2.18.9)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -20,12 +20,12 @@
Url: http://en.opensuse.org/YaST/Modules/Printer
Name: yast2-printer
-Version: 2.18.8
+Version: 2.18.9
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-printer-2.18.8.tar.bz2
+Source0: yast2-printer-2.18.9.tar.bz2
Prefix: /usr
BuildRequires: cups-devel update-desktop-files yast2 yast2-core-devel yast2-devtools yast2-testsuite
Recommends: netcat
@@ -65,7 +65,7 @@
Michal Zugec
%prep
-%setup -n yast2-printer-2.18.8
+%setup -n yast2-printer-2.18.9
%build
%{prefix}/bin/y2tool y2autoconf
@@ -127,6 +127,16 @@
%exclude %{prefix}/share/doc/packages/yast2-printer/COPYING
%exclude %{prefix}/share/doc/packages/yast2-printer/README
%changelog
+* Tue Mar 03 2009 jsmeix@suse.de
+- Fixed a few bugs in the "More Drivers" functionality.
+ In particular it works now always based on the current visible
+ search string and no longer on whatever obsure other stuff.
+- The DriverItems function in Printer.ycp searches the model name
+ now also in the 1284DeviceID entry in the PPDs because this entry
+ should contain the exact model name how it is autodetected
+ while the NickName entry (which is still searched) may contain
+ a different model name (e.g. what is labeled on the device).
+- 2.18.9
* Fri Feb 27 2009 jsmeix@suse.de
- Added the functionality to basicadd.ycp and basicmodify.ycp to
set the default paper size directly when a driver is assigned
++++++ yast2-printer-2.18.8.tar.bz2 -> yast2-printer-2.18.9.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.18.8/configure new/yast2-printer-2.18.9/configure
--- old/yast2-printer-2.18.8/configure 2009-02-27 15:38:44.000000000 +0100
+++ new/yast2-printer-2.18.9/configure 2009-03-03 15:06:26.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for yast2-printer 2.18.8.
+# Generated by GNU Autoconf 2.63 for yast2-printer 2.18.9.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -596,8 +596,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-printer'
PACKAGE_TARNAME='yast2-printer'
-PACKAGE_VERSION='2.18.8'
-PACKAGE_STRING='yast2-printer 2.18.8'
+PACKAGE_VERSION='2.18.9'
+PACKAGE_STRING='yast2-printer 2.18.9'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -1274,7 +1274,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures yast2-printer 2.18.8 to adapt to many kinds of systems.
+\`configure' configures yast2-printer 2.18.9 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1345,7 +1345,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-printer 2.18.8:";;
+ short | recursive ) echo "Configuration of yast2-printer 2.18.9:";;
esac
cat <<\_ACEOF
@@ -1425,7 +1425,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-printer configure 2.18.8
+yast2-printer configure 2.18.9
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1439,7 +1439,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by yast2-printer $as_me 2.18.8, which was
+It was created by yast2-printer $as_me 2.18.9, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
@@ -2286,7 +2286,7 @@
# Define the identity of the package.
PACKAGE='yast2-printer'
- VERSION='2.18.8'
+ VERSION='2.18.9'
cat >>confdefs.h <<_ACEOF
@@ -2510,7 +2510,7 @@
-VERSION="2.18.8"
+VERSION="2.18.9"
RPMNAME="yast2-printer"
MAINTAINER="Michal Zugec "
@@ -3451,7 +3451,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yast2-printer $as_me 2.18.8, which was
+This file was extended by yast2-printer $as_me 2.18.9, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3501,7 +3501,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-yast2-printer config.status 2.18.8
+yast2-printer config.status 2.18.9
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.18.8/configure.in new/yast2-printer-2.18.9/configure.in
--- old/yast2-printer-2.18.8/configure.in 2009-02-27 15:38:40.000000000 +0100
+++ new/yast2-printer-2.18.9/configure.in 2009-03-03 15:06:22.000000000 +0100
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.17.6 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-printer, 2.18.8, http://bugs.opensuse.org/, yast2-printer)
+AC_INIT(yast2-printer, 2.18.9, http://bugs.opensuse.org/, yast2-printer)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -18,7 +18,7 @@
AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
dnl Important YaST2 variables
-VERSION="2.18.8"
+VERSION="2.18.9"
RPMNAME="yast2-printer"
MAINTAINER="Michal Zugec "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.18.8/src/basicadd.ycp new/yast2-printer-2.18.9/src/basicadd.ycp
--- old/yast2-printer-2.18.8/src/basicadd.ycp 2009-02-26 15:31:28.000000000 +0100
+++ new/yast2-printer-2.18.9/src/basicadd.ycp 2009-03-03 14:40:37.000000000 +0100
@@ -478,23 +478,28 @@
{ driver_filter_string = "";
boolean valid_driver_found = false;
list driver_items = [];
- // Use the existing value of model because for each subsequent run of this more_drivers section
- // the existing value of model is shortened at the end (the last word is removed) to get
- // more and mor derivers for each subsequent run of this more_drivers section.
- y2milestone( "More drivers for '%1'", model );
- if( "" != model
- && "unknown" != tolower( model )
+ // Use the existing value of driver_filter_input_text
+ // which is by default set to the autodetected model name
+ // but it could be any string which was entered before by the user.
+ // The "more drivers" functionality must work based on the current search string
+ // and when nothing is found based on the current search string
+ // it falls back to show all drivers so that there is a valid result in any case.
+ driver_filter_input_text = (string)UI::QueryWidget( `id(`driver_filter_input), `Value );
+ y2milestone( "More drivers for '%1'", driver_filter_input_text );
+ if( "" != driver_filter_input_text
+ && "unknown" != tolower( driver_filter_input_text )
)
- { // If the model string does not contain a space,
- // model_words is a singleton list which contains only model.
- list <string> model_words = splitstring( model, " " );
- if( size( model_words ) >= 2 )
- { // If there are less than two words the following does not make sense.
+ { // If the driver_filter_input_text string does not contain a space,
+ // words is a singleton list which contains only one word.
+ list <string> words = splitstring( driver_filter_input_text, " " );
+ if( size( words ) >= 1 )
+ { // Even if it is only one word, the following makes sense
+ // because the one word could already be the model_number_word.
// Try to find the word which contains a model number.
// This is usually the first word which contains a number.
string model_number_word = "";
foreach( string word,
- model_words,
+ words,
{ if( "" != filterchars( word, Printer::number_chars ) )
{ model_number_word = word;
break;
@@ -531,63 +536,59 @@
}
}
}
- }
- // Use the manufacturer when the existing value of model cannot be used
- // or when nothing was found above:
- if( ! valid_driver_found )
- { driver_filter_string = "";
- string model = Printer::connections[Printer::selected_connections_index,"model"]:"";
- if( "" != model
- && "unknown" != tolower( model )
- )
- { // The first word in the driver_filter_string is usually the first word of the manufacturer name.
+ // Try to use the manufacturer when nothing was found above:
+ if( ! valid_driver_found )
+ { driver_filter_string = "";
+ // The first word in the driver_filter_input_text is usually the first word of the manufacturer name.
// This fuzzy match is intended so that e.g. "Kyocera" and "Kyocera Mita" are the same.
- string manufacturer = splitstring( model, " " )[0]:"";
+ string manufacturer = splitstring( driver_filter_input_text, " " )[0]:"";
if( "" != manufacturer )
{ // Even more fuzziness for very ambiguous manufacturer names:
- if( "hewlett" == substring( tolower( driver_filter_string ), 0, 7 ) )
+ if( "hewlett" == substring( tolower( driver_filter_input_text ), 0, 7 ) )
{ // Let "Hewlett-Packard", "Hewlett Packard", and "HP be the same:
manufacturer = "HP";
}
- if( "oki" == substring( tolower( driver_filter_string ), 0, 3 ) )
+ if( "oki" == substring( tolower( driver_filter_input_text ), 0, 3 ) )
{ // Let "Oki", "Okidata", and "Okipage" be the same:
manufacturer = "Oki";
}
- driver_filter_string = tolower( manufacturer );
- // Match at the beginning only if the driver_filter_string is actually a known manufacturer:
- foreach( string known_manufacturer,
- Printer::known_manufacturers,
- { if( driver_filter_string == tolower( known_manufacturer ) )
- { driver_filter_string = "^" + driver_filter_string;
- break;
- }
- }
- );
// Provide visible feeback what is going on:
UI::ReplaceWidget( `id(`driver_filter_input_replace_point),
`InputField
( `id(`driver_filter_input),
`opt(`hstretch),
// No InputField header because there is the "Caption for a printer driver selection":
- "",
+ "",
manufacturer
)
);
- driver_items = Printer::DriverItems( driver_filter_string, true );
- // Printer::DriverItems may result a driver_items list with one single element
- // [ `item( `id( -1 ), _("No matching driver found.") ) ]
- // to show at least a meaningful text as fallback entry to the user
- // or Printer::DriverItems may result a driver_items list with the first item
- // [ `item( `id( -1 ), _("Select a driver.") ), ... ]
- // when Printer::DriverItems could not preselect a driver item.
- // If a valid driver was found (but perhaps none was preselected),
- // there would be a non-negative id value of the first or second element
- // which is driver_items[0,0,0] or driver_items[1,0,0]
- // (id[0] is the value of the id, see the comment in Printer::DriverItems).
- if( driver_items[0,0,0]:-1 >= 0
- || driver_items[1,0,0]:-1 >= 0
- )
- { valid_driver_found = true;
+ driver_filter_string = filterchars( tolower( manufacturer ), Printer::lower_alnum_chars );
+ if( "" != driver_filter_string )
+ { // Match at the beginning only if the driver_filter_string is actually a known manufacturer:
+ foreach( string known_manufacturer,
+ Printer::known_manufacturers,
+ { if( driver_filter_string == tolower( known_manufacturer ) )
+ { driver_filter_string = "^" + driver_filter_string;
+ break;
+ }
+ }
+ );
+ driver_items = Printer::DriverItems( driver_filter_string, true );
+ // Printer::DriverItems may result a driver_items list with one single element
+ // [ `item( `id( -1 ), _("No matching driver found.") ) ]
+ // to show at least a meaningful text as fallback entry to the user
+ // or Printer::DriverItems may result a driver_items list with the first item
+ // [ `item( `id( -1 ), _("Select a driver.") ), ... ]
+ // when Printer::DriverItems could not preselect a driver item.
+ // If a valid driver was found (but perhaps none was preselected),
+ // there would be a non-negative id value of the first or second element
+ // which is driver_items[0,0,0] or driver_items[1,0,0]
+ // (id[0] is the value of the id, see the comment in Printer::DriverItems).
+ if( driver_items[0,0,0]:-1 >= 0
+ || driver_items[1,0,0]:-1 >= 0
+ )
+ { valid_driver_found = true;
+ }
}
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.18.8/src/basicmodify.ycp new/yast2-printer-2.18.9/src/basicmodify.ycp
--- old/yast2-printer-2.18.8/src/basicmodify.ycp 2009-02-27 15:27:37.000000000 +0100
+++ new/yast2-printer-2.18.9/src/basicmodify.ycp 2009-03-03 14:40:40.000000000 +0100
@@ -920,7 +920,11 @@
boolean valid_driver_found = false;
list driver_items = [];
// Use the existing value of driver_filter_input_text
- // which is usually set to nick_name and to model as fallback.
+ // which is usually set to nick_name and to model as fallback
+ // but it could be any string which was entered before by the user.
+ // The "more drivers" functionality must work based on the current search string
+ // and when nothing is found based on the current search string
+ // it falls back to show all drivers so that there is a valid result in any case.
driver_filter_input_text = (string)UI::QueryWidget( `id(`driver_filter_input), `Value );
y2milestone( "More drivers for '%1'", driver_filter_input_text );
if( "" != driver_filter_input_text
@@ -929,8 +933,9 @@
{ // If the driver_filter_input_text string does not contain a space,
// words is a singleton list which contains only one word.
list <string> words = splitstring( driver_filter_input_text, " " );
- if( size( words ) >= 2 )
- { // If there are less than two words the following does not make sense.
+ if( size( words ) >= 1 )
+ { // Even if it is only one word, the following makes sense
+ // because the one word could already be the model_number_word.
// Try to find the word which contains a model number.
// This is usually the first word which contains a number.
string model_number_word = "";
@@ -972,38 +977,22 @@
}
}
}
- }
- // Use the manufacturer when the existing value of model cannot be used
- // or when nothing was found above:
- if( ! valid_driver_found )
- { driver_filter_string = "";
- string model = Printer::connections[Printer::selected_connections_index,"model"]:"";
- if( "" != model
- && "unknown" != tolower( model )
- )
- { // The first word in the driver_filter_string is usually the first word of the manufacturer name.
+ // Try to use the manufacturer when nothing was found above:
+ if( ! valid_driver_found )
+ { driver_filter_string = "";
+ // The first word in the driver_filter_input_text is usually the first word of the manufacturer name.
// This fuzzy match is intended so that e.g. "Kyocera" and "Kyocera Mita" are the same.
- string manufacturer = splitstring( model, " " )[0]:"";
+ string manufacturer = splitstring( driver_filter_input_text, " " )[0]:"";
if( "" != manufacturer )
{ // Even more fuzziness for very ambiguous manufacturer names:
- if( "hewlett" == substring( tolower( driver_filter_string ), 0, 7 ) )
+ if( "hewlett" == substring( tolower( driver_filter_input_text ), 0, 7 ) )
{ // Let "Hewlett-Packard", "Hewlett Packard", and "HP be the same:
manufacturer = "HP";
}
- if( "oki" == substring( tolower( driver_filter_string ), 0, 3 ) )
+ if( "oki" == substring( tolower( driver_filter_input_text ), 0, 3 ) )
{ // Let "Oki", "Okidata", and "Okipage" be the same:
manufacturer = "Oki";
}
- driver_filter_string = tolower( manufacturer );
- // Match at the beginning only if the driver_filter_string is actually a known manufacturer:
- foreach( string known_manufacturer,
- Printer::known_manufacturers,
- { if( driver_filter_string == tolower( known_manufacturer ) )
- { driver_filter_string = "^" + driver_filter_string;
- break;
- }
- }
- );
// Provide visible feeback what is going on:
UI::ReplaceWidget( `id(`driver_filter_input_replace_point),
`InputField
@@ -1014,21 +1003,33 @@
manufacturer
)
);
- driver_items = Printer::DriverItems( driver_filter_string, true );
- // Printer::DriverItems may result a driver_items list with one single element
- // [ `item( `id( -1 ), _("No matching driver found.") ) ]
- // to show at least a meaningful text as fallback entry to the user
- // or Printer::DriverItems may result a driver_items list with the first item
- // [ `item( `id( -1 ), _("Select a driver.") ), ... ]
- // when Printer::DriverItems could not preselect a driver item.
- // If a valid driver was found (but perhaps none was preselected),
- // there would be a non-negative id value of the first or second element
- // which is driver_items[0,0,0] or driver_items[1,0,0]
- // (id[0] is the value of the id, see the comment in Printer::DriverItems).
- if( driver_items[0,0,0]:-1 >= 0
- || driver_items[1,0,0]:-1 >= 0
- )
- { valid_driver_found = true;
+ driver_filter_string = filterchars( tolower( manufacturer ), Printer::lower_alnum_chars );
+ if( "" != driver_filter_string )
+ { // Match at the beginning only if the driver_filter_string is actually a known manufacturer:
+ foreach( string known_manufacturer,
+ Printer::known_manufacturers,
+ { if( driver_filter_string == tolower( known_manufacturer ) )
+ { driver_filter_string = "^" + driver_filter_string;
+ break;
+ }
+ }
+ );
+ driver_items = Printer::DriverItems( driver_filter_string, true );
+ // Printer::DriverItems may result a driver_items list with one single element
+ // [ `item( `id( -1 ), _("No matching driver found.") ) ]
+ // to show at least a meaningful text as fallback entry to the user
+ // or Printer::DriverItems may result a driver_items list with the first item
+ // [ `item( `id( -1 ), _("Select a driver.") ), ... ]
+ // when Printer::DriverItems could not preselect a driver item.
+ // If a valid driver was found (but perhaps none was preselected),
+ // there would be a non-negative id value of the first or second element
+ // which is driver_items[0,0,0] or driver_items[1,0,0]
+ // (id[0] is the value of the id, see the comment in Printer::DriverItems).
+ if( driver_items[0,0,0]:-1 >= 0
+ || driver_items[1,0,0]:-1 >= 0
+ )
+ { valid_driver_found = true;
+ }
}
}
}
@@ -1049,17 +1050,18 @@
driver_items = Printer::DriverItems( "", true );
}
UI::ReplaceWidget( `id(`driver_selection_replace_point),
- `SelectionBox( `id(`driver_selection),
- // By default there is no UserInput()
- // if only something was selected in the SelectionBox
- // (without clicking additionally a button)
- // but the notify option forces UserInput() in this case:
- `opt(`notify),
- "",
- prepend( driver_items,
- current_driver
- )
- )
+ `SelectionBox
+ ( `id(`driver_selection),
+ // By default there is no UserInput()
+ // if only something was selected in the SelectionBox
+ // (without clicking additionally a button)
+ // but the notify option forces UserInput() in this case:
+ `opt(`notify),
+ "",
+ prepend( driver_items,
+ current_driver
+ )
+ )
);
continue;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.18.8/src/Printer.ycp new/yast2-printer-2.18.9/src/Printer.ycp
--- old/yast2-printer-2.18.8/src/Printer.ycp 2009-02-26 15:31:28.000000000 +0100
+++ new/yast2-printer-2.18.9/src/Printer.ycp 2009-03-03 13:01:41.000000000 +0100
@@ -1283,9 +1283,17 @@
}
else
{ // If the driver_filter_string is a non-empty string,
- // test whether the nickname matches to the driver_filter_string:
- string unified_nickname = filterchars( tolower( nickname ), lower_alnum_chars );
- if( regexpmatch( unified_nickname, driver_filter_string ) )
+ // test whether nickname or deviceID matches to the driver_filter_string.
+ // Only the special character '+' is also taken into account because
+ // this is sometimes also a meaningful character in the model name
+ // for example the '+' at the end of a Kyocera model name
+ // indicates that this model has a built-in PostScript interpreter
+ // while the model without the '+' understands only PCL.
+ string unified_nickname = filterchars( tolower( nickname ), lower_alnum_chars + "+" );
+ string unified_deviceID = filterchars( tolower( deviceID ), lower_alnum_chars + "+" );
+ if( regexpmatch( unified_nickname, driver_filter_string )
+ || regexpmatch( unified_deviceID, driver_filter_string )
+ )
{ driver_items = add( driver_items, `item( `id( ppds_index ), driver_string ) );
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.18.8/VERSION new/yast2-printer-2.18.9/VERSION
--- old/yast2-printer-2.18.8/VERSION 2009-02-27 15:35:14.000000000 +0100
+++ new/yast2-printer-2.18.9/VERSION 2009-03-03 14:55:38.000000000 +0100
@@ -1 +1 @@
-2.18.8
+2.18.9
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org