Guido Günther wrote:
 Hi Piavlo,
 On Mon, Jul 13, 2009 at 12:43:14AM +0300, Piavlo wrote:
 [..snip..] 
   
> So something must be wrong in the debootstrap code, and the following
> patch fixes it
>
> # diff -Nru /usr/share/debootstrap/scripts/lenny.orig
> /usr/share/debootstrap/scripts/lenny
> --- /usr/share/debootstrap/scripts/lenny.orig   2009-07-13
> 00:15:25.000000000 +0300
> +++ /usr/share/debootstrap/scripts/lenny        2009-07-13
> 00:15:16.000000000 +0300
> @@ -80,7 +80,7 @@
>
>  second_stage_install () {
>      x_core_install () {
> -       smallyes '' | in_target dpkg --force-depends --install $(debfor
> "$@")
> +       chroot $TARGET dpkg --force-depends --install $(debfor "$@")
>      }
>
>      p () {
> #
>     
 could you check what the issue is here? Is it the smallyes pipe part or
 the in_target call? Both look harmless and I can't seem to reproduce
 this here.
  -- Guido
    
Hi Guido,
I fail to understand what's wrong in in_target_failmsg defined in
/usr/share/debootstrap/functions which is called from in_target function:
in_target_failmsg () {
        local code="$1"
        local msg="$2"
        local arg="$3"
        shift; shift; shift
       if ! chroot "$TARGET" "$@"; then
               warning "$code" "$msg" "$arg"
               return 1
       fi
        return 0
}
I don't understand why the if is entered while:
chroot "$TARGET" "$@"
finishes with 0 exit code? 
Alex