diff --git a/hplip-stuck-plugin.patch b/hplip-stuck-plugin.patch index eadc049..188682a 100644 --- a/hplip-stuck-plugin.patch +++ b/hplip-stuck-plugin.patch @@ -1,15 +1,15 @@ -From f46ac074d066884480098c14397f5f3e34475e11 Mon Sep 17 00:00:00 2001 +From 469029615ffd32cf78f3be575694ed58236da3e0 Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Fri, 22 Jan 2016 16:30:13 +0100 Subject: [PATCH] fix from launchpad #1510950 --- - base/password.py | 17 ++++++++++++++++- + base/password.py | 27 +++++++++++++++++++++++---- base/utils.py | 53 ++++++++++++++++++++++++++++++++++------------------- - 2 files changed, 50 insertions(+), 20 deletions(-) + 2 files changed, 57 insertions(+), 23 deletions(-) diff --git a/base/password.py b/base/password.py -index 3ca16ae..6caefdf 100644 +index 3ca16ae..f69a248 100644 --- a/base/password.py +++ b/base/password.py @@ -104,6 +104,7 @@ def get_distro_name(): @@ -20,14 +20,27 @@ index 3ca16ae..6caefdf 100644 self.__passwordValidated = False self.__mode = Mode self.__readAuthType() #self.__authType -@@ -201,7 +202,17 @@ class Password(object): +@@ -200,8 +201,7 @@ class Password(object): + i = child.expect(self.__expectList) cb = child.before - if cb: +- if cb: - ++ if cb: + start = time.time() + output.write(cb) + +@@ -209,11 +209,26 @@ class Password(object): + ok, ret = True, output.getvalue() + break + +- elif i == 1: # TIMEOUT +- ++ elif i == 1: # TIMEOUT + if('true' in cmd and self.__password_prompt_str == ""): #sudo true or su -c "true" + cb = cb.replace("[", "\[") + cb = cb.replace("]", "\]") ++ + self.__password_prompt_str = cb + try: + p = re.compile(cb, re.I) @@ -35,11 +48,18 @@ index 3ca16ae..6caefdf 100644 + self.__expectList.append(cb) + else: + self.__expectList.append(p) -+ - start = time.time() - output.write(cb) ++ log.debug("Adding missing password prompt string [%s]"%self.__password_prompt_str) + continue -@@ -355,3 +366,7 @@ class Password(object): + else: # password ++ if(self.__password_prompt_str == ""): ++ self.__password_prompt_str = utils.EXPECT_WORD_LIST[i] ++ log.debug("Updating password prompt string [%s]"%self.__password_prompt_str) ++ + child.sendline(self.__password) + + except (Exception, pexpect.ExceptionPexpect) as e: +@@ -355,3 +370,7 @@ class Password(object): self.__validatePassword( pswd_msg) return self.__password diff --git a/hplip.spec b/hplip.spec index daf9aa5..bbcfbe5 100644 --- a/hplip.spec +++ b/hplip.spec @@ -7,7 +7,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.15.11 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2+ and MIT and BSD Url: http://hplip.sourceforge.net/ @@ -461,6 +461,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %postun libs -p /sbin/ldconfig %changelog +* Wed Jan 27 2016 Jiri Popelka - 3.15.11-6 +- updated patch for bug #1249414 + * Fri Jan 22 2016 Jiri Popelka - 3.15.11-5 - hp-plugin hangs on 'su' (bug #1249414).