Hello community,
here is the log from the commit of package yast2-printer
checked in at Wed Apr 16 18:31:44 CEST 2008.
--------
--- yast2-printer/yast2-printer.changes 2008-04-15 08:52:59.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-printer/yast2-printer.changes 2008-04-16 18:01:51.000000000 +0200
@@ -1,0 +2,7 @@
+Wed Apr 16 19:57:42 CEST 2008 - mzugec@suse.cz
+
+- Avoid the Automated Setup For "Non-Recommended" Printers
+ (FaTE#120083)
+- 2.16.15
+
+-------------------------------------------------------------------
Old:
----
yast2-printer-2.16.14.tar.bz2
New:
----
yast2-printer-2.16.15.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-printer.spec ++++++
--- /var/tmp/diff_new_pack.n21244/_old 2008-04-16 18:30:27.000000000 +0200
+++ /var/tmp/diff_new_pack.n21244/_new 2008-04-16 18:30:27.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-printer (Version 2.16.14)
+# spec file for package yast2-printer (Version 2.16.15)
#
# 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.14
+Version: 2.16.15
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-printer-2.16.14.tar.bz2
+Source0: yast2-printer-2.16.15.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.14
+%setup -n yast2-printer-2.16.15
%build
%{prefix}/bin/y2tool y2autoconf
@@ -138,7 +138,12 @@
%doc %{prefix}/share/doc/packages/yast2-printer
%exclude %{prefix}/share/doc/packages/yast2-printer/COPYING
%exclude %{prefix}/share/doc/packages/yast2-printer/README
+
%changelog
+* Wed Apr 16 2008 mzugec@suse.cz
+- Avoid the Automated Setup For "Non-Recommended" Printers
+ (FaTE#120083)
+- 2.16.15
* Tue Apr 15 2008 jsuchome@suse.cz
- yast2-inetd required, fixed testsuite
- 2.16.14
++++++ yast2-printer-2.16.14.tar.bz2 -> yast2-printer-2.16.15.tar.bz2 ++++++
++++ 4943 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.14/configure.in new/yast2-printer-2.16.15/configure.in
--- old/yast2-printer-2.16.14/configure.in 2008-04-15 08:25:09.000000000 +0200
+++ new/yast2-printer-2.16.15/configure.in 2008-04-15 12:43:18.000000000 +0200
@@ -1,9 +1,9 @@
dnl configure.in for yast2-printer
dnl
-dnl -- This file is generated by y2autoconf 2.16.8 - DO NOT EDIT! --
+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.13, http://bugs.opensuse.org/, yast2-printer)
+AC_INIT(yast2-printer, 2.16.14, 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.13"
+VERSION="2.16.14"
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.14/src/common/dialogs.ycp new/yast2-printer-2.16.15/src/common/dialogs.ycp
--- old/yast2-printer-2.16.14/src/common/dialogs.ycp 2008-04-15 08:23:04.000000000 +0200
+++ new/yast2-printer-2.16.15/src/common/dialogs.ycp 2008-04-16 19:58:40.000000000 +0200
@@ -8,7 +8,7 @@
* Authors:
* Petr Blahos
*
- * $Id: dialogs.ycp 46617 2008-04-14 17:31:33Z mzugec $
+ * $Id: dialogs.ycp 46762 2008-04-16 15:58:33Z mzugec $
* Main dialogs.
*/
{
@@ -94,6 +94,7 @@
*/
`HBox(
`PushButton(`id(`cancel), Label::CancelButton()),
+ `HStretch(),
`PushButton(`id(`next), Label::OKButton()))
));
// dialog box label
@@ -219,7 +220,6 @@
ret = nil;
}
}
-y2internal("ret %1", ret);
if (ret == `next || ret == `select_ppd)
{
string ppd_file = Printerdb::getAutoPpdFile (manuf_db, model_db);
@@ -1107,7 +1107,6 @@
any ret = `opts;
// selection box label
UI::ReplaceWidget (`id (`upper), `SelectionBox (`id (`opts), `opt (`notify, `immediate), Label::Options (), opts));
-
UI::ChangeWidget (`id (`opts), `CurrentItem,
((map)SCR::Read (.ppd.file.options,[filename, ""]))[
"data", 0, "name"]:"");
@@ -1137,6 +1136,8 @@
});
UI::ReplaceWidget (`id (`lower),
getWidgetForOption (option_type, (list)vals));
+y2internal("vals %1", vals);
+y2internal("ppd_default %1", ppd_default);
string current = "";
if (option_loc == `lpoptions)
current = selected[option]:"";
@@ -1144,6 +1145,8 @@
current = ppd_selected[option]:"";
if (current == "")
current = ppd_default;
+y2internal("current %1", current);
+y2internal("ppd_selected %1", ppd_selected);
if (option_type == "Boolean")
{
integer index = -1;
@@ -2022,7 +2025,9 @@
if (rebuild_items){
list<term> items = buildItemsList((string)UI::QueryWidget(`filter, `Value));
UI::ChangeWidget (`id (`_hw_items), `Items, items);
+ if (size((items))>0) selected = tointeger( UI::QueryWidget(`id(`_hw_items), `CurrentItem));
}
+y2internal("selected %1", selected);
boolean editable = (selected==nil || selected==-1) ? false : true;
if (size((list<term>)UI::QueryWidget(`id (`_hw_items), `Items))>0)
{
@@ -2081,10 +2086,6 @@
ret=nil;
break;
// TODO handle all events here
- case `default_q :
- Printer::setDefaultPrinter ();
- ret = `restart_button;
- break;
case `add :
Printer::selectPrinter(-1);
ret = `configure_button;
@@ -2116,7 +2117,6 @@
}
});
Printer::editDetected(Printer::Detect()[from_detect]:$[]);
- y2milestone("Configuring detected, non-configured printer %1", Printer::Detect()[from_detect]:$[]);
}
if (Printer::printer["ppd_info", "model"]:nil == nil) ret=`edit_unconf;
else ret = `edit_button;
@@ -2279,7 +2279,7 @@
"widget" : `custom,
"custom_widget" :
`VBox(
- `Right(`ComboBox(`id(`filter), `opt(`notify, `immediate),
+ `Right(`ComboBox(`id(`filter), `opt(`notify),
"", ["Show all", "Local", "Remote"])),
`VWeight(2,`Table (`id (`_hw_items), `opt (`notify, `immediate),
`header(_("Queue Name"),_("Device"), _("Model"), _("Default Queue")))),
@@ -2289,7 +2289,7 @@
`PushButton (`id (`edit), _("Configure")),
`PushButton (`id (`delete), Label::DeleteButton ()),
`HStretch (),
- `PushButton (`id (`test), `opt(`notify, `immediate), _("Print test page"))
+ `PushButton (`id (`test), _("Print test page"))
)
),
// "init" : initOverview,
@@ -2485,7 +2485,7 @@
UI::ChangeWidget(`description, `Value, info);
UI::ChangeWidget(`location, `Value, loc);
UI::ChangeWidget(`default_printer, `Value, Printer::default_queue==Printer::printer["name"]:"");
- boolean has_ppd = (Printer::printer["raw"]:true==false);
+ boolean has_ppd = (Printer::printer["raw"]:false==false && size(Printer::printer["ppd"]:"")>0);
UI::ChangeWidget(`chb_driver, `Value, has_ppd);
if(has_ppd){
@@ -2554,7 +2554,7 @@
Printer::printer["bannerstart"] = (string) UI::QueryWidget(`start_banner, `Value);
Printer::printer["bannerend"] = (string) UI::QueryWidget(`end_banner, `Value);
- if((boolean)UI::QueryWidget(`default_printer, `Value)) Printer::default_queue = Printer::printer["name"]:"";
+ if((boolean)UI::QueryWidget(`default_printer, `Value)) Printer::setDefaultPrinter();
}
void initBasic(string key){
@@ -2562,13 +2562,16 @@
UI::ChangeWidget(`curr_conn, `Value, uri);
map selected = Printer::printer["options"]:$[];
map ppd_selected = Printer::printer["ppd_options"]:$[];
- UI::ChangeWidget(`model_name, `Value, Printer::printer["ppd_info", "nick"]:"");
+ UI::ChangeWidget(`model_name, `Value, sformat("%1 %2",
+ Printer::printer["ppd_info", "manufacturer"]:"",
+ Printer::printer["ppd_info", "model"]:""));
-
-Printerdb::InstallDrivers ();
+ Printerdb::InstallDrivers ();
Printerdb::loadFoomaticIfNeeded ();
- string manuf_db = Printer::printer["manuf_db"]:"";
- string model_db = Printer::printer["model_db"]:"";
+y2internal("printer %1", Printer::printer);
+ string manuf_db = Printer::printer["ppd_info", "manufacturer_db"]:"";
+ string model_db = Printer::printer["ppd_info", "model_db"]:"";
+y2internal("manuf_db %1, model_db %2", manuf_db, model_db);
list cfgs = [];
list<string> ppds = Printerdb::sortPpds (manuf_db, model_db);
foreach (string k, ppds, ``{
@@ -2581,7 +2584,13 @@
);
cfgs = add (cfgs, `item (`id (k), label));
});
-y2internal("cfgs %1", cfgs);
+ UI::ChangeWidget(`drivers, `Items, cfgs);
+ string file = Printerdb::getFileFromNickName (
+ manuf_db, model_db,
+ Printer::printer["ppd_info", "nick"]:"",
+ Printer::printer["ppd_info", "language"]:""
+ );
+ UI::ChangeWidget(`drivers, `CurrentItem, file);
}
symbol handleBasic(string key, map event){
@@ -2604,29 +2613,6 @@
initBasic("");
}
if (event["EventReason"]:""=="Activated" && event["ID"]:nil==`change_model){
- // selection box label
- term manufsel = `SelectionBox (`id (`manufsel), `opt (`notify, `immediate),
- // selection boc title
- _("Manufacturer"),
- maplist (string k, map v, Printerdb::foomatic, ``(
- `item (`id (k), v[`label]:k))));
- term contents =
- `ReplacePoint(`id(`contents),
- `VBox (`HBox (`HWeight (1, manufsel),
- `HWeight (1, `ReplacePoint (`id (`modelsel_rep), `HSpacing ()))),
- `HBox (
- `HStretch (),
-/*
- `MenuButton (`id (`other_ppd), _("Add &PPD File to Database"), [
- `item (`id (`specifyppd), _("&Local PPD File")),
- `item (`id (`downloadppd), _("&Download PPD File")),
- ]),
- `PushButton (`id (`select_ppd), _("Select PPD File")),
-*/
- `HBox(
- `PushButton(`id(`cancel), Label::CancelButton()),
- `PushButton(`id(`next), Label::OKButton()))
- )));
UI::OpenDialog( `ReplacePoint(`id(`contents), `Empty()));
ManufModelPopup();
UI::CloseDialog();
@@ -2639,6 +2625,30 @@
return nil;
}
+void storeBasic(string key, map event){
+ y2internal("changed ppd %1", UI::QueryWidget(`drivers, `CurrentItem));
+ string manuf_db = Printer::printer["ppd_info", "manufacturer_db"]:"";
+ string model_db = Printer::printer["ppd_info", "model_db"]:"";
+/*
+ string file = Printerdb::getFileFromNickName (
+ manuf_db, model_db,
+ Printer::printer["ppd_info", "nick"]:"",
+ Printer::printer["ppd_info", "language"]:""
+ );
+*/
+ string file = (string)UI::QueryWidget (`drivers, `CurrentItem);
+y2internal("new file %1", file);
+ Printer::printer["options"] = $[];
+ string filename = (string)SCR::Read (.ppd.file.open, [file, SCR::Read (.target.tmpdir)]);
+y2internal("filename %1", filename);
+ if (SCR::Read (.target.size, Printer::printer["ppd"]:"") != -1) SCR::Execute (.target.remove, Printer::printer["ppd"]:"");
+ Printer::printer["ppd"] = filename;
+ Printer::printer["ppd_info"] = Printerdb::PpdInfo (filename);
+ // add comment
+ if (Printer::printer["info"]:"" == "") Printer::printer["info"] = Printerdb::foomatic[manuf_db, model_db, file, "nickname"]:"";
+y2internal("printer %1", Printer::printer);
+}
+
void initStatus(string key){
boolean accept = Printer::printer["accepting"]:true;
UI::ChangeWidget(`job_status, `CurrentButton, accept ? `accept_job : `reject_job);
@@ -2800,6 +2810,7 @@
),
"init" : initBasic,
"handle" : handleBasic,
+ "store" : storeBasic,
/*
"init" : initServiceStatus,
"handle" : handleServiceStatus,
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.14/src/modules/Printerdb.ycp new/yast2-printer-2.16.15/src/modules/Printerdb.ycp
--- old/yast2-printer-2.16.14/src/modules/Printerdb.ycp 2007-12-03 09:25:10.000000000 +0100
+++ new/yast2-printer-2.16.15/src/modules/Printerdb.ycp 2008-04-16 19:58:41.000000000 +0200
@@ -11,7 +11,7 @@
* Authors:
* Jiri Srain 2002
*
- * $Id: Printerdb.ycp 42300 2007-11-21 17:16:43Z mzugec $
+ * $Id: Printerdb.ycp 46762 2008-04-16 15:58:33Z mzugec $
*
*/
@@ -431,8 +431,10 @@
* @return a list of sorted PPD nicknames
*/
global define list<string> sortPpds (string vendor_db, string device_db) {
+y2internal("vendor_db %1, device_db %2", vendor_db, device_db);
vendor_db = (string)SCR::Read (.ppd.db.vendorname, vendor_db);
device_db = (string)SCR::Read (.ppd.db.modelname, [vendor_db, device_db]);
+y2internal("vendor_db %1, device_db %2", vendor_db, device_db);
SCR::Execute (.target.bash, sformat (
"/usr/bin/touch %1/ppd_preference_list",
Printerlib::baseDataDir));
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.14/src/modules/Printerlib.ycp new/yast2-printer-2.16.15/src/modules/Printerlib.ycp
--- old/yast2-printer-2.16.14/src/modules/Printerlib.ycp 2008-04-15 08:23:04.000000000 +0200
+++ new/yast2-printer-2.16.15/src/modules/Printerlib.ycp 2008-04-16 19:58:41.000000000 +0200
@@ -11,7 +11,7 @@
* Authors:
* Petr Blahos
*
- * $Id: Printerlib.ycp 45881 2008-03-31 11:33:49Z mzugec $
+ * $Id: Printerlib.ycp 46762 2008-04-16 15:58:33Z mzugec $
*
* Printer library exported functions. What else?!?
*/
@@ -180,9 +180,9 @@
if (haskey ((map)SCR::Read (.proc.modules), "usblp"))
SCR::Execute (.target.bash, sformat ("
MAIN_PID=$$
-{/bin/echo -en %1 > %2 ; kill $MAIN_PID;} &
+{ /bin/echo -en %1 > %2 ; kill $MAIN_PID; } &
ECHO_PID=$!
-{sleep 2s ; kill $ECHO_PID &>/dev/null ;} &", sequence, device));
+{ sleep 2s; kill $ECHO_PID &>/dev/null; } &", sequence, device));
}
/**
@@ -374,7 +374,6 @@
}
map test_return = (map)SCR::Execute (.target.bash_output, test_command);
-y2internal("exit_code %1", test_return["exit"]:0);
integer tst = test_return["exit"]:0;
if (4 == tst && type == "ipp_server")
tst = 0;
@@ -655,8 +654,6 @@
{
string replaced = "";
map tokens = URL::Parse(device);
-y2internal("tokens %1", tokens);
-y2internal("device %1", device);
if (show_pass){
replaced = sformat("%1://", tokens["scheme"]:"");
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.14/src/modules/Printer.ycp new/yast2-printer-2.16.15/src/modules/Printer.ycp
--- old/yast2-printer-2.16.14/src/modules/Printer.ycp 2008-04-15 08:44:41.000000000 +0200
+++ new/yast2-printer-2.16.15/src/modules/Printer.ycp 2008-04-16 19:58:41.000000000 +0200
@@ -12,7 +12,7 @@
* Petr Blahos
* Jiri Srain
*
- * $Id: Printer.ycp 46617 2008-04-14 17:31:33Z mzugec $
+ * $Id: Printer.ycp 46762 2008-04-16 15:58:33Z mzugec $
*
* Well we all know what modules are for.
*/
@@ -2105,11 +2105,22 @@
* @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;
+ map cmd = (map)SCR::Execute(.target.bash_output, sformat("grep '%1' %2|tr -d '\n'", det["device"]:"",
+ "/usr/share/YaST2/data/printer/printers_support"));
+y2internal("%1", cmd);
+ if (cmd["exit"]:-1==0) {
+ string status = splitstring(cmd["stdout"]:"", "|")[2]:"";
+ if (status!="full"){
+ 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));
+ }
+ }
Printerdb::InstallDrivers ();
index = -1;
y2debug ("Editing printer %1", det);
- string filename = Printerdb::getAutoPpdFile (
- det["vendor_db"]:"", det["device_db"]:"");
+ string filename = (problematic) ? "" : Printerdb::getAutoPpdFile ( det["vendor_db"]:"", det["device_db"]:"" );
y2debug ("Filename: %1", filename);
printer = $[
"detected" : det,
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.14/VERSION new/yast2-printer-2.16.15/VERSION
--- old/yast2-printer-2.16.14/VERSION 2008-04-15 08:27:04.000000000 +0200
+++ new/yast2-printer-2.16.15/VERSION 2008-04-15 12:48:43.000000000 +0200
@@ -1 +1 @@
-2.16.14
+2.16.15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org