Hello community,
here is the log from the commit of package gnome-volume-manager
checked in at Fri Apr 7 16:47:30 CEST 2006.
--------
--- GNOME/gnome-volume-manager/gnome-volume-manager.changes 2006-04-05 17:13:39.000000000 +0200
+++ gnome-volume-manager/gnome-volume-manager.changes 2006-04-06 20:01:04.000000000 +0200
@@ -1,0 +2,7 @@
+Thu Apr 6 19:58:41 CEST 2006 - fejj@suse.de
+
+- Instead of launching `yast2 printer`, we can now launch gnome-cups-add
+ since it has now been patched to read the usb printer list directly
+ from the CUPS usb backend.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gnome-volume-manager.spec ++++++
--- /var/tmp/diff_new_pack.i7Mjnp/_old 2006-04-07 16:47:05.000000000 +0200
+++ /var/tmp/diff_new_pack.i7Mjnp/_new 2006-04-07 16:47:05.000000000 +0200
@@ -15,7 +15,7 @@
%define prefix /opt/gnome
%define sysconfdir /etc%{prefix}
Version: 1.5.15
-Release: 13
+Release: 14
URL: http://www.gnome.org/
Group: System/GUI/GNOME
License: GPL
@@ -109,6 +109,10 @@
/opt/gnome/share/gnome-volume-manager
%changelog -n gnome-volume-manager
+* Thu Apr 06 2006 - fejj@suse.de
+- Instead of launching `yast2 printer`, we can now launch gnome-cups-add
+ since it has now been patched to read the usb printer list directly
+ from the CUPS usb backend.
* Wed Apr 05 2006 - fejj@suse.de
- Updated add-unknown-printer to work around even more CUPS usb
backend URI scheme crack (like not including the vendor name
++++++ add-unknown-printer ++++++
--- GNOME/gnome-volume-manager/add-unknown-printer 2006-04-05 22:44:49.000000000 +0200
+++ gnome-volume-manager/add-unknown-printer 2006-04-06 19:58:29.000000000 +0200
@@ -1,4 +1,34 @@
#!/bin/bash
+#
+# Authors: Jeffrey Stedfast
+#
+# Copyright 2006 Novell, Inc. (www.novell.com)
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
+#
+
+# The purpose of this script is to take a HAL UDI and attempt to
+# match it against any already-configured printers that CUPS knows
+# about. This means we need to match against both hal:// URIs (as
+# generated by the CUPS hal backend) and all the various usb:// URIs
+# that the CUPS usb backend is capable of generating (which is quite
+# a lot, sadly).
+
+# If the printer is not found to already be configured, launch
+# gnome-cups-add to configure the printer.
+
if [ -z "$1" ]; then
echo "Usage: `basename $0` hal-udi"
@@ -8,12 +38,39 @@
udi="$1"
parent_udi=`hal-get-property --udi $udi --key info.parent`
-vendor=`hal-get-property --udi $udi --key printer.vendor | sed -e "s/ /%20/g"`
+vendor=`hal-get-property --udi $udi --key printer.vendor | sed -e "s/ $//" -e "s/ /%20/g"`
product=`hal-get-property --udi $udi --key printer.product | sed -e "s/ /%20/g"`
description=`hal-get-property --udi $udi --key printer.description | sed -e "s/ /%20/g"`
serial=`hal-get-property --udi $parent_udi --key usb.serial`
device=`hal-get-property --udi $udi --key printer.device`
+# Get the canonical name for some vendors
+if [ "$vendor" = "APPLE" ]; then
+ cvendor="Apple"
+elif [ "$vendor" = "Canon%20Inc.%20(Kosugi%20Offic" -o "$vendor" = "CANON" ]; then
+ cvendor="Canon"
+elif [ "$vendor" = "Dymo-CoStar" -o "$vendor" = "DYMO" ]; then
+ cvendor="Dymo"
+elif [ "$vendor" = "EPSON" ]; then
+ cvendor="Epson"
+elif [ "$vendor" = "Hewlett-Packard" -o "$vendor" = "Hewlett%20Packard" -o "$vendor" = "hp" ]; then
+ cvendor="HP"
+elif [ "$vendor" = "Kyocera-Mita" -o "$vendor" = "Kyocera%20Mita" ]; then
+ cvendor="Kyocera"
+elif [ "$vendor" = "Lexmark-International" -o "$vendor" = "Lexmark%20International" ]; then
+ cvendor="Lexmark"
+elif [ "$vendor" = "MINOLTA-QMS" -o "$vendor" = "MINOLTA%20QMS" -o "$vendor" = "MINOLTA" ]; then
+ cvendor="Minolta"
+elif [ "$vendor" = "OKI%20DATA%20CORP" -o "$vendor" = "OKI" -o "$vendor" = "OKIDATA" ]; then
+ cvendor="Okidata"
+elif [ "$vendor" = "Raw%20Queue" -o "$vendor" = "Postscript" ]; then
+ cvendor="Generic"
+else
+ cvendor=""
+fi
+
+
+
for linebuf in `lpstat -v`
do
uri=`echo $linebuf | sed -e "s/device for printer: //"`
@@ -46,7 +103,28 @@
exit 0
fi
- # FIXME: we need to check for vendor aliases as well...
+ # Now try using the canonical vendor names
+ if [ -n "$cvendor" ]; then
+ usb="usb://$cvendor/$product"
+ if [ "$uri" = "$usb" ]; then
+ exit 0
+ fi
+
+ usb="usb://$cvendor/$description"
+ if [ "$uri" = "$usb" ]; then
+ exit 0
+ fi
+
+ usb="usb://$cvendor/$product?serial=$serial"
+ if [ "$uri" = "$usb" ]; then
+ exit 0
+ fi
+
+ usb="usb://$cvendor/$description?serial=$serial"
+ if [ "$uri" = "$usb" ]; then
+ exit 0
+ fi
+ fi
# Sometimes the usb backend doesn't include the vendor, yay for consistancy.
usb="usb://$product"
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...