[Rpm-maint] odd chroot behavior inside the rpm transaction

Michael Schroeder mls at suse.de
Tue Sep 15 08:04:39 UTC 2009


On Mon, Sep 14, 2009 at 04:54:11PM -0400, Seth Vidal wrote:
>  if, from the python bindings, I open a file with a name starting with '/' 
> while in a transaction then as expected, the file is opened inside the 
> installroot
> 
> however, if I open a file with a name NOT starting with '/' then the file 
> is opened OUTSIDE of the installroot.
> 
> Does this make any sense? B/c I admit I don't quite grok why it would be 
> this way.

That's because rpm needs a way to switch back from the installroot
to the old root. It does this by doing a
    chroot(".")
call.

Cheers,
  Michael.

-- 
Michael Schroeder                                   mls at suse.de
SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}


More information about the Rpm-maint mailing list