From cd7cac1253f9aacf09732666d8b1efb05c4dd504 Mon Sep 17 00:00:00 2001 From: Diego Elio Pettenò Date: Sat, 30 Dec 2006 08:39:25 +0000 Subject: Add some documentation about whitespaces in autoepatch. svn path=/trunk/; revision=29 --- doc/howitworks.docbook | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'doc') diff --git a/doc/howitworks.docbook b/doc/howitworks.docbook index abb25fb..4472531 100644 --- a/doc/howitworks.docbook +++ b/doc/howitworks.docbook @@ -144,6 +144,46 @@ in the next sections and chapters. + +Whitespaces handling and safety + + +While there are currently some limitations in ebuilds and in Portage +code that disallow using paths with spaces for important directories +like the merge root, the temporary directory and the portage tree +directory, autoepatch was supposed not to break even if all of them had +all kind of special characters. Unfortunately this is not always +possible, because of limitations in the tools and the language used. + + + +The biggest limitation is provided by bash itself: variables cannot +contain the NULL character, which means that the targets cannot be +passed with the output of find -print0 or grep -Z, so the targets +have to be separated by the \n sequence (new line). + + + +To try minimising the possibility of problems during piping throught +different commands (find, grep and so on), it is suggested to use the +option find $dir -exec cmd {} + rather than using +-print and xargs (this also avoids one process spawn), and if you need +to pass the result of grep -l, also add the --null parameter. + + + + + For reasons far from our understanding, FreeBSD people decided to + use the -Z option to GNU grep to support running grep over + gzip-compressed files. For compatibility and portability, rather + than using the -Z option, you should use the --null option in + autoepatch patchsets, which would behave consistently on both Linux + and non-Linux systems. + + + + + Alternative prefixes support -- cgit v1.2.3-65-gdbad