File parted.tty.patch of Package parted

Index: parted-1.9.0/parted/ui.c
===================================================================
--- parted-1.9.0.orig/parted/ui.c	2009-07-30 16:28:35.000000000 +0200
+++ parted-1.9.0/parted/ui.c	2009-07-30 16:28:38.000000000 +0200
@@ -1402,9 +1402,13 @@ init_ui ()
         ped_exception_set_handler (exception_handler);
 
 #ifdef HAVE_LIBREADLINE
+	/* check for tty is favorable here because readline might try to set some
+	 * terminal stuff that messes up parsing in non-interactive mode */
+	if( isatty(fileno(stdout)) ) {
         rl_initialize ();
         rl_attempted_completion_function = (CPPFunction*) complete_function;
         readline_state.in_readline = 0;
+	}
 #endif
 
 #ifdef SA_SIGINFO
openSUSE Build Service is sponsored by