Bug 164351 - [bsd.port.mk] [patch] fix simple race condition in making work directory
Summary: [bsd.port.mk] [patch] fix simple race condition in making work directory
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-21 10:40 UTC by Enji Cooper
Modified: 2014-07-15 13:14 UTC (History)
0 users

See Also:


Attachments
file.diff (997 bytes, patch)
2012-01-21 10:40 UTC, Enji Cooper
no flags Details | Diff
ports-fix-mkdir-WRKDIR-race-condition.patch.txt (4.29 KB, TEXT/PLAIN; charset=US-ASCII)
2012-01-21 20:15 UTC, Enji Cooper
no flags Details

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-21 10:40:09 UTC
make -j with -j > 1 doesn't work out of the box today because of inherent race conditions in terms of how the licensing framework works today. Instead of properly defining the WRKDIR target in bsd.ports.mk, it was being defined inline in the package-noinstall target and implicitly being depended upon in the ${_LICENSE_COOKIE} target under bsd.licenses.mk .

Fix: Patch attached with submission follows:
How-To-Repeat: cd /usr/ports/devel/gettext; make -j10 all
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2012-01-21 14:05:38 UTC
Responsible Changed
From-To: freebsd-ports-bugs->portmgr

portmgr territory.
Comment 2 Enji Cooper freebsd_committer freebsd_triage 2012-01-21 20:15:18 UTC
 	This patch goes a little bit further to break down some race 
conditions, but it's not perfect (the existing infrastructure gets hung up 
on other bits with ${TMPPLIST}), but it's a step forward.
Thanks,
-Garrett
Comment 3 Martin Wilke freebsd_committer freebsd_triage 2012-05-22 08:00:03 UTC
Responsible Changed
From-To: portmgr->miwi

take for exprun
Comment 4 Martin Wilke freebsd_committer freebsd_triage 2012-05-22 09:13:39 UTC
State Changed
From-To: open->feedback

Hi, 

This patchset reject for me .. can u please make an cvs diff .. 


16:13][miwi@miwifbsd] $ patch -p1 --check < 
query-pr.cgi?pr=ports%2F164351&getpatch=2 
(~/dev/ports/Mk) Hmm...  Looks like a unified diff to me...  The text 
leading up to this was: -------------------------- |diff --git 
a/bsd.licenses.mk b/bsd.licenses.mk |index 0247df7..348d4da 100644 |--- 
a/bsd.licenses.mk |+++ b/bsd.licenses.mk -------------------------- 
Patching file bsd.licenses.mk using Plan A...  Hunk #1 failed at 574. 
Hunk #2 failed at 739.  2 out of 2 hunks failed--saving rejects to 
bsd.licenses.mk.rej Hmm...  The next patch looks like a unified diff to 
me...  The text leading up to this was: -------------------------- |diff 
--git a/bsd.port.mk b/bsd.port.mk |index 1a29521..1bb9a6f 100644 |--- 
a/bsd.port.mk |+++ b/bsd.port.mk -------------------------- Patching 
file bsd.port.mk using Plan A...  Hunk #1 failed at 1143.  Hunk #2 
failed at 1551.  Hunk #3 failed at 3424.  Hunk #4 failed at 3550.  Hunk 
#5 failed at 3956.  Hunk #6 failed at 4002.  Hunk #7 failed at 4207. 
Hunk #8 failed at 4590.  Hunk #9 failed at 4662.  Hunk #10 failed at 
4943.  Hunk #11 failed at 5609.  11 out of 11 hunks failed--saving 
rejects to bsd.port.mk.rej
Comment 5 Martin Wilke freebsd_committer freebsd_triage 2012-06-04 04:42:32 UTC
Responsible Changed
From-To: miwi->portmgr

back to portmgr, waiting of a new patch
Comment 6 commit-hook freebsd_committer freebsd_triage 2014-07-15 13:14:01 UTC
A commit references this bug:

Author: bapt
Date: Tue Jul 15 13:13:04 UTC 2014
New revision: 361917
URL: http://svnweb.freebsd.org/changeset/ports/361917

Log:
  Fix simple condition in making directories

  Phabric:	D101
  PR:		164351
  Submitted by:	yaneurabeya@gmail.com
  Reviewed by:	swills

Changes:
  head/Mk/bsd.port.mk