Hello community,
here is the log from the commit of package yast2-fingerprint-reader
checked in at Mon Mar 10 03:01:27 CET 2008.
--------
--- yast2-fingerprint-reader/yast2-fingerprint-reader.changes 2007-12-10 16:26:51.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2-fingerprint-reader/yast2-fingerprint-reader.changes 2008-03-07 15:33:32.510215000 +0100
@@ -1,0 +2,15 @@
+Fri Mar 7 15:16:53 CET 2008 - jsuchome@suse.cz
+
+- wait for child exit with WNOHANG (bnc#361638)
+- 2.16.4
+
+-------------------------------------------------------------------
+Mon Mar 3 16:42:27 CET 2008 - jsuchome@suse.cz
+
+- added modalias to Supplements, so package could get selected
+ automatically on the systems with UPEK fingerprint reader
+ (bnc#361636)
+- fixed handling of child process exit (bnc#361638)
+- 2.16.3
+
+-------------------------------------------------------------------
Old:
----
yast2-fingerprint-reader-2.16.2.tar.bz2
New:
----
yast2-fingerprint-reader-2.16.4.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-fingerprint-reader.spec ++++++
--- /var/tmp/diff_new_pack.tJ9460/_old 2008-03-10 03:01:19.000000000 +0100
+++ /var/tmp/diff_new_pack.tJ9460/_new 2008-03-10 03:01:20.000000000 +0100
@@ -1,7 +1,7 @@
#
-# spec file for package yast2-fingerprint-reader (Version 2.16.2)
+# spec file for package yast2-fingerprint-reader (Version 2.16.4)
#
-# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@@ -10,17 +10,19 @@
# norootforbuild
+
Name: yast2-fingerprint-reader
-Version: 2.16.2
+Version: 2.16.4
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-fingerprint-reader-2.16.2.tar.bz2
+Source0: yast2-fingerprint-reader-2.16.4.tar.bz2
Prefix: /usr
Requires: yast2 yast2-pam
BuildRequires: libthinkfinger libusb-devel
BuildRequires: doxygen gcc-c++ perl-XML-Writer update-desktop-files yast2 yast2-core-devel yast2-devtools yast2-pam yast2-testsuite
+Supplements: modalias(usb:v0483p2016d*dc*dsc*dp*ic*isc*ip*)
Conflicts: yast2-hardware-detection < 2.15.7
Summary: YaST2 - Fingerprint Reader Configuration
@@ -35,7 +37,7 @@
Jiri Suchomel
%prep
-%setup -n yast2-fingerprint-reader-2.16.2
+%setup -n yast2-fingerprint-reader-2.16.4
%build
%{prefix}/bin/y2tool y2autoconf
@@ -71,29 +73,38 @@
%{_libdir}/YaST2/plugin/libpy2ag_thinkfinger.*
%doc %{prefix}/share/doc/packages/yast2-fingerprint-reader
%changelog
-* Mon Dec 10 2007 - jsuchome@suse.cz
+* Fri Mar 07 2008 jsuchome@suse.cz
+- wait for child exit with WNOHANG (bnc#361638)
+- 2.16.4
+* Mon Mar 03 2008 jsuchome@suse.cz
+- added modalias to Supplements, so package could get selected
+ automatically on the systems with UPEK fingerprint reader
+ (bnc#361636)
+- fixed handling of child process exit (bnc#361638)
+- 2.16.3
+* Mon Dec 10 2007 jsuchome@suse.cz
- merged proofread texts
- 2.16.2
-* Wed Oct 24 2007 - jsuchome@suse.cz
+* Wed Oct 24 2007 jsuchome@suse.cz
- Cancel button: send the child process SIGKILL when it is still
alive 3 seconds after SIGTERM
- 2.16.1
-* Mon Oct 22 2007 - jsuchome@suse.cz
+* Mon Oct 22 2007 jsuchome@suse.cz
- fixed wrong widget id (#333670)
- check for presence of bir files in import directory (#333670)
- 2.16.0
-* Wed Aug 15 2007 - jsuchome@suse.cz
+* Wed Aug 15 2007 jsuchome@suse.cz
- use Pam module to check the status and FingerprintReader.ycp for
devices listing
- mkdir /etc/pam_thinkfinger if not present
- 2.15.2
-* Tue Aug 14 2007 - jsuchome@suse.cz
+* Tue Aug 14 2007 jsuchome@suse.cz
- fixed text in .desktop file, changed icon name
- 2.15.1
-* Wed Aug 01 2007 - jsuchome@suse.cz
+* Wed Aug 01 2007 jsuchome@suse.cz
- feature 301952
- initial dialog with PAM configuration
- user plugin for the saving fingerprints
- 2.15.0
-* Fri Mar 02 2007 - jsuchome@suse.cz
+* Fri Mar 02 2007 jsuchome@suse.cz
- initial version
++++++ yast2-fingerprint-reader-2.16.2.tar.bz2 -> yast2-fingerprint-reader-2.16.4.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-fingerprint-reader-2.16.2/agent-thinkfinger/src/ThinkFingerAgent.cc new/yast2-fingerprint-reader-2.16.4/agent-thinkfinger/src/ThinkFingerAgent.cc
--- old/yast2-fingerprint-reader-2.16.2/agent-thinkfinger/src/ThinkFingerAgent.cc 2007-10-24 09:54:33.000000000 +0200
+++ new/yast2-fingerprint-reader-2.16.4/agent-thinkfinger/src/ThinkFingerAgent.cc 2008-03-07 15:16:41.000000000 +0100
@@ -38,6 +38,7 @@
ThinkFingerAgent::ThinkFingerAgent() : SCRAgent()
{
child_pid = -1;
+ child_retval = -1;
}
/**
@@ -156,7 +157,7 @@
}
else if (PC(0) == "state") {
YCPMap retmap;
- if (!child_pid)
+ if (child_pid == -1)
{
y2error ("ThinkFinger not initialized yet!");
return ret;
@@ -178,19 +179,76 @@
}
retmap->add (YCPString ("state"), YCPInteger (state));
}
+ else if (retval == 0)
+ {
+ // check if child is still alive
+ int status;
+ if (waitpid (-1, &status, WNOHANG) != 0)
+ {
+ if (WIFSIGNALED (status))
+ {
+ y2error ("child process was killed");
+ child_pid = -1;
+ return ret;
+ }
+ if (WIFEXITED (status))
+ {
+ child_retval = WEXITSTATUS (status);
+ child_pid = -1;
+ return ret;
+ }
+ }
+ }
return retmap;
}
- // wait for child exit
+ // check if child process exited
+ else if (PC(0) == "check_exit" ) {
+ int status;
+ ret = YCPBoolean (false);
+ if (child_pid != -1)
+ {
+ if (waitpid (child_pid, &status, WNOHANG) != 0)
+ {
+ child_pid = -1;
+ ret = YCPBoolean (true);
+ if (WIFSIGNALED (status))
+ {
+ y2error ("child process was killed");
+ }
+ if (WIFEXITED (status))
+ {
+ child_retval = WEXITSTATUS (status);
+ }
+ }
+ }
+ else
+ {
+ y2milestone ("child process already exited");
+ ret = YCPBoolean (true);
+ }
+ }
+ // wait for child exit if it still not exited (do not use this part)
+ // return child exit value
else if (PC(0) == "exit_status" ) {
int status;
int retval = 255;
- wait (&status);
- if (WIFSIGNALED (status))
- y2milestone ("child process was killed");
- else if (WIFEXITED (status))
+ if (child_pid != -1)
+ {
+ wait (&status);
+ if (WIFSIGNALED (status))
+ y2milestone ("child process was killed");
+ else if (WIFEXITED (status))
+ {
+ retval = WEXITSTATUS (status);
+ y2milestone ("retval is %d", retval);
+ }
+ }
+ else
{
- retval = WEXITSTATUS (status);
- y2milestone ("retval is %d", retval);
+ y2milestone ("child process already exited");
+ if (child_retval)
+ retval = child_retval;
+ child_retval = -1;
}
ret = YCPInteger (retval);
close (data_pipe[0]); // close FD for reading
@@ -237,6 +295,7 @@
{
y2milestone ("... still alive, killing it", child_pid);
kill (child_pid, 9);
+ wait (&status);
}
child_pid = -1;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-fingerprint-reader-2.16.2/agent-thinkfinger/src/ThinkFingerAgent.h new/yast2-fingerprint-reader-2.16.4/agent-thinkfinger/src/ThinkFingerAgent.h
--- old/yast2-fingerprint-reader-2.16.2/agent-thinkfinger/src/ThinkFingerAgent.h 2007-10-02 13:27:17.000000000 +0200
+++ new/yast2-fingerprint-reader-2.16.4/agent-thinkfinger/src/ThinkFingerAgent.h 2008-03-03 16:42:04.000000000 +0100
@@ -102,7 +102,6 @@
*/
virtual YCPValue otherCommand(const YCPTerm& term);
-
/**
* array with pipe file descriptors
*/
@@ -113,6 +112,11 @@
*/
pid_t child_pid;
+ /**
+ * return value of the child process
+ */
+ int child_retval;
+
};
#endif /* _ThinkFingerAgent_h */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-fingerprint-reader-2.16.2/src/users_plugin_fingerprint_reader.ycp new/yast2-fingerprint-reader-2.16.4/src/users_plugin_fingerprint_reader.ycp
--- old/yast2-fingerprint-reader-2.16.2/src/users_plugin_fingerprint_reader.ycp 2007-12-10 16:20:42.000000000 +0100
+++ new/yast2-fingerprint-reader-2.16.4/src/users_plugin_fingerprint_reader.ycp 2008-03-07 15:16:06.000000000 +0100
@@ -12,7 +12,7 @@
* Authors:
* Jiri Suchomel
*
- * $Id: users_plugin_fingerprint_reader.ycp 41535 2007-10-24 08:06:33Z jsuchome $
+ * $Id: users_plugin_fingerprint_reader.ycp 45167 2008-03-03 15:55:15Z jsuchome $
*/
{
@@ -92,6 +92,30 @@
integer swipe_success = 0;
integer swipe_failed = 0;
+ // helper function: return exit status of the thinkfinger proccess;
+ // regulary check user input for `cancel button
+ integer get_exit_status () {
+ integer ex = exit_status;
+ while (true)
+ {
+ boolean exited = (boolean) SCR::Read (.thinkfinger.check_exit);
+ if (exited)
+ {
+ ex = (integer) SCR::Read (.thinkfinger.exit_status);
+ break;
+ }
+ ui = UI::PollInput ();
+ if (ui == `cancel)
+ {
+ SCR::Execute (.thinkfinger.cancel);
+ UI::ReplaceWidget (`id (`rp), `Label (_("Canceled")));
+ break;
+ }
+ sleep (100);
+ }
+ return ex;
+ }
+
// helper function, form the string for UI from actuall data
void replace_swipe_string () {
@@ -156,12 +180,12 @@
}
else if (statemap == nil)
{
- exit_status = (integer) SCR::Read (.thinkfinger.exit_status);
+ exit_status = get_exit_status ();
break;
}
if (exit)
{
- exit_status = (integer) SCR::Read (.thinkfinger.exit_status);
+ exit_status = get_exit_status ();
break;//must be before check for cancel
}
@@ -170,7 +194,9 @@
if (ui == `cancel || ui == `back)
{
SCR::Execute (.thinkfinger.cancel);
- y2milestone ("exit status after cancel: %1", SCR::Read (.thinkfinger.exit_status));
+ // status label (canceled after user action)
+ UI::ReplaceWidget (`id (`rp), `Label (_("Canceled")));
+ y2milestone ("canceled");
break;
}
sleep (100);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-fingerprint-reader-2.16.2/VERSION new/yast2-fingerprint-reader-2.16.4/VERSION
--- old/yast2-fingerprint-reader-2.16.2/VERSION 2007-12-10 16:22:20.000000000 +0100
+++ new/yast2-fingerprint-reader-2.16.4/VERSION 2008-03-07 15:17:08.000000000 +0100
@@ -1 +1 @@
-2.16.2
+2.16.4
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org