Hi,

Clint Adams wrote:
> On Wed, Jun 15, 2011 at 02:41:01PM +0200, Martin Pitt wrote:

>> I tracked this down to apt-cache now failing to work under fakeroot:
>> 
>> $ fakeroot apt-cache policy coreutils
>> E: Could not open file /var/cache/apt/pkgcache.bin - open (13: Permission 
>> denied)
>> E: Failed to truncate file - ftruncate (9: Bad file descriptor)
>> E: The package lists or status file could not be parsed or opened.
[...]
>> It's a bit hard to say whether this is a bug in apt, or whether
>> fakeroot shouldn't claim that access() works when it doesn't. Clint
>> seems to have anticipated that in [2] already.

Yikes, thanks for a heads up.

One approach would be to say that running a typical test suite is not
something fakeroot can fully support, and the behavior of fakeroot
should be tuned for whatever is done outside the testsuite.
Unfortunately, both of the motivating examples were testsuites, so
that doesn't really give an answer.

access() seems to be used in build processes in two ways:

 - on one hand, it can be used as the git test suite uses it, to
   tell if a process has too much permission to test permissions
   problems (i.e., in order to say "this environment is too crazy ---
   let's _skip_ some tests");

 - on the other hand, it can be used as in Martin's example test
   suite, to opportunistically say "If I have permission to make
   something --- e.g., a cache --- in the system a little better,
   let me actually do that".

In an ideal world, the latter is a bug.  Permissions can change
between time of check and time of use, so if the operation requiring
permission is not essential then later access errors should induce
warnings, not errors.

But we live in the real world.  Maybe it would be best to revert the
change in sid and introduce it in experimental, to get a better sense
of whether the weight of the impact goes one way or another.

Anyway, Clint, please feel free to revert the change.  I'll think
more.

Regards,
Jonathan



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to