File disable_legacy_items_and_add_beh_requirement.diff of Package yast2-printer
--- src/include/printer/driveradd.rb.orig 2014-08-21 15:09:13.000000000 +0200
+++ src/include/printer/driveradd.rb 2014-09-05 10:47:32.000892515 +0200
@@ -180,17 +180,18 @@ module Yast
splix_installed
)
),
- Left(
- CheckBox(
- Id("m2300w"),
- # CheckBox to select or un-select the printer driver package m2300w.
- # There is no need to have the package name "m2300w" in this text
- # because it is shown in a separated column to the left of this text.
- "m2300&w : " +
- _("Driver for Konica Minolta 2300W and 2400W (unmaintained)"),
- m2300w_installed
- )
- ),
+ # Disabled legacy "Driver for Konica Minolta 2300W and 2400W (unmaintained)" so that it is no longer accessible in the dialog:
+ #Left(
+ # CheckBox(
+ # Id("m2300w"),
+ # # CheckBox to select or un-select the printer driver package m2300w.
+ # # There is no need to have the package name "m2300w" in this text
+ # # because it is shown in a separated column to the left of this text.
+ # "m2300&w : " +
+ # _("Driver for Konica Minolta 2300W and 2400W (unmaintained)"),
+ # m2300w_installed
+ # )
+ #),
Left(
CheckBox(
Id("epson-inkjet-printer-escpr"),
--- src/include/printer/connectionwizard.rb.orig 2013-11-25 14:45:24.000000000 +0100
+++ src/include/printer/connectionwizard.rb 2014-09-05 11:59:01.752892515 +0200
@@ -2039,135 +2039,160 @@ module Yast
)
end
when :beh
- uri = ""
- beh_do_not_disable = true
- beh_attempts = "0"
- beh_delay = "30"
- current_device_uri = getCurrentDeviceURI
- if "smb:/" ==
- Builtins.substring(current_device_uri, 0, Builtins.size("smb:/"))
- # so that it may have to be retrieved form /etc/cups/printers.conf:
- current_device_uri = getUriWithUsernameAndPassword(
- current_device_uri,
- "smb"
- )
- end
- if "novell:/" ==
- Builtins.substring(
+ if !Printerlib.TestAndInstallPackage("cups-backends", "installed")
+ if Popup.ContinueCancel(
+ _(
+ "To use 'beh', the RPM package cups-backends must be installed."
+ )
+ )
+ Printerlib.TestAndInstallPackage("cups-backends", "install")
+ # There is no "abort" functionality which does a sudden death of the whole module (see dialogs.ycp).
+ # Unfortunately when the YaST package installer is run via Printerlib::TestAndInstallPackage
+ # it leaves a misused "abort" button labeled "Skip Autorefresh" with WidgetID "`abort"
+ # so that this leftover "abort" button must be explicitly hidden here:
+ Wizard.HideAbortButton
+ end
+ # The user can also decide during the actual installation not to install it
+ # or the installation may have failed for whatever reason
+ # so that we test again whether or not it is now actually installed:
+ if !Printerlib.TestAndInstallPackage("cups-backends", "installed")
+ content = VBox(
+ Left(
+ Label(_("The RPM package cups-backends is not installed."))
+ )
+ )
+ end
+ else
+ uri = ""
+ beh_do_not_disable = true
+ beh_attempts = "0"
+ beh_delay = "30"
+ current_device_uri = getCurrentDeviceURI
+ if "smb:/" ==
+ Builtins.substring(current_device_uri, 0, Builtins.size("smb:/"))
+ # so that it may have to be retrieved form /etc/cups/printers.conf:
+ current_device_uri = getUriWithUsernameAndPassword(
current_device_uri,
- 0,
- Builtins.size("novell:/")
+ "smb"
)
- # so that it may have to be retrieved form /etc/cups/printers.conf:
- current_device_uri = getUriWithUsernameAndPassword(
- current_device_uri,
- "novell"
- )
- end
- # Even the DeviceURI for ipp/http can contain
- # fixed username and password for authentication in the form
- # ipp://username:password@ip-address-or-hostname/...
- # http://username:password@ip-address-or-hostname/...
- # but usage of this is really really not encouraged, see
- # https://bugzilla.novell.com/show_bug.cgi?id=512549
- # so that its setup not supported here but when
- # such an URI already exists, it should be shown correctly:
- if "ipp:/" ==
- Builtins.substring(current_device_uri, 0, Builtins.size("ipp:/"))
- # so that it may have to be retrieved form /etc/cups/printers.conf:
- current_device_uri = getUriWithUsernameAndPassword(
- current_device_uri,
- "ipp"
- )
- end
- if "http:/" ==
- Builtins.substring(current_device_uri, 0, Builtins.size("http:/"))
- # so that it may have to be retrieved form /etc/cups/printers.conf:
- current_device_uri = getUriWithUsernameAndPassword(
- current_device_uri,
- "http"
- )
- end
- # Even the DeviceURI for lpd can contain a fixed username
- # (there is no authentication via LPD protocol)
- # to describe who requested a print job in the form
- # lpd://username@ip-address-or-hostname/...
- # but usage of this is really really not encouraged, see
- # https://bugzilla.novell.com/show_bug.cgi?id=512549
- # so that its setup not supported here but when
- # such an URI already exists, it should be shown correctly:
- if "lpd:/" ==
- Builtins.substring(current_device_uri, 0, Builtins.size("lpd:/"))
- # so that it may have to be retrieved form /etc/cups/printers.conf:
- current_device_uri = getUriWithUsernameAndPassword(
- current_device_uri,
- "lpd"
- )
- end
- uri = current_device_uri
- if "beh:/" ==
- Builtins.substring(current_device_uri, 0, Builtins.size("beh:/"))
- # remove the beh-related stuff so that only the <originaluri> is left:
- uri = Builtins.mergestring(
- Builtins.sublist(Builtins.splitstring(current_device_uri, "/"), 4),
- "/"
- )
- uri_parts = Builtins.splitstring(current_device_uri, "/")
- # Remove possibly empty parts:
- uri_parts = Builtins.filter(uri_parts) { |part| "" != part }
- Builtins.y2milestone(
- "ConnectionWizardDialog uri_parts = '%1'",
- uri_parts
- )
- if "" != Ops.get(uri_parts, 1, "") &&
- "" != Ops.get(uri_parts, 2, "") &&
- "" != Ops.get(uri_parts, 3, "")
- beh_do_not_disable = false if "0" == Ops.get(uri_parts, 1, "")
- beh_attempts = Ops.get(uri_parts, 2, "")
- beh_delay = Ops.get(uri_parts, 3, "")
end
- end
- model_content = getContentFromCurrentModel(true)
- content = VBox(
- Left(
- InputField(
- Id(:beh_original_uri),
- # Show it as wide as possible because it may have to contain
- # longer stuff like 'scheme://server:port/path/to/resource':
- Opt(:hstretch),
- # TRANSLATORS: Text entry for device URI (Uniform Resource Identifier)
- _(
- "Device URI (for which 'beh' should be applied) [percent-encoded]"
- ),
- uri
+ if "novell:/" ==
+ Builtins.substring(
+ current_device_uri,
+ 0,
+ Builtins.size("novell:/")
+ )
+ # so that it may have to be retrieved form /etc/cups/printers.conf:
+ current_device_uri = getUriWithUsernameAndPassword(
+ current_device_uri,
+ "novell"
+ )
+ end
+ # Even the DeviceURI for ipp/http can contain
+ # fixed username and password for authentication in the form
+ # ipp://username:password@ip-address-or-hostname/...
+ # http://username:password@ip-address-or-hostname/...
+ # but usage of this is really really not encouraged, see
+ # https://bugzilla.novell.com/show_bug.cgi?id=512549
+ # so that its setup not supported here but when
+ # such an URI already exists, it should be shown correctly:
+ if "ipp:/" ==
+ Builtins.substring(current_device_uri, 0, Builtins.size("ipp:/"))
+ # so that it may have to be retrieved form /etc/cups/printers.conf:
+ current_device_uri = getUriWithUsernameAndPassword(
+ current_device_uri,
+ "ipp"
+ )
+ end
+ if "http:/" ==
+ Builtins.substring(current_device_uri, 0, Builtins.size("http:/"))
+ # so that it may have to be retrieved form /etc/cups/printers.conf:
+ current_device_uri = getUriWithUsernameAndPassword(
+ current_device_uri,
+ "http"
)
- ),
- Left(
- CheckBox(
- Id(:beh_do_not_disable),
- # TRANSLATORS: Check box
- _("Never Disable the Queue"),
- beh_do_not_disable
- )
- ),
- Left(
- InputField(
- Id(:beh_attempts),
- # TRANSLATORS: Text entry
- _("Number of Retries ('0' means infinite retries)"),
- beh_attempts
- )
- ),
- Left(
- InputField(
- Id(:beh_delay),
- # TRANSLATORS: Text entry
- _("Delay in Seconds Between Two Retries"),
- beh_delay
- )
- ),
- model_content
- )
+ end
+ # Even the DeviceURI for lpd can contain a fixed username
+ # (there is no authentication via LPD protocol)
+ # to describe who requested a print job in the form
+ # lpd://username@ip-address-or-hostname/...
+ # but usage of this is really really not encouraged, see
+ # https://bugzilla.novell.com/show_bug.cgi?id=512549
+ # so that its setup not supported here but when
+ # such an URI already exists, it should be shown correctly:
+ if "lpd:/" ==
+ Builtins.substring(current_device_uri, 0, Builtins.size("lpd:/"))
+ # so that it may have to be retrieved form /etc/cups/printers.conf:
+ current_device_uri = getUriWithUsernameAndPassword(
+ current_device_uri,
+ "lpd"
+ )
+ end
+ uri = current_device_uri
+ if "beh:/" ==
+ Builtins.substring(current_device_uri, 0, Builtins.size("beh:/"))
+ # remove the beh-related stuff so that only the <originaluri> is left:
+ uri = Builtins.mergestring(
+ Builtins.sublist(Builtins.splitstring(current_device_uri, "/"), 4),
+ "/"
+ )
+ uri_parts = Builtins.splitstring(current_device_uri, "/")
+ # Remove possibly empty parts:
+ uri_parts = Builtins.filter(uri_parts) { |part| "" != part }
+ Builtins.y2milestone(
+ "ConnectionWizardDialog uri_parts = '%1'",
+ uri_parts
+ )
+ if "" != Ops.get(uri_parts, 1, "") &&
+ "" != Ops.get(uri_parts, 2, "") &&
+ "" != Ops.get(uri_parts, 3, "")
+ beh_do_not_disable = false if "0" == Ops.get(uri_parts, 1, "")
+ beh_attempts = Ops.get(uri_parts, 2, "")
+ beh_delay = Ops.get(uri_parts, 3, "")
+ end
+ end
+ model_content = getContentFromCurrentModel(true)
+ content = VBox(
+ Left(
+ InputField(
+ Id(:beh_original_uri),
+ # Show it as wide as possible because it may have to contain
+ # longer stuff like 'scheme://server:port/path/to/resource':
+ Opt(:hstretch),
+ # TRANSLATORS: Text entry for device URI (Uniform Resource Identifier)
+ _(
+ "Device URI (for which 'beh' should be applied) [percent-encoded]"
+ ),
+ uri
+ )
+ ),
+ Left(
+ CheckBox(
+ Id(:beh_do_not_disable),
+ # TRANSLATORS: Check box
+ _("Never Disable the Queue"),
+ beh_do_not_disable
+ )
+ ),
+ Left(
+ InputField(
+ Id(:beh_attempts),
+ # TRANSLATORS: Text entry
+ _("Number of Retries ('0' means infinite retries)"),
+ beh_attempts
+ )
+ ),
+ Left(
+ InputField(
+ Id(:beh_delay),
+ # TRANSLATORS: Text entry
+ _("Delay in Seconds Between Two Retries"),
+ beh_delay
+ )
+ ),
+ model_content
+ )
+ end
when :directly, :network, :server, :special
content = VBox(Left(Label(_("Select a specific connection type."))))
else
@@ -2195,13 +2220,15 @@ module Yast
_("Directly Connected Device"),
true,
[
- Item(Id(:parallel), _("Parallel Port")),
+ # Disabled legacy "Parallel Port" so that it is no longer accessible in the dialog:
+ #Item(Id(:parallel), _("Parallel Port")),
# TRANSLATORS: Tree widget item
Item(Id(:usb), _("USB Port")),
# TRANSLATORS: Tree widget item
Item(Id(:hplip), _("HP Devices (HPLIP)")),
# TRANSLATORS: Tree widget item
- Item(Id(:serial), _("Serial Port")),
+ # Disabled legacy "Serial Port" so that it is no longer accessible in the dialog:
+ #Item(Id(:serial), _("Serial Port")),
# TRANSLATORS: Tree widget item
Item(Id(:bluetooth), _("Bluetooth"))
] # TRANSLATORS: Tree widget item
@@ -2232,7 +2259,8 @@ module Yast
# TRANSLATORS: Tree widget item
Item(Id(:cups), _("CUPS Server (IPP)")),
# TRANSLATORS: Tree widget item
- Item(Id(:ipx), _("Novell Netware Print Server (IPX)"))
+ # Disabled legacy "Novell Netware Print Server (IPX)" so that it is no longer accessible in the dialog:
+ #Item(Id(:ipx), _("Novell Netware Print Server (IPX)"))
] # TRANSLATORS: Tree widget item
),
Item(
--- src/include/printer/helps.rb.orig 2013-11-25 14:45:24.000000000 +0100
+++ src/include/printer/helps.rb 2014-09-05 12:00:57.860892515 +0200
@@ -452,7 +452,7 @@ module Yast
"<b><big>Printer Device URI</big></b><br>\n" +
"A connection is specified as so called <b>device URI</b>.<br>\n" +
"Its first word (the so called URI scheme) specifies the kind of data-transfer,\n" +
- "for example 'parallel', 'usb', 'socket', 'lpd', or 'ipp'.<br>\n" +
+ "for example 'usb', 'socket', 'lpd', or 'ipp'.<br>\n" +
"After the scheme there are more or less additional components\n" +
"which specify the details for this kind of data-transfer.<br>\n" +
"Space characters are not allowed in an URI.\n" +
@@ -557,10 +557,11 @@ module Yast
_(
"<p>\n" +
"<b><big>Device URIs for Directly Connected Devices</big></b><br>\n" +
- "Devices which are connected via the parallel port or via USB\n" +
+ "Devices which are connected via USB\n" +
"are autodetected and the appropriate device URI is autogenerated.\n" +
"For example:<br>\n" +
- "parallel:/dev/lp0<br>\n" +
+ # Disabled legacy "Parallel Port" help text:
+ #"parallel:/dev/lp0<br>\n" +
"usb://ACME/Fun%20Printer?serial=A1B2C3<br>\n" +
"hp:/usb/HP_LaserJet?serial=1234<br>\n" +
"Usually only the autogenerated device URIs work.\n" +
@@ -569,13 +570,14 @@ module Yast
"To access a HP printer or all-in-one device via the backend 'hp',\n" +
"the RPM package hplip must be installed.\n" +
"The package provides HP's printing and scanning software HPLIP.<br>\n" +
- "In contrast devices which are connected via serial port or bluetooth\n" +
+ "In contrast devices which are connected via bluetooth\n" +
"are not autodetected so that the device URI must be manually specified.\n" +
- "The serial device URI parameters must comply with\n" +
- "what the serial port in the printer requires,\n" +
- "see the manual of your serial printer.\n" +
- "Example device URIs:<br>\n" +
- "serial:/dev/ttyS9?baud=9600+bits=8+parity=none+flow=soft+stop=1<br>\n" +
+ # Disabled legacy "Serial Port" help text:
+ #"The serial device URI parameters must comply with\n" +
+ #"what the serial port in the printer requires,\n" +
+ #"see the manual of your serial printer.\n" +
+ #"Example device URIs:<br>\n" +
+ #"serial:/dev/ttyS9?baud=9600+bits=8+parity=none+flow=soft+stop=1<br>\n" +
"bluetooth://1A2B3C4D5E6F<br>\n" +
"To access a device via bluetooth, the RPM package bluez-cups must be installed.\n" +
"The package provides the CUPS backend 'bluetooth' which actually sends the data\n" +
@@ -693,18 +695,19 @@ module Yast
"The official IANA port for IPP is 631.\n" +
"The matching device URI is:<br>\n" +
"ipp://ip-address:631/printers/queue<br>\n" +
- "<b>Novell Netware Print Server (IPX)</b><br>\n" +
- "To access print queues on a Novell Netware print server,\n" +
- "the RPM package ncpfs must be installed.\n" +
- "The package provides the CUPS backend 'novell' which runs\n" +
- "the <tt>nprint</tt> program which actually sends the data\n" +
- "to a Novell Netware print queue.\n" +
- "A server name and a printer queue name is needed to access it.\n" +
- "Furthermore a user name and a password may be required to get access.\n" +
- "The matching device URI is:<br>\n" +
- "novell://username:password@server/queue<br>\n" +
- "For <b>more information</b> have a look at <tt>man nprint</tt> and\n" +
- "the other documentation in the RPM package ncpfs.\n" +
+ # Disabled legacy "Novell Netware Print Server (IPX)" help text:
+ #"<b>Novell Netware Print Server (IPX)</b><br>\n" +
+ #"To access print queues on a Novell Netware print server,\n" +
+ #"the RPM package ncpfs must be installed.\n" +
+ #"The package provides the CUPS backend 'novell' which runs\n" +
+ #"the <tt>nprint</tt> program which actually sends the data\n" +
+ #"to a Novell Netware print queue.\n" +
+ #"A server name and a printer queue name is needed to access it.\n" +
+ #"Furthermore a user name and a password may be required to get access.\n" +
+ #"The matching device URI is:<br>\n" +
+ #"novell://username:password@server/queue<br>\n" +
+ #"For <b>more information</b> have a look at <tt>man nprint</tt> and\n" +
+ #"the other documentation in the RPM package ncpfs.\n" +
"</p>"
) +
# ConnectionWizardDialog help 7/7:
@@ -721,7 +724,7 @@ module Yast
"The matching device URI is:<br>\n" +
"pipe:/path/to/targetcommand<br>\n" +
"<b>Daisy-chain Backend Error Handler (beh)</b><br>\n" +
- "To do this, the RPM package foomatic-filters must be installed.\n" +
+ "To do this, the RPM package cups-backends must be installed.\n" +
"The package provides the CUPS backend 'beh'.<br>\n" +
"The backend 'beh' is a wrapper for the usual backend,\n" +
"which is then called by beh.\n" +
@@ -924,7 +927,7 @@ module Yast
"The error policy defines the default policy that is used when\n" +
"CUPS fails to send a print job to the printer device.<br>\n" +
"Depending on the particular way how the printer is connected\n" +
- "(for example 'parallel', 'usb', 'socket', 'lpd', or 'ipp'),\n" +
+ "(for example 'usb', 'socket', 'lpd', or 'ipp'),\n" +
"and depending on the actual kind of failure,\n" +
"the CUPS backend which actually sends the data to the printer\n" +
"can overwrite the default error policy\n" +