On Tue, Jul 12, 2011 at 09:50:22PM +0200, Thibaut VARENE wrote: > On Tue, Jul 12, 2011 at 9:33 PM, Roger Leigh <[email protected]> wrote: > > > The reason we don't implement a fallback is because it would make > > the behaviour unpredictable. The exact logic is as follows: > > OK. I'm not entirely sure I see how it would be unpredictable, and > more to the point why dchroot behaves differently from schroot, but > then again, I'm not very familiar with either tool.
When you run a command, you might need it to operate in a specific directory. Examples: rm foo ls foo make dpkg-buildpackage If we can't chdir to the specific directory, the results could be both unpredictable and disastrous! In the case of other commands such as "apt-get ..." the current directory doesn't matter, but there's no way for schroot to know that in advance, so we always have to play it safe. When we run a login shell, it's interactive, so we can affort to try fallbacks (it's what login does). dchroot is different not because it's ideal, but to preserve complete compatibility with pre-schroot dchroot implementations. It's a good reason not to use dchroot! > The thing is that the error message isn't really explicit, when you're > unaware of this "design choice"... I don't how it could be improved > though. We could add an additional information message e.g. E: Failed to change to directory ‘/tmp/syscheck’: No such file or directory I: Does this directory exist inside the chroot? I: Use the --directory option to run the command in a different directory. > You might want to mark this bug as "wontfix", it might serve as some > documentation in websearches ;-) Either that or document it more clearly in the manual pages. The fallback behaviour I copied into the previous mail is from the HACKING files (manual QA notes since this can't be tested automatically). I'm sure it could be put into one of the manual pages. Regards, Roger -- .''`. Roger Leigh : :' : Debian GNU/Linux http://people.debian.org/~rleigh/ `. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/ `- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
signature.asc
Description: Digital signature

