Hello community,
here is the log from the commit of package yast2-scanner
checked in at Wed Apr 23 01:53:12 CEST 2008.
--------
--- yast2-scanner/yast2-scanner.changes 2008-04-17 13:37:36.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-scanner/yast2-scanner.changes 2008-04-22 15:45:11.065073000 +0200
@@ -1,0 +2,13 @@
+Tue Apr 22 15:27:55 CEST 2008 - jsmeix@suse.de
+
+- V 2.16.7
+- Added tests to test_and_set_scanner_access_permissions
+ if HAL knows about the scanner and show an explanatory
+ error message if not. The error message is only shown
+ when a driver is activated but not if a driver is
+ deactivated. Because of the YaST 'text freeze' this
+ error message cannot be translated for openSUSE 11.0
+ so that currently it is only a simple stderr message,
+ (see Novell/Suse Bugzilla bnc#340173).
+
+-------------------------------------------------------------------
Old:
----
yast2-scanner-2.16.6.tar.bz2
New:
----
yast2-scanner-2.16.7.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-scanner.spec ++++++
--- /var/tmp/diff_new_pack.Cm5704/_old 2008-04-23 01:52:58.000000000 +0200
+++ /var/tmp/diff_new_pack.Cm5704/_new 2008-04-23 01:52:58.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-scanner (Version 2.16.6)
+# spec file for package yast2-scanner (Version 2.16.7)
#
# 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
Name: yast2-scanner
-Version: 2.16.6
+Version: 2.16.7
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-scanner-2.16.6.tar.bz2
+Source0: yast2-scanner-2.16.7.tar.bz2
Prefix: /usr
BuildRequires: docbook-xsl-stylesheets doxygen libxslt perl-XML-Writer sgml-skel update-desktop-files xorg-x11-libX11-devel yast2 yast2-devtools yast2-testsuite
Requires: yast2
@@ -46,7 +46,7 @@
Johannes Meixner
%prep
-%setup -n yast2-scanner-2.16.6
+%setup -n yast2-scanner-2.16.7
%build
%{prefix}/bin/y2tool y2autoconf
@@ -86,8 +86,17 @@
%{prefix}/lib/YaST2/bin/*scanner*
%{prefix}/lib/YaST2/bin/displaytest
%doc %{prefix}/share/doc/packages/yast2-scanner
-
%changelog
+* Tue Apr 22 2008 jsmeix@suse.de
+- V 2.16.7
+- Added tests to test_and_set_scanner_access_permissions
+ if HAL knows about the scanner and show an explanatory
+ error message if not. The error message is only shown
+ when a driver is activated but not if a driver is
+ deactivated. Because of the YaST 'text freeze' this
+ error message cannot be translated for openSUSE 11.0
+ so that currently it is only a simple stderr message,
+ (see Novell/Suse Bugzilla bnc#340173).
* Thu Apr 17 2008 jsmeix@suse.de
- V 2.16.6
- In the test_and_set_scanner_access_permissions script
++++++ yast2-scanner-2.16.6.tar.bz2 -> yast2-scanner-2.16.7.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-scanner-2.16.6/configure new/yast2-scanner-2.16.7/configure
--- old/yast2-scanner-2.16.6/configure 2008-04-17 13:20:50.000000000 +0200
+++ new/yast2-scanner-2.16.7/configure 2008-04-22 15:32:20.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for yast2-scanner 2.16.6.
+# Generated by GNU Autoconf 2.61 for yast2-scanner 2.16.7.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -728,8 +728,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-scanner'
PACKAGE_TARNAME='yast2-scanner'
-PACKAGE_VERSION='2.16.6'
-PACKAGE_STRING='yast2-scanner 2.16.6'
+PACKAGE_VERSION='2.16.7'
+PACKAGE_STRING='yast2-scanner 2.16.7'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -1436,7 +1436,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures yast2-scanner 2.16.6 to adapt to many kinds of systems.
+\`configure' configures yast2-scanner 2.16.7 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1507,7 +1507,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-scanner 2.16.6:";;
+ short | recursive ) echo "Configuration of yast2-scanner 2.16.7:";;
esac
cat <<\_ACEOF
@@ -1613,7 +1613,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-scanner configure 2.16.6
+yast2-scanner configure 2.16.7
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1627,7 +1627,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by yast2-scanner $as_me 2.16.6, which was
+It was created by yast2-scanner $as_me 2.16.7, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -2448,7 +2448,7 @@
# Define the identity of the package.
PACKAGE='yast2-scanner'
- VERSION='2.16.6'
+ VERSION='2.16.7'
cat >>confdefs.h <<_ACEOF
@@ -2675,7 +2675,7 @@
-VERSION="2.16.6"
+VERSION="2.16.7"
RPMNAME="yast2-scanner"
MAINTAINER="Johannes Meixner "
@@ -22173,7 +22173,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yast2-scanner $as_me 2.16.6, which was
+This file was extended by yast2-scanner $as_me 2.16.7, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -22226,7 +22226,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-yast2-scanner config.status 2.16.6
+yast2-scanner config.status 2.16.7
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-scanner-2.16.6/configure.in new/yast2-scanner-2.16.7/configure.in
--- old/yast2-scanner-2.16.6/configure.in 2008-04-17 13:20:39.000000000 +0200
+++ new/yast2-scanner-2.16.7/configure.in 2008-04-22 15:32:10.000000000 +0200
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.15.9 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-scanner, 2.16.6, http://bugs.opensuse.org/, yast2-scanner)
+AC_INIT(yast2-scanner, 2.16.7, http://bugs.opensuse.org/, yast2-scanner)
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.16.6"
+VERSION="2.16.7"
RPMNAME="yast2-scanner"
MAINTAINER="Johannes Meixner "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-scanner-2.16.6/src/Scanner.ycp new/yast2-scanner-2.16.7/src/Scanner.ycp
--- old/yast2-scanner-2.16.6/src/Scanner.ycp 2008-04-15 16:29:00.000000000 +0200
+++ new/yast2-scanner-2.16.7/src/Scanner.ycp 2008-04-22 15:38:34.000000000 +0200
@@ -4,7 +4,7 @@
* Summary: Scanner settings, input and output functions
* Authors: Johannes Meixner
*
- * $Id: Scanner.ycp 46678 2008-04-15 14:29:00Z jsmeix $
+ * $Id: Scanner.ycp 46956 2008-04-22 13:38:34Z jsmeix $
*
* Representation of the configuration of scanner.
* Input and output routines.
@@ -2120,18 +2120,7 @@
{ active_scanners = [];
}
else
- { if( ! SetScannerAccessPermissions()
- && user_confirmation
- )
- { Report::Warning( sformat( // Message of a Report::Warning when setting scanner access permissions failed
- // where %1 can be replaced by an error message if such an error message exists.
- // Only a simple message because this error does not happen on a normal system
- // (i.e. a system which is not totally broken or totally messed up).
- _("Failed to set scanner access permissions.\n%1"),
- OnlyMeaningfulErrorMessage( result["stderr"]:"" )
- )
- );
- }
+ { SetScannerAccessPermissions();
}
if( ! DetermineActiveBackends() )
{ active_backends = [];
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-scanner-2.16.6/tools/test_and_set_scanner_access_permissions new/yast2-scanner-2.16.7/tools/test_and_set_scanner_access_permissions
--- old/yast2-scanner-2.16.6/tools/test_and_set_scanner_access_permissions 2008-04-17 13:17:15.000000000 +0200
+++ new/yast2-scanner-2.16.7/tools/test_and_set_scanner_access_permissions 2008-04-22 15:27:04.000000000 +0200
@@ -30,7 +30,7 @@
if [ -n "$1" ]
then echo "$1" >$TMP_DATA_RAW
else MAXIMUM_WAIT="60"
- if [ -x /usr/bin/scanimage ]
+ if [ -x $( type -p scanimage || echo qqq ) ]
then scanimage -f '%d;' >$TMP_DATA_RAW &
scanimagePID=$!
for i in $( seq $MAXIMUM_WAIT )
@@ -74,7 +74,7 @@
# the BusDevice values are unique (because the lsusb output is unique)
# because another backend might have already reported a HP USB scanner.
# Skip this section if hp-makeuri cannot be executed for whatever reason.
-if [ -x /usr/bin/hp-makeuri ]
+if [ -x $( type -p hp-makeuri || echo qqq ) ]
then for BusDevice in $( lsusb -d 03f0: | cut -d ' ' -f 2,4 | tr ' :' ': ' )
do for URI in $( hp-makeuri -s $BusDevice 2>/dev/null )
do if grep -q "^$URI\$" $TMP_DATA
@@ -105,6 +105,17 @@
echo 'as displayed by the command /usr/sbin/lsusb -->' >>$HAL_LOCAL_FILE
echo '' >>$HAL_LOCAL_FILE
+# Setting extglob is required to remove an arbitrary number
+# of leading zeroes from a varaiable via ${varaiable##*(0)}
+shopt -s extglob
+
+# Get the HAL UDIs:
+KNOWN_HAL_SCANNER_UDIs=""
+if [ -x $( type -p hal-find-by-capability || echo qqq ) ]
+then KNOWN_HAL_SCANNER_UDIs="$( hal-find-by-capability --capability scanner )"
+fi
+UNKNOWN_TO_HAL=""
+
# Test and set scanner access permissions:
exec <$TMP_DATA
while read LINE
@@ -119,8 +130,6 @@
# Skip scanners where VENDOR or PRODUCT contains only zeroes:
echo $VENDOR | grep -q [1-9a-f] || continue
echo $PRODUCT | grep -q [1-9a-f] || continue
- # Skip scanners which are already listed in the global HAL file:
- grep -i -A 1 "usb_device.vendor_id\" int=\"0x$VENDOR\"" $HAL_GLOBAL_FILE | grep -q -i "usb_device.product_id\" int=\"0x$PRODUCT\"" && continue
# Skip "SCSI via USB" scanners:
# There is a small number of USB scanners which are not talked to via libusb.
# They talk an unusual protocol which is a derivative of usb storage.
@@ -138,6 +147,20 @@
[ "05da:80a3" = "$VENDOR_PRODUCT" ] && continue
[ "05da:80ac" = "$VENDOR_PRODUCT" ] && continue
[ "05da:00b6" = "$VENDOR_PRODUCT" ] && continue
+ # Scanners which are not skipped above must have an entry in a HAL fdi file.
+ # If the "scanner" capability is already known to HAL, everything is already o.k
+ # regardless if it is listed in the global or local HAL file or elsewhere.
+ # If there are several scanners with the same USB IDs connected,
+ # it is assumed that when HAL knows one, it knows all of them.
+ # If KNOWN_HAL_SCANNER_UDIs is emptly e.g. because HAL does not run or is not installed
+ # it is perfectly right to collect the models in UNKNOWN_TO_HAL
+ # so that YaST can show an appropriate message to the user.
+ HAL_UDI_VENDOR_PRODUCT=${VENDOR##*(0)}_${PRODUCT##*(0)}
+ echo "$KNOWN_HAL_SCANNER_UDIs" | grep -q -i "/usb_device_$HAL_UDI_VENDOR_PRODUCT" && continue
+ # The "scanner" capability is not yet known to HAL:
+ UNKNOWN_TO_HAL="$UNKNOWN_TO_HAL USB-ID(hex)=$VENDOR_PRODUCT"
+ # Skip scanners which are already listed in the global HAL file:
+ grep -i -A 1 "usb_device.vendor_id\" int=\"0x$VENDOR\"" $HAL_GLOBAL_FILE | grep -q -i "usb_device.product_id\" int=\"0x$PRODUCT\"" && continue
# Write an entry to the local HAL file:
echo ' <match key="info.subsystem" string="usb_device">' >>$HAL_LOCAL_FILE
echo " " >>$HAL_LOCAL_FILE
@@ -150,9 +173,19 @@
fi
if echo $LINE | grep -q '^/dev/sg[0-9][0-9]*$'
then # It is a SCSI scanner:
- LSSCSI_LINE=$( lsscsi -g | grep $LINE )
+ # If the "scanner" capability is already known to HAL, everything is already o.k
+ # regardless if it is listed in the global or local HAL file or elsewhere.
+ # If KNOWN_HAL_SCANNER_UDIs is emptly e.g. because HAL does not run or is not installed
+ # it is perfectly right to collect the models in UNKNOWN_TO_HAL
+ # so that YaST can show an appropriate message to the user.
+ for u in $( echo "$KNOWN_HAL_SCANNER_UDIs" )
+ do hal-get-property --udi "$u" --key linux.device_file
+ done | grep -q "$LINE" && continue
+ # The "scanner" capability is not yet known to HAL:
+ UNKNOWN_TO_HAL="$UNKNOWN_TO_HAL SCSI-device=$LINE"
# Skip scanners which show up as SCSI type "scanner" because those
# match to the generic SCSI entry in the global HAL file.
+ LSSCSI_LINE=$( lsscsi -g | grep $LINE )
echo $LSSCSI_LINE | tr -s ' ' | cut -d ' ' -f2 | grep -q -i 'scanner' && continue
# There are two know manufacturers where SCSI scanners do not show up as "scanner":
# "HP" and "EPSON": Some (all?) of their SCSI scanners show up as as "processor"
@@ -190,5 +223,36 @@
# Remove the temporary files:
rm $TMP_DATA $TMP_DATA_RAW
+
+# If the scanner is not yet known to HAL, a re-plug of the USB scanner might help
+# otherwise a reboot of the computer should be done to restart the whole udev/HAL machinery
+# and if even a reboot doesn't help, the saned+net workaround should be used.
+# The exit code 10 indicates this case so that YaST can show an appropriate message to the user.
+if [ -n "$UNKNOWN_TO_HAL" ]
+then echo "The following models are currently not known to HAL:" 1>&2
+ for m in $UNKNOWN_TO_HAL
+ do echo " $m" 1>&2
+ done
+ echo "" 1>&2
+ echo "To access the scanner as normal user," 1>&2
+ echo "udev, HAL, and hal-resmgr are needed to grant" 1>&2
+ echo "appropriate access permissions automatically." 1>&2
+ echo "Therefore the scanner model must be known to HAL." 1>&2
+ echo "If the scanner is not known to HAL, a re-plug" 1>&2
+ echo "of a USB scanner should help." 1>&2
+ echo "Otherwise a reboot should be done to restart" 1>&2
+ echo "the whole udev/HAL/hal-resmgr machinery." 1>&2
+ echo "Check if the scanner is listed in the 'lshal' output." 1>&2
+ echo "If a SCSI scanner which was switched on during boot" 1>&2
+ echo "is not listed in the 'lshal' output, the usual reason" 1>&2
+ echo "is that the kernel module for the scanner's SCSI host" 1>&2
+ echo "adapter does not notify HAL about the scanner device." 1>&2
+ echo "If even a reboot does not help, you could access" 1>&2
+ echo "the scanner via the 'saned' as a workaround." 1>&2
+ echo "For this workaround choose 'scanning via network'" 1>&2
+ echo "and select the 'local host configuration'." 1>&2
+ exit 10
+fi
+
exit 0
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-scanner-2.16.6/VERSION new/yast2-scanner-2.16.7/VERSION
--- old/yast2-scanner-2.16.6/VERSION 2008-04-17 13:17:28.000000000 +0200
+++ new/yast2-scanner-2.16.7/VERSION 2008-04-22 15:27:50.000000000 +0200
@@ -1 +1 @@
-2.16.6
+2.16.7
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org