Bug 163908 - [patch] filesystem based race condition in multimedia/xvid
Summary: [patch] filesystem based race condition in multimedia/xvid
Status: Closed Not Enough Information
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Dima Panov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-08 05:20 UTC by Enji Cooper
Modified: 2014-09-12 04:06 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (1.58 KB, patch)
2012-01-08 05:20 UTC, Enji Cooper
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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...