[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] fedoostrap or deboostrap requirement



Piavlo wrote:  [Sun Jul 26 2009, 05:06:29PM EDT]
> 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? 

I have not been following this conversation previously, so
I apologize if this has already been mentioned.  Guido's patch
also removes the smallyes pipe, which could be the culprit if
dpkg (or a subprocess called by dpkg) wants a tty on stdin.

Does Guido's patch still "solve" the problem if it's written:

-       smallyes '' | in_target dpkg --force-depends --install $(debfor "$@")
+       smallyes '' | chroot $TARGET dpkg --force-depends --install $(debfor "$@")

or alternatively, does this work as well as Guido's patch:

-       smallyes '' | in_target dpkg --force-depends --install $(debfor "$@")
+       in_target dpkg --force-depends --install $(debfor "$@")

Aron


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]