Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 65828 - All ebuilds that use freebsd-utils.eclass (un)lock-file() need to take precautions when exiting prematurely
Summary: All ebuilds that use freebsd-utils.eclass (un)lock-file() need to take precau...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All All
: High blocker (vote)
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords:
Depends on: 69507
Blocks:
  Show dependency tree
 
Reported: 2004-09-29 09:38 UTC by Aaron Walker (RETIRED)
Modified: 2006-04-12 10:49 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron Walker (RETIRED) gentoo-dev 2004-09-29 09:38:32 UTC
Any freebsd ebuild that uses (un)lock-file() from freebsd-utils.eclass needs to make sure that when exiting prematurely (ie. die), that whatever files are locked/unlocked before die'ing.  Otherwise, when going to re-merge that particular package, portage won't be able to clean ${WORKDIR}.

Anyone have any ideas for doing this transparently?
Comment 1 Stephen Bennett (RETIRED) gentoo-dev 2004-09-29 09:43:50 UTC
I was thinking at one point of trying to integrate this stuff into portage so that it would unlock the relevant files only when trying to merge them. The only problem is that afaict python doesn't have a decent interface to chflags(). I could probably write it as a small module in C to be compiled as part of the portage install, if that looks like the best way to do things.
Comment 2 Otavio Piske (RETIRED) gentoo-dev 2004-09-29 12:26:13 UTC
Some ideas: 
1. have a die() function inside eclass that when called, returns the flags to its original state.
2. implement it inside portage. Although I think that this may be complex.
3. implement it as a separated module/application that could be placed inside die() and would run when system == FreeBSD.

From now, I think we could use whatever is simpler and then implement a better/scalable one. Just my 0.02.
Comment 3 Stephen Bennett (RETIRED) gentoo-dev 2005-03-03 12:19:19 UTC
portage-2.0.51.19 is now stable and handles immutable flags transparently, so this is a non-issue now. Yay.