Hello community,
here is the log from the commit of package yast2-printer
checked in at Mon Sep 4 12:36:18 CEST 2006.
--------
--- yast2-printer/yast2-printer.changes 2006-08-18 09:48:55.000000000 +0200
+++ yast2-printer/yast2-printer.changes 2006-09-04 08:47:32.000000000 +0200
@@ -1,0 +2,6 @@
+Fri Sep 1 17:38:38 CEST 2006 - mzugec@suse.cz
+
+-fixed #116446, #115888, #175323 - hp:// backend
+ + testsuite change for CUPS1.2
+
+-------------------------------------------------------------------
Old:
----
yast2-printer-2.13.23.tar.bz2
New:
----
yast2-printer-2.14.2.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-printer.spec ++++++
--- /var/tmp/diff_new_pack.j9bZwu/_old 2006-09-04 12:36:09.000000000 +0200
+++ /var/tmp/diff_new_pack.j9bZwu/_new 2006-09-04 12:36:09.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-printer (Version 2.13.23)
+# spec file for package yast2-printer (Version 2.14.2)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
# norootforbuild
Name: yast2-printer
-Version: 2.13.23
+Version: 2.14.2
Release: 1
License: GPL
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-printer-2.13.23.tar.bz2
+Source0: yast2-printer-2.14.2.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-devtools yast2-testsuite
Requires: yast2 netcat zlib blocxx
@@ -33,7 +33,7 @@
%prep
-%setup -n yast2-printer-2.13.23
+%setup -n yast2-printer-2.14.2
%build
%{prefix}/bin/y2tool y2autoconf
@@ -99,6 +99,9 @@
%doc %{prefix}/share/doc/packages/yast2-printer
%changelog -n yast2-printer
+* Fri Sep 01 2006 - mzugec@suse.cz
+-fixed #116446, #115888, #175323 - hp:// backend
+ + testsuite change for CUPS1.2
* Fri Aug 18 2006 - jsrain@suse.cz
- fixed building documentation
- 2.13.23
++++++ yast2-printer-2.13.23.tar.bz2 -> yast2-printer-2.14.2.tar.bz2 ++++++
++++ 4529 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.13.23/VERSION new/yast2-printer-2.14.2/VERSION
--- old/yast2-printer-2.13.23/VERSION 2006-08-18 09:02:45.000000000 +0200
+++ new/yast2-printer-2.14.2/VERSION 2006-09-01 17:38:03.000000000 +0200
@@ -1 +1 @@
-2.13.23
+2.14.2
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.13.23/configure.in new/yast2-printer-2.14.2/configure.in
--- old/yast2-printer-2.13.23/configure.in 2006-08-18 09:32:26.000000000 +0200
+++ new/yast2-printer-2.14.2/configure.in 2006-09-04 08:39:50.000000000 +0200
@@ -1,9 +1,9 @@
dnl configure.in for yast2-printer
dnl
-dnl -- This file is generated by y2autoconf 2.13.18 - DO NOT EDIT! --
+dnl -- This file is generated by y2autoconf 2.13.21 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-printer, 2.13.23, http://bugs.opensuse.org/, yast2-printer)
+AC_INIT(yast2-printer, 2.14.2, http://bugs.opensuse.org/, yast2-printer)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -17,7 +17,7 @@
AM_INIT_AUTOMAKE(tar-ustar) dnl searches for some needed programs
dnl Important YaST2 variables
-VERSION="2.13.23"
+VERSION="2.14.2"
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.13.23/src/common/dialogs-connection.ycp new/yast2-printer-2.14.2/src/common/dialogs-connection.ycp
--- old/yast2-printer-2.13.23/src/common/dialogs-connection.ycp 2006-08-18 09:02:03.000000000 +0200
+++ new/yast2-printer-2.14.2/src/common/dialogs-connection.ycp 2006-09-01 17:39:12.000000000 +0200
@@ -9,7 +9,7 @@
* Petr Blahos
* Jiri Srain
*
- * $Id: dialogs-connection.ycp 32291 2006-08-09 17:08:00Z mzugec $
+ * $Id: dialogs-connection.ycp 32676 2006-09-01 15:40:46Z mzugec $
*
*/
{
@@ -427,7 +427,11 @@
`Left (`RadioButton (`id (`bluetooth),
// radio button
_("Blue&tooth Printer"),
- selected == `bluetooth))
+ selected == `bluetooth)),
+ `Left (`RadioButton (`id (`hp),
+ // radio button
+ _("&hplip backend for HP devices"),
+ selected == `hp))
))
));
}
@@ -470,19 +474,20 @@
define symbol runLocalConnectionDialog () ``{
symbol selected = `parallel;
string uri_type = Printerlib::getUriType (Printer::printer["uri"]:"");
- if (uri_type == "irda")
- selected = `irda;
- else if (uri_type == "bluetooth")
- selected = `bluetooth;
- else if (uri_type == "serial")
- selected = `serial;
- else if (uri_type == "usb")
- selected = `usb;
- if (contains ([`parallel, `irda, `bluetooth, `serial, `usb],
- Printer::connection_subtype_selected))
- {
- selected = Printer::connection_subtype_selected;
+ switch(uri_type){
+ case "irda" : selected = `irda;
+ break;
+ case "bluetooth" : selected = `bluetooth;
+ break;
+ case "serial" : selected = `serial;
+ break;
+ case "usb" : selected = `usb;
+ break;
+ case "hp" : selected = `hp;
+ break;
}
+ if (contains ([`parallel, `irda, `bluetooth, `serial, `usb], Printer::connection_subtype_selected))
+ { selected = Printer::connection_subtype_selected; }
term items = `VBox (
`Left (`RadioButton (`id (`parallel),
@@ -504,7 +509,11 @@
`Left (`RadioButton (`id (`bluetooth),
// radio button
_("Blue&tooth Printer"),
- selected == `bluetooth))
+ selected == `bluetooth)),
+ `Left (`RadioButton (`id (`hp),
+ // radio button
+ _("&hplip backend for HP devices"),
+ selected == `hp))
);
// dialog caption
return runGenericConnectionTypeDialog (items, _("Printer Type"),
@@ -652,13 +661,11 @@
define symbol runDeviceDialog (string type) ``{
boolean problematic_usb = false;
string uri = Printer::printer["tmpuri"]:"";
- if ("" == uri)
- uri = Printer::printer["uri"]:"parallel";
- if ("" == type)
- {
- type = Printerlib::getUriType ("uri");
- }
- string device = Printerlib::getUriDevice (uri);
+ if ("" == uri) uri = Printer::printer["uri"]:"parallel";
+ if ("" == type) type = Printerlib::getUriType ("uri");
+ string device = "";
+ if (type !="hp") Printerlib::getUriDevice (uri);
+
list<string> devices = [];
path read_devs = "parallel" == type
? .proc.parport.devices
@@ -671,16 +678,11 @@
);
integer baudrate = Printerlib::getUriBaudrate (uri);
string ser_settings = Printerlib::getUriValue (uri, "ty");
- if (0 == baudrate && -1 == Printer::index)
- baudrate = 9600;
+ if (0 == baudrate && -1 == Printer::index) baudrate = 9600;
integer i = search (device, "?");
- if (nil != i)
- device = substring (device, 0, i);
- if ("irda" != type && "bluetooth" != type)
- devices = (list<string>)SCR::Read (read_devs);
- else
- devices = [];
-
+ if (nil != i) device = substring (device, 0, i);
+ if ("irda" != type && "bluetooth" != type && type != "hp") devices = (list<string>)SCR::Read (read_devs);
+ else devices = [];
map cups_devices_mapping = $[];
if (type == "usb" && Spooler::Get () == "cups")
@@ -698,14 +700,8 @@
problematic_usb = true;
list problematic = CUPS::GetProblematicCupsUsbDevices ();
devices = maplist (list d, Printerlib::GetCupsUsbDevicesInfo (), ``{
- if (contains (problematic, d))
- {
- return d[2]:"";
- }
- else
- {
- return d[0]:"";
- }
+ if (contains (problematic, d)) return d[2]:"";
+ else return d[0]:"";
});
}
}
@@ -740,12 +736,12 @@
{
devices = ["/dev/irlpt0", "/dev/irlpt1", "/dev/irlpt2",
"/dev/irlpt3"];
- }
+ } else if (type == "hp"){
+ devices = maplist (list d, Printerlib::getHplipDevices (), ``{ return d[0]:""; });
+ }
}
- if (type != Printerlib::getUriType (uri))
- device = "";
- if (device == "")
- device = devices[0]:"";
+ if (type != Printerlib::getUriType (uri)) device = "";
+ if (device == "") device = devices[0]:"";
list device_val = getDevicesItems (devices, device);
/* if (size (device_val) == 0)
{
@@ -755,7 +751,6 @@
// PushButton
`HBox (`HStretch (), `PushButton (`id (`details), _("&Other...")))
);
-
if ("parallel" == type || "serial" == type)
{
if (!Mode::config ())
@@ -908,14 +903,11 @@
ret = nil;
}
}
- } until (ret == `abort || ret == `back || ret == `next
- || `ppdetails == ret || `spdetails == ret);
+ } until (ret == `abort || ret == `back || ret == `next || `ppdetails == ret || `spdetails == ret);
if (`spdetails == ret)
{
uri = type + ":" + device;
- if ("serial" == type)
- uri = uri + sformat ("?baudrate=%1+ty=%2", baudrate,
- ser_settings);
+ if ("serial" == type) uri = uri + sformat ("?baudrate=%1+ty=%2", baudrate, ser_settings);
Printer::printer = add (Printer::printer, "tmpuri", uri);
}
else
@@ -926,12 +918,8 @@
if (`next == ret)
{
uri = type + ":" + device;
- if ("serial" == type)
- uri = uri + sformat ("?baudrate=%1+ty=%2", baudrate,
- ser_settings);
- else if (type == "bluetooth")
- uri = type + "://" + filterchars (device,
- "0123456789aAbBcCdDeEfF");
+ if ("serial" == type) uri = uri + sformat ("?baudrate=%1+ty=%2", baudrate, ser_settings);
+ else if (type == "bluetooth") uri = type + "://" + filterchars (device, "0123456789aAbBcCdDeEfF");
Printer::printer["uri"] = uri;
}
return ret;
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.13.23/src/common/dialogs.ycp new/yast2-printer-2.14.2/src/common/dialogs.ycp
--- old/yast2-printer-2.13.23/src/common/dialogs.ycp 2006-06-26 08:24:37.000000000 +0200
+++ new/yast2-printer-2.14.2/src/common/dialogs.ycp 2006-09-01 17:39:12.000000000 +0200
@@ -8,7 +8,7 @@
* Authors:
* Petr Blahos
*
- * $Id: dialogs.ycp 31303 2006-06-02 16:46:50Z mzugec $
+ * $Id: dialogs.ycp 32676 2006-09-01 15:40:46Z mzugec $
* Main dialogs.
*/
{
@@ -1416,8 +1416,7 @@
nick,
lang)
);
- if (config_text == "")
- config_text = _("Unknown");
+ if (config_text == "") config_text = _("Unknown");
string name_text = Printer::printer["name"]:"";
string connection_text = "";
@@ -1461,13 +1460,12 @@
items = add (items, `item (`id (`state), _("State and banner settings"), ""));
}
}
-if (Printer::printer["ppd_info"]:nil == nil)
+ if (Printer::printer["ppd_info"]:nil == nil)
{
Printer::printer["ppd_info"] = Printer::printer["detected", "ppd_info"]:$[];
Printer::printer["valid"] = Printer::printer["detected", "valid"]:false;
Printer::printer["ppd"] = Printer::printer["detected", "ppd"]:"";
}
-
term allow_cbox = Printer::index >= 0 && Spooler::Get () != "cups"
? `VBox (
`Left (`CheckBox (`id (`yast), `opt (`notify),
@@ -1598,7 +1596,8 @@
"serial" : `con_local,
"usb" : `con_local,
"irda" : `con_local,
- "bluetooth" : `con_local
+ "bluetooth" : `con_local,
+ "hp" : `con_local
];
if (uri_type == "ipp")
{
@@ -2162,13 +2161,10 @@
*/
void SetHWDialogData () {
string new_spooler = Spooler::Get ();
- if (new_spooler == "cups" && CUPS::InstallationType () == `client)
- {
- new_spooler = "cups-client";
- }
-y2milestone("%1", new_spooler);
- list < map > printers = [];
- if (new_spooler == "cups")
+ if (new_spooler == "cups" && CUPS::InstallationType () == `client) new_spooler = "cups-client";
+ y2milestone("%1", new_spooler);
+ list < map > printers = [];
+ if (new_spooler == "cups")
{
list < map > items = maplist (map i, Printer::printcap, ``{
y2milestone("printcap %1", i);
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.13.23/src/common/misc.ycp new/yast2-printer-2.14.2/src/common/misc.ycp
--- old/yast2-printer-2.13.23/src/common/misc.ycp 2006-06-26 08:24:37.000000000 +0200
+++ new/yast2-printer-2.14.2/src/common/misc.ycp 2006-09-01 17:39:12.000000000 +0200
@@ -12,7 +12,7 @@
* Petr Blahos
* Jiri Srain 2002
*
- * $Id: misc.ycp 31303 2006-06-02 16:46:50Z mzugec $
+ * $Id: misc.ycp 32676 2006-09-01 15:40:46Z mzugec $
*
* Miscelaneous defines.
*/
@@ -231,25 +231,19 @@
* @param unique_key string unique_key of the printer
* @return boolean true if already configured
*/
- define boolean isPrinterConfigured (string manuf, string model,
- string uri, string unique_key)
+ define boolean isPrinterConfigured (string manuf, string model, string uri, string unique_key)
``{
string manuf_db = (string)SCR::Read (.ppd.db.vendorname, manuf);
- string model_db = (string)SCR::Read (.ppd.db.modelname,
- [manuf_db, model]);
+ string model_db = (string)SCR::Read (.ppd.db.modelname, [manuf_db, model]);
boolean exists = false;
-
foreach (map p, Printer::printcap, ``{
if ((p["unique_key"]:"" == unique_key && unique_key != "")
|| (p["uri"]:"" == uri && uri != ""
- && ((p["ppd_info", "manufacturer_db"]:".." == manuf_db
- && p["ppd_info", "model_db"]:".." == model_db)
- || (p["ppd_info", "manufacturer"]:".." == manuf
- && p["ppd_info", "model"]:".." == model))
- ))
- {
- exists = true;
- }
+ && ((p["ppd_info", "manufacturer_db"]:".." == manuf_db && p["ppd_info", "model_db"]:".." == model_db)
+ || (p["ppd_info", "manufacturer"]:".." == manuf && p["ppd_info", "model"]:".." == model))
+ )) exists = true;
+ else if ((manuf == "HEWLETT-PACKARD" && p["ppd_info", "manufacturer"]:""=="HP")&&
+ (toupper(deletechars(model, " ")) == toupper(deletechars(p["ppd_info", "model"]:"", " ")))) exists = true;
});
return exists;
}
@@ -520,18 +514,16 @@
list device_val = [];
boolean default_selected = false;
foreach (string dev, devices, ``{
- boolean this_is_selected = (("" != device && dev == device)
- || ("" == device));/* && (
+ boolean this_is_selected = (("" != device && dev == device) || ("" == device));
+ /* && (
dev == "/dev/lp0"
|| dev == "/dev/usblp0"
|| dev == "/dev/usb/lp0"
|| dev == "/dev/ttyS0")));*/
- if (this_is_selected)
- default_selected = true;
+ if (this_is_selected) default_selected = true;
device_val = add (device_val, `item (`id (dev), Printerlib::getDeviceNiceName (dev, false), this_is_selected));
});
- if (!default_selected && device != "")
- device_val = add (device_val, `item (`id (device), device, true));
+ if (!default_selected && device != "") device_val = add (device_val, `item (`id (device), device, true));
return device_val;
}
/**
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.13.23/src/common/wizards.ycp new/yast2-printer-2.14.2/src/common/wizards.ycp
--- old/yast2-printer-2.13.23/src/common/wizards.ycp 2006-06-26 08:24:37.000000000 +0200
+++ new/yast2-printer-2.14.2/src/common/wizards.ycp 2006-09-01 17:39:12.000000000 +0200
@@ -9,7 +9,7 @@
* Petr Blahos
* Jiri Srain
*
- * $Id: wizards.ycp 31303 2006-06-02 16:46:50Z mzugec $
+ * $Id: wizards.ycp 32676 2006-09-01 15:40:46Z mzugec $
*/
{
textdomain "printer";
@@ -73,6 +73,7 @@
"usb" : ``(runDeviceDialog ("usb")),
"irda" : ``(runDeviceDialog ("irda")),
"bluetooth" : ``(runDeviceDialog ("bluetooth")),
+ "hp" : ``(runDeviceDialog ("hp")),
// special
"ppdetails" : ``(editParallelPort ()),
"spdetails" : ``(editSerialPort ()),
@@ -195,6 +196,7 @@
`usb : "usb",
`irda : "irda",
`bluetooth : "bluetooth",
+ `hp : "hp",
`abort : `abort,
],
"parallel" : $[
@@ -212,6 +214,7 @@
"usb" : $[ `abort : `abort, `next : "edit", ],
"irda" : $[ `next : "edit", `abort : `abort, ],
"bluetooth" : $[ `next : "edit", `abort : `abort, ],
+ "hp" : $[ `next : "edit", `abort : `abort, ],
"lpd" : $[ `abort: `abort, `next: "edit", ],
"pipe" : $[ `abort : `abort, `next : "edit", ],
"model" : $[
@@ -287,6 +290,7 @@
`usb: "usb",
`irda: "irda",
`bluetooth: "bluetooth",
+ `hp : "hp"
],
"add_remote_printer" : $[
`abort : `abort,
@@ -336,6 +340,7 @@
"usb" : $[ `next : "name_auto", `abort : `abort, ],
"irda" : $[ `next : "name_auto", `abort : `abort, ],
"bluetooth" : $[ `next : "name_auto", `abort : `abort, ],
+ "hp" : $[ `next : "name_auto", `abort : `abort, ],
"samba" : $[ `next : "name_auto", `abort : `abort, ],
"novell" : $[ `next : "name_auto", `abort : `abort, ],
"lpd" : $[ `next : "name_auto", `abort : `abort, ],
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.13.23/src/modules/CUPS.ycp new/yast2-printer-2.14.2/src/modules/CUPS.ycp
--- old/yast2-printer-2.13.23/src/modules/CUPS.ycp 2006-08-18 09:02:04.000000000 +0200
+++ new/yast2-printer-2.14.2/src/modules/CUPS.ycp 2006-08-28 11:13:23.000000000 +0200
@@ -11,7 +11,7 @@
* Authors:
* Jiri Srain
*
- * $Id: CUPS.ycp 32262 2006-08-09 12:10:10Z mzugec $
+ * $Id: CUPS.ycp 32589 2006-08-28 09:14:57Z mzugec $
*
* Printer library exported functions. What else?!?
*/
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.13.23/src/modules/Printer.ycp new/yast2-printer-2.14.2/src/modules/Printer.ycp
--- old/yast2-printer-2.13.23/src/modules/Printer.ycp 2006-08-18 09:02:04.000000000 +0200
+++ new/yast2-printer-2.14.2/src/modules/Printer.ycp 2006-09-01 17:39:12.000000000 +0200
@@ -12,7 +12,7 @@
* Petr Blahos
* Jiri Srain
*
- * $Id: Printer.ycp 32262 2006-08-09 12:10:10Z mzugec $
+ * $Id: Printer.ycp 32676 2006-09-01 15:40:46Z mzugec $
*
* Well we all know what modules are for.
*/
@@ -1520,7 +1520,6 @@
CUPS::server_hostname = "";
CUPS::SaveServerHostName ();
CUPS::WriteCupsSettings ();
- Printerlib::writeHplip();
if (((map)SCR::Execute(.target.bash_output,
"diff /etc/cups/cupsd.conf /etc/cups/cupsd.conf.old|grep -c ''"))["stdout"]:"" != "0\n")
write_only=false;
@@ -1585,7 +1584,8 @@
Progress::set (progress_orig);
}
}
-
+ // enable/disable hplip service and restart spooler if (enable and wasn't enabled before)
+ if (Printerlib::setHplipStatus()) Spooler::restartServices (size (printcap)>0);
Progress::Finish (); // finished
if (testAbort ()) return false;
// progress step
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.13.23/src/modules/Printerdb.ycp new/yast2-printer-2.14.2/src/modules/Printerdb.ycp
--- old/yast2-printer-2.13.23/src/modules/Printerdb.ycp 2006-06-26 08:24:38.000000000 +0200
+++ new/yast2-printer-2.14.2/src/modules/Printerdb.ycp 2006-09-01 17:39:12.000000000 +0200
@@ -11,7 +11,7 @@
* Authors:
* Jiri Srain 2002
*
- * $Id: Printerdb.ycp 30871 2006-05-11 14:37:03Z mzugec $
+ * $Id: Printerdb.ycp 32676 2006-09-01 15:40:46Z mzugec $
*
*/
@@ -290,6 +290,7 @@
// bug #88286 - change media size to Letter, if US locales
+/*
if (checkLocale == true)
{
optlist = maplist (map o, optlist, ``{
@@ -307,7 +308,7 @@
return o;
});
}
-
+*/
return optlist;
}
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.13.23/src/modules/Printerlib.ycp new/yast2-printer-2.14.2/src/modules/Printerlib.ycp
--- old/yast2-printer-2.13.23/src/modules/Printerlib.ycp 2006-08-18 09:02:04.000000000 +0200
+++ new/yast2-printer-2.14.2/src/modules/Printerlib.ycp 2006-09-01 17:39:12.000000000 +0200
@@ -11,7 +11,7 @@
* Authors:
* Petr Blahos
*
- * $Id: Printerlib.ycp 32291 2006-08-09 17:08:00Z mzugec $
+ * $Id: Printerlib.ycp 32676 2006-09-01 15:40:46Z mzugec $
*
* Printer library exported functions. What else?!?
*/
@@ -78,18 +78,26 @@
global void readHplip(){
hplip_before = false;
- if (Service::Status("hplip")==3) hplip_before = true;
+ if (Service::Status("hplip")==0) hplip_before = true;
}
global void setHplip(boolean status){
hplip_status = status;
}
-global void writeHplip(){
- if (hplip_status == true) {
- if (hplip_before == false) Popup::Warning(_("Service hplip will be enabled because of hp:// backend"));
+global boolean setHplipStatus(){
+ map hptest = (map)SCR::Execute(.target.bash_output, "/usr/bin/lpstat -v | /bin/grep -q ': hp:/'");
+ if (hptest["exit"]:255 == 0) {
+ // bug #115888 /1 - user information that hplip will be enabled
+ if (hplip_before == false && !Mode::autoinst()) Popup::Warning(_("Service hplip will be enabled because hp:// backend is used."));
Service::Enable("hplip");
- } else Service::Disable("hplip");
+ Service::Start("hplip");
+ return true;
+ } else {
+ Service::Disable("hplip");
+ Service::Stop("hplip");
+ }
+ return false;
}
/**
@@ -211,7 +219,7 @@
global define list getHplipDevices () ``{
if (FileUtils::IsFile("/etc/init.d/hplip")){
boolean hplip_before = false;
- if (Service::Status("hplip")==3) hplip_before = true;
+ if (Service::Status("hplip")==0) hplip_before = true;
else Service::Start("hplip");
if (SCR::Read (.target.size, Arch::i386() ? "/usr/lib/cups/backend/hp" : "/usr/lib64/cups/backend/hp" ) <= 0)
return [];
@@ -403,12 +411,10 @@
* @see getUriType
*/
global define string getUriDevice (string uri) ``{
- if ("" == uri || nil == uri || nil == findfirstof (uri, ":"))
- return "";
+ if ("" == uri || nil == uri || nil == findfirstof (uri, ":")) return "";
string uri_type = getUriType (uri);
integer i = findfirstof (uri, ":");
- if (nil == i)
- return "";
+ if (nil == i) return "";
uri = substring (uri, i + 1);
if (uri_type == "bluetooth")
{
@@ -418,10 +424,9 @@
return uri;
}
if (uri_type != "usb")
- while ("//" == substring (uri, 0, 2))
- uri = substring (uri, 1);
+ while ("//" == substring (uri, 0, 2)) uri = substring (uri, 1);
i = findfirstof (uri, "?");
- if (nil != i && uri_type != "usb")
+ if (nil != i && uri_type != "usb" && uri_type != "hp")
uri = substring (uri, 0, i);
return 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.13.23/testsuite/tests/cupsWrite.out new/yast2-printer-2.14.2/testsuite/tests/cupsWrite.out
--- old/yast2-printer-2.13.23/testsuite/tests/cupsWrite.out 2006-06-26 08:24:47.000000000 +0200
+++ new/yast2-printer-2.14.2/testsuite/tests/cupsWrite.out 2006-09-01 17:12:46.000000000 +0200
@@ -16,6 +16,10 @@
Execute .target.bash "test -f /etc/init.d/lpd && /etc/init.d/lpd stop" 0
Execute .target.bash "test -f /etc/init.d/cups && /etc/init.d/cups stop" 0
Execute .target.bash "test -f /etc/init.d/cups && /etc/init.d/cups start" 0
+Execute .target.bash_output "/usr/bin/lpstat -v | /bin/grep -q ': hp:/'" $["exit":0, "srderr":"", "stdout":""]
+Execute .target.bash "test -f /etc/init.d/lpd && /etc/init.d/lpd stop" 0
+Execute .target.bash "test -f /etc/init.d/cups && /etc/init.d/cups stop" 0
+Execute .target.bash "test -f /etc/init.d/cups && /etc/init.d/cups start" 0
Return true
Dump ====================================================
Read .target.size "/var/run/listen_remote_ipp.pid" 555
@@ -41,5 +45,9 @@
Execute .target.bash "test -f /etc/init.d/lpd && /etc/init.d/lpd stop" 0
Execute .target.bash "test -f /etc/init.d/cups && /etc/init.d/cups stop" 0
Execute .target.bash "test -f /etc/init.d/cups && /etc/init.d/cups start" 0
+Execute .target.bash_output "/usr/bin/lpstat -v | /bin/grep -q ': hp:/'" $["exit":0, "srderr":"", "stdout":""]
+Execute .target.bash "test -f /etc/init.d/lpd && /etc/init.d/lpd stop" 0
+Execute .target.bash "test -f /etc/init.d/cups && /etc/init.d/cups stop" 0
+Execute .target.bash "test -f /etc/init.d/cups && /etc/init.d/cups start" 0
Return true
Dump ====================================================
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org