On Tue, Jul 12, 2011 at 10:43 PM, Roger Leigh <rle...@codelibre.net> wrote: > On Tue, Jul 12, 2011 at 09:50:22PM +0200, Thibaut VARENE wrote: >> On Tue, Jul 12, 2011 at 9:33 PM, Roger Leigh <rle...@codelibre.net> 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.
Yeah I get that. >> 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. Well, the problem is that when I first saw the error message, I didn't realize it was talking about the chroot, but I quickly suspected it (it wouldn't have made /any/ sense otherwise). This clarifies the situation. What remains unclear to the average user unaware of the implications of a fallback policy for commands is /why/ the directory needs to be in the chroot. Put another way, at some point I started believing schroot wouldn't work unless the whole /home/buildd was loop-mounted into the chroot. I didn't realize it only need the specific directory it was executed from. I suppose some extra documentation in the manpages regarding the behaviour of schroot when executing shells vs commands might be helpful to clarify this. Cheers, T-Bone -- Thibaut VARENE http://www.parisc-linux.org/~varenet/ -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org