Hi,

On Mon, 04 Jun 2012, Dominic Hargreaves wrote:
> The attached patch solves this by using flock() which is built into
> perl, rather than an external library. My understanding is that this
> should be adequate for the purpose, but please let me know if I've missed
> something and there is a strong reason to use File::FcntlLock instead
> (if so, maybe we could make the relationship to libfile-fcntllock-perl a
> recommends, and abort if we detect that a parallel build is being invoked
> without File::FcntlLock being installed).

There was a reason, reviewing
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=642608 tells you that
we wanted locking to work on NFS too, so we wanted to use
fcntl()-based locking instead of flock()-based locking.

And using fcntl() directly from Perl is difficult. Quoting Guillem:
| to lock using fcntl(2) the function needs a struct flock which would
| need to be packed from the perl code, but the order of its members is not
| standardized anywhere, and sizeof(off_t) might vary, that's what seems
| tricky to me.

I think that we probably want to abstract the locking code and use
File::FcntlLock when available and fallback to flock() otherwise so that
we can demote it to Recommends.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Get the Debian Administrator's Handbook:
→ http://debian-handbook.info/get/



--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to