reverted: --- libgksu-2.0.5/debian/patches/20_add_usleep.patch +++ libgksu-2.0.5.orig/debian/patches/20_add_usleep.patch @@ -1,13 +0,0 @@ -=== modified file 'libgksu/libgksu.c' ---- libgksu/libgksu.c 2008-06-04 10:41:44 +0000 -+++ libgksu/libgksu.c 2008-06-04 11:03:42 +0000 -@@ -2590,6 +2590,8 @@ - - if (context->debug) - fprintf (stderr, "buffer: -%s-\n", buffer); -+ -+ usleep(1000); - } - - if (context->debug) - diff -u libgksu-2.0.5/debian/changelog libgksu-2.0.5/debian/changelog --- libgksu-2.0.5/debian/changelog +++ libgksu-2.0.5/debian/changelog @@ -1,3 +1,14 @@ +libgksu (2.0.5-1ubuntu5.2) hardy-proposed; urgency=low + + * dropped debian/patches/20_add_usleep.patch + * added debian/patches/20_better_usleep.patch: + - improve the patch to have a bigger timeout but also break early + once the process_name changes. this should hep in situations when + starting sudo is very slow (e.g. because the machine is under heavy + io load) + + -- Michael Vogt Mon, 28 Jul 2008 15:14:17 +0200 + libgksu (2.0.5-1ubuntu5.1) hardy-proposed; urgency=low * debian/patches/20_add_usleep.patch: only in patch2: unchanged: --- libgksu-2.0.5.orig/debian/patches/20_better_usleep.patch +++ libgksu-2.0.5/debian/patches/20_better_usleep.patch @@ -0,0 +1,30 @@ +--- libgksu-2.0.7.orig/libgksu/libgksu.c ++++ libgksu-2.0.7/libgksu/libgksu.c +@@ -2624,9 +2624,13 @@ + /* Try hard to find the prompt; it may happen that we're + * seeing sudo's lecture, or that some pam module is spitting + * debugging stuff at the screen ++ * ++ * we wait up to 5sec for the prompt to appear, but we also ++ * break once the process_name changed + */ +- for (counter = 0; counter < 50; counter++) ++ for (counter = 0; counter < 1000; counter++) + { ++ char *procname; + if (strncmp (buffer, "GNOME_SUDO_PASS", 15) == 0) + break; + +@@ -2634,6 +2638,12 @@ + + if (context->debug) + fprintf (stderr, "buffer: -%s-\n", buffer); ++ ++ // we wait here bit but break when the process name changes ++ usleep(5000); ++ procname = get_process_name (pid); ++ if(!g_str_has_suffix(procname,"sudo")) ++ break; + } + + if (context->debug)