Hello community,
here is the log from the commit of package yast2-printer
checked in at Sun Jun 22 09:28:57 CEST 2008.
--------
--- yast2-printer/yast2-printer.changes 2008-06-02 11:29:07.000000000 +0200
+++ yast2-printer/yast2-printer.changes 2008-06-19 10:50:17.000000000 +0200
@@ -1,0 +2,24 @@
+Wed Jun 11 14:00:41 CEST 2008 - mzugec@suse.de
+
+- "change connection" - backend validation (bnc#388575)
+- 2.17.1
+
+-------------------------------------------------------------------
+Tue Jun 10 13:51:27 CEST 2008 - mzugec@suse.cz
+
+- automatic installation / not-fully supported printers (bnc#395397)
+- 2.17.0
+
+-------------------------------------------------------------------
+Wed Jun 4 14:07:42 CEST 2008 - mzugec@suse.cz
+
+- improved hostname validation
+- 2.16.34
+
+-------------------------------------------------------------------
+Wed Jun 4 13:23:24 CEST 2008 - mzugec@suse.cz
+
+- initialization sequence sent to usb blocks usb port (bnc#397036)
+- 2.16.33
+
+-------------------------------------------------------------------
Old:
----
yast2-printer-2.16.32.tar.bz2
New:
----
yast2-printer-2.17.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-printer.spec ++++++
--- /var/tmp/diff_new_pack.DT6172/_old 2008-06-22 09:21:53.000000000 +0200
+++ /var/tmp/diff_new_pack.DT6172/_new 2008-06-22 09:21:53.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-printer (Version 2.16.32)
+# spec file for package yast2-printer (Version 2.17.1)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -13,12 +13,12 @@
Url: http://en.opensuse.org/YaST/Modules/Printer
Name: yast2-printer
-Version: 2.16.32
+Version: 2.17.1
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-printer-2.16.32.tar.bz2
+Source0: yast2-printer-2.17.1.tar.bz2
Prefix: /usr
BuildRequires: blocxx-devel cups-devel cups-drivers cups-drivers-stp docbook-xsl-stylesheets doxygen gcc-c++ libxcrypt-devel libxslt openssl-devel perl-XML-Writer popt-devel sgml-skel update-desktop-files yast2 yast2-core-devel yast2-devtools yast2-inetd yast2-testsuite zlib-devel
Requires: zlib blocxx yast2-inetd
@@ -58,7 +58,7 @@
Michal Zugec
%prep
-%setup -n yast2-printer-2.16.32
+%setup -n yast2-printer-2.17.1
%build
%{prefix}/bin/y2tool y2autoconf
@@ -139,6 +139,18 @@
%exclude %{prefix}/share/doc/packages/yast2-printer/COPYING
%exclude %{prefix}/share/doc/packages/yast2-printer/README
%changelog
+* Wed Jun 11 2008 mzugec@suse.de
+- "change connection" - backend validation (bnc#388575)
+- 2.17.1
+* Tue Jun 10 2008 mzugec@suse.cz
+- automatic installation / not-fully supported printers (bnc#395397)
+- 2.17.0
+* Wed Jun 04 2008 mzugec@suse.cz
+- improved hostname validation
+- 2.16.34
+* Wed Jun 04 2008 mzugec@suse.cz
+- initialization sequence sent to usb blocks usb port (bnc#397036)
+- 2.16.33
* Mon Jun 02 2008 mzugec@suse.cz
- install hplip only in case any "hp:/" configured queue exists
(bnc#395386)
++++++ yast2-printer-2.16.32.tar.bz2 -> yast2-printer-2.17.1.tar.bz2 ++++++
++++ 4163 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-printer-2.16.32/configure.in new/yast2-printer-2.17.1/configure.in
--- old/yast2-printer-2.16.32/configure.in 2008-06-02 11:10:43.000000000 +0200
+++ new/yast2-printer-2.17.1/configure.in 2008-06-19 10:19:58.000000000 +0200
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.16.7 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-printer, 2.16.31, http://bugs.opensuse.org/, yast2-printer)
+AC_INIT(yast2-printer, 2.17.1, 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.16.31"
+VERSION="2.17.1"
RPMNAME="yast2-printer"
MAINTAINER="Michal Zugec "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-printer-2.16.32/src/common/dialogs.ycp new/yast2-printer-2.17.1/src/common/dialogs.ycp
--- old/yast2-printer-2.16.32/src/common/dialogs.ycp 2008-05-20 23:49:26.000000000 +0200
+++ new/yast2-printer-2.17.1/src/common/dialogs.ycp 2008-06-11 14:02:30.000000000 +0200
@@ -8,7 +8,7 @@
* Authors:
* Petr Blahos
*
- * $Id: dialogs.ycp 47727 2008-05-20 21:47:11Z mzugec $
+ * $Id: dialogs.ycp 48228 2008-06-11 12:02:29Z mzugec $
* Main dialogs.
*/
{
@@ -32,6 +32,7 @@
import "DialogTree";
import "CWM";
import "IP";
+ import "String";
include "printer/helps.ycp";
include "printer/misc.ycp";
@@ -1873,6 +1874,7 @@
case `test_ipp:
string n = (string)UI::QueryWidget (`id(`server_name), `Value);
if (nil == n || "" == n)
+ if (!(size(String::CutBlanks(n))>0))
// popup
Popup::Message (_("Enter a valid server name."));
else
@@ -1889,7 +1891,7 @@
boolean validateServerType(string key, map event){
if (! (UI::QueryWidget(`id(`server_type), `CurrentButton) == `local)){
- if (size((string)UI::QueryWidget (`id (`server_name), `Value))==0){
+ if (size(String::CutBlanks( (string)UI::QueryWidget (`id (`server_name), `Value) ))==0){
Popup::Warning (_("Enter a valid server name."));
return false;
}
@@ -2626,8 +2628,17 @@
if (ret == `ok)
{
string uri = (string)UI::QueryWidget (`id (`connection_type), `Value);
- y2milestone("changed uri %1 to %2", Printer::printer["uri"]:"", uri);
- Printer::printer["uri"] = uri;
+ // backend validation (bnc#388575)
+ string cmd = "lpinfo -h localhost -v | cut -s -d ' ' -f2 | cut -d ':' -f1 | sort -u";
+ map exec = (map)SCR::Execute(.target.bash_output, cmd);
+ if (exec["exit"]:-1==0){
+ list<string> backends = filter(string key, splitstring(exec["stdout"]:"", "\n"), {return (size(key)>0);});
+ if (!contains(backends, splitstring(uri, ":")[0]:"")) {
+ Popup::Warning(_("Selected backend is not valid!"));
+ } else Printer::printer["uri"] = uri;
+ } else y2warning("validation script failed : %1", exec["exit"]:-1);
+ y2milestone("new backend %1", splitstring(uri, ":")[0]:"");
+ y2milestone("changed uri %1 to %2", Printer::printer["uri"]:"", uri);
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-printer-2.16.32/src/modules/Printerlib.ycp new/yast2-printer-2.17.1/src/modules/Printerlib.ycp
--- old/yast2-printer-2.16.32/src/modules/Printerlib.ycp 2008-06-02 11:10:24.000000000 +0200
+++ new/yast2-printer-2.17.1/src/modules/Printerlib.ycp 2008-06-10 13:59:54.000000000 +0200
@@ -11,7 +11,7 @@
* Authors:
* Petr Blahos
*
- * $Id: Printerlib.ycp 47791 2008-05-22 12:10:12Z mzugec $
+ * $Id: Printerlib.ycp 48213 2008-06-10 17:30:08Z mzugec $
*
* Printer library exported functions. What else?!?
*/
@@ -153,12 +153,11 @@
define void wakeUpEpson (string device) ``{
string sequence =
"\"\\000\\000\\000\\033\\001\\100\\105\\112\\114\\040\\061\\062\\070\\064\\056\\064\\012\\100\\105\\112\\114\\040\\040\\040\\040\\040\\012\"";
- if (haskey ((map)SCR::Read (.proc.modules), "usblp"))
- SCR::Execute (.target.bash, sformat ("
-MAIN_PID=$$
-{ /bin/echo -en %1 > %2 ; kill $MAIN_PID; } &
-ECHO_PID=$!
-{ sleep 2s; kill $ECHO_PID &>/dev/null; } &", sequence, device));
+ if (haskey ((map)SCR::Read (.proc.modules), "usblp")){
+ integer id = (integer)SCR::Execute(.process.start_shell, sformat ("echo -en %1 > %2 ", sequence, device ));
+ sleep(2*1000);
+ if ((boolean)SCR::Read(.process.running, id)) SCR::Execute(.process.kill, id);
+ }
}
/**
@@ -191,6 +190,23 @@
return ptal_devs;
}
+global string getSupportStatus(map printer){
+string support="";
+ string model = String::CutBlanks(printer["device"]: printer["ppd_info", "model"]:"");
+ if (size(model)==0) y2warning("Couldn't detect model from %1", printer);
+ else {
+ string command = sformat("grep '%1' %2|tr -d '\n'", model, "/usr/share/YaST2/data/printer/printers_support");
+ y2internal("executing command %1", command);
+ map cmd = (map)SCR::Execute(.target.bash_output, command);
+ y2internal("%1", cmd);
+ if (cmd["exit"]:-1==0) {
+ support = splitstring(cmd["stdout"]:"", "|")[2]:"";
+ }
+ }
+ return support;
+}
+
+
boolean last_op_canceled=false;
include "packages/common.ycp";
global define boolean installHplip(){
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-printer-2.16.32/src/modules/Printer.ycp new/yast2-printer-2.17.1/src/modules/Printer.ycp
--- old/yast2-printer-2.16.32/src/modules/Printer.ycp 2008-06-02 11:27:12.000000000 +0200
+++ new/yast2-printer-2.17.1/src/modules/Printer.ycp 2008-06-10 13:59:54.000000000 +0200
@@ -12,7 +12,7 @@
* Petr Blahos
* Jiri Srain
*
- * $Id: Printer.ycp 47978 2008-06-02 09:27:11Z mzugec $
+ * $Id: Printer.ycp 48213 2008-06-10 17:30:08Z mzugec $
*
* Well we all know what modules are for.
*/
@@ -2099,30 +2099,16 @@
* @param det map of detected printer
*/
global define void editDetected (map det) ``{
- // (FaTE#120083) Avoid the Automated Setup For "Non-Recommended" Printers
- boolean problematic = false;
- string model = String::CutBlanks(det["device"]: det["ppd_info", "model"]:"");
- if (size(model)==0) y2warning("Couldn't detect model from %1", det);
- else {
- string command = sformat("grep '%1' %2|tr -d '\n'", model, "/usr/share/YaST2/data/printer/printers_support");
- y2internal("executing command %1", command);
- map cmd = (map)SCR::Execute(.target.bash_output, command);
- y2internal("%1", cmd);
- if (cmd["exit"]:-1==0) {
- string status = splitstring(cmd["stdout"]:"", "|")[2]:"";
+ string status = Printerlib::getSupportStatus(det);
if (status!="full" && size(status)>0){
- problematic=true;
- Popup::Warning(sformat("%1 %2 %3 '%4'", _("Selected printer"), splitstring(cmd["stdout"]:"", "|")[1]:"", _("will not be autoconfigured\n because it's not fully supported. Supported status is"), status));
+ Popup::Warning(sformat("%1 %2 %3 '%4'", _("Selected printer"), det["info"]:"", _("is not fully supported. Supported status is"), status));
}
- }
- }
Printerdb::InstallDrivers ();
index = -1;
y2debug ("Editing printer %1", det);
-y2internal ("Editing printer %1", det);
-string vendor = det["vendor_db"]: det["ppd_info", "manufacturer_db"]:"";
-string device = det["device_db"]: det["ppd_info", "model_db"]:"";
- string filename = (problematic) ? "" : Printerdb::getAutoPpdFile ( vendor, device );
+ string vendor = det["vendor_db"]: det["ppd_info", "manufacturer_db"]:"";
+ string device = det["device_db"]: det["ppd_info", "model_db"]:"";
+ string filename = Printerdb::getAutoPpdFile ( vendor, device );
y2debug ("Filename: %1", filename);
printer = $[
"detected" : det,
@@ -2172,17 +2158,20 @@
foreach (map i, autodetected, ``{
if (!alreadyConfigured (i["unique_key"]:""))
{
- editDetected (i);
- string vdb = printer["detected", "vendor_db"]:"";
- string mdb = printer["detected", "device_db"]:"";
- string ppd_file = Printerdb::getAutoPpdFile (vdb, mdb);
- string support = Printerdb::foomatic[vdb, mdb, `support]:"";
- boolean configure = (support == "full" || support == "partially"
+ // (FaTE#120083) Avoid the Automated Setup For "Non-Recommended" Printers
+ string support_status = Printerlib::getSupportStatus(i);
+ if (support_status=="full" || support_status==""){
+ editDetected (i);
+ string vdb = printer["detected", "vendor_db"]:"";
+ string mdb = printer["detected", "device_db"]:"";
+ string ppd_file = Printerdb::getAutoPpdFile (vdb, mdb);
+ string support = Printerdb::foomatic[vdb, mdb, `support]:"";
+ boolean configure = (support == "full" || support == "partially"
|| support == "");
- if (i["detected", "ptal_manual"]:false)
+ if (i["detected", "ptal_manual"]:false)
configure = false;
- if (ppd_file != nil && configure)
- {
+ if (ppd_file != nil && configure)
+ {
boolean ok = true;
if (printer["name"]:"" == "")
{
@@ -2208,7 +2197,8 @@
storePrinter ();
}
}
- }
+ } else y2warning (sformat("%1 %2", _("Printer will not be proposed because support status is : "), support_status));
+ }
});
assignDefault ();
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-printer-2.16.32/testsuite/tests/detectPrinters.out new/yast2-printer-2.17.1/testsuite/tests/detectPrinters.out
--- old/yast2-printer-2.16.32/testsuite/tests/detectPrinters.out 2008-04-24 09:51:50.000000000 +0200
+++ new/yast2-printer-2.17.1/testsuite/tests/detectPrinters.out 2008-06-10 13:44:05.000000000 +0200
@@ -26,7 +26,9 @@
Read .target.size "/usr/lib/cups/backend/usb" -1
Execute .target.bash "grep '^usblp ' /proc/modules" 0
Read .proc.modules $["usblp":""]
-Execute .target.bash "\nMAIN_PID=$$\n{ /bin/echo -en \"\\000\\000\\000\\033\\001\\100\\105\\112\\114\\040\\061\\062\\070\\064\\056\\064\\012\\100\\105\\112\\114\\040\\040\\040\\040\\040\\012\" > /dev/usblp0 ; kill $MAIN_PID; } &\nECHO_PID=$!\n{ sleep 2s; kill $ECHO_PID &>/dev/null; } &" 0
+Execute .process.start_shell "echo -en \"\\000\\000\\000\\033\\001\\100\\105\\112\\114\\040\\061\\062\\070\\064\\056\\064\\012\\100\\105\\112\\114\\040\\040\\040\\040\\040\\012\" > /dev/usblp0 " 0
+Read .process.running 0 true
+Execute .process.kill 0 0
Read .ppd.db.vendorname "Epson" ""
Read .ppd.db.modelname ["Epson", "USB Printer"] ""
Execute .target.bash "grep '^usblp ' /proc/modules" 0
@@ -37,7 +39,9 @@
Read .target.size "/usr/lib/cups/backend/usb" -1
Execute .target.bash "grep '^usblp ' /proc/modules" 0
Read .proc.modules $["usblp":""]
-Execute .target.bash "\nMAIN_PID=$$\n{ /bin/echo -en \"\\000\\000\\000\\033\\001\\100\\105\\112\\114\\040\\061\\062\\070\\064\\056\\064\\012\\100\\105\\112\\114\\040\\040\\040\\040\\040\\012\" > /dev/usblp0 ; kill $MAIN_PID; } &\nECHO_PID=$!\n{ sleep 2s; kill $ECHO_PID &>/dev/null; } &" 0
+Execute .process.start_shell "echo -en \"\\000\\000\\000\\033\\001\\100\\105\\112\\114\\040\\061\\062\\070\\064\\056\\064\\012\\100\\105\\112\\114\\040\\040\\040\\040\\040\\012\" > /dev/usblp0 " 0
+Read .process.running 0 true
+Execute .process.kill 0 0
Read .ppd.db.vendorname "Epson" ""
Read .ppd.db.modelname ["Epson", "USB Printer"] ""
Execute .target.bash "grep '^usblp ' /proc/modules" 0
@@ -49,7 +53,9 @@
Execute .target.bash_output "/usr/lib/cups/backend/usb" $["exit":0, "stderr":"", "stdout":"direct usb://EPSON/Stylus%20Photo%20810?serial=W33040110201335050 \"EPSON Stylus Photo 810\" \"USB Printer #1\"\ndirect usb:/dev/usb/lp1 \"Unknown\" \"USB Printer #2\"\ndirect usb:/dev/usb/lp2 \"Unknown\" \"USB Printer #3\""]
Execute .target.bash "grep '^usblp ' /proc/modules" 0
Read .proc.modules $["usblp":""]
-Execute .target.bash "\nMAIN_PID=$$\n{ /bin/echo -en \"\\000\\000\\000\\033\\001\\100\\105\\112\\114\\040\\061\\062\\070\\064\\056\\064\\012\\100\\105\\112\\114\\040\\040\\040\\040\\040\\012\" > /dev/usblp0 ; kill $MAIN_PID; } &\nECHO_PID=$!\n{ sleep 2s; kill $ECHO_PID &>/dev/null; } &" 0
+Execute .process.start_shell "echo -en \"\\000\\000\\000\\033\\001\\100\\105\\112\\114\\040\\061\\062\\070\\064\\056\\064\\012\\100\\105\\112\\114\\040\\040\\040\\040\\040\\012\" > /dev/usblp0 " 0
+Read .process.running 0 true
+Execute .process.kill 0 0
Read .ppd.db.vendorname "Epson" ""
Read .ppd.db.modelname ["Epson", "Stylus Photo 810"] ""
Execute .target.bash "grep '^usblp ' /proc/modules" 0
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-printer-2.16.32/VERSION new/yast2-printer-2.17.1/VERSION
--- old/yast2-printer-2.16.32/VERSION 2008-06-02 11:22:49.000000000 +0200
+++ new/yast2-printer-2.17.1/VERSION 2008-06-11 14:00:39.000000000 +0200
@@ -1 +1 @@
-2.16.32
+2.17.1
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org