Bug 163908

Summary: [patch] filesystem based race condition in multimedia/xvid
Product: Ports & Packages Reporter: Enji Cooper <ngie>
Component: Individual Port(s)Assignee: Dima Panov <fluffy>
Status: Closed Not Enough Information    
Severity: Affects Only Me CC: cs
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Enji Cooper freebsd_committer freebsd_triage 2012-01-08 05:20:05 UTC
Compilation failures occur regularly on build.ixsystems.com (but I've also seen it occur on streetfighter.ixsystems.com) because a directory was created via install -d, but it already exists and thus install fails.

The best solution to this problem would be to create rules that mkdir // install the directories, s.t. gmake could resolve the dependencies, create the directories beforehand, and the race would be resolved (I've done it before with LTP), but it's trickier with xvid because it uses some whacky pattern rules and I'm short on time right now (I might submit a proper patch upstream after I submit the bug report).

The attached patch just changes $(INSTALL) to mkdir -m 0755 -p as a simple hack, because mkdir -p doesn't fail if the target directory already exists.

Fix: Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-01-08 05:20:17 UTC
Responsible Changed
From-To: freebsd-ports-bugs->fluffy

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Enji Cooper freebsd_committer freebsd_triage 2012-01-08 06:23:10 UTC
Please note that:

+        @mkdir -m 0755 -p -d $(DESTDIR)$(includedir)

should be:

+        @mkdir -m 0755 -p $(DESTDIR)$(includedir)
Comment 3 Carlo Strub freebsd_committer freebsd_triage 2014-09-11 20:08:25 UTC
Is this PR still relevant?
Comment 4 Enji Cooper freebsd_committer freebsd_triage 2014-09-11 20:09:48 UTC
(In reply to Carlo Strub from comment #3)
> Is this PR still relevant?

Not sure. Haven't run FreeBSD on a desktop for a while...