First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 124440
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Web Application Packages Maintainers <web-apps@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Alec Warner <antarus@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
webapp-cleaner webapp-cleaner text/plain Renat Lumpau 2006-07-03 13:24 0000 2.65 KB Details
webapp.eclass_emerge.patch webapp.eclass_emerge.patch patch Renat Lumpau 2006-07-03 13:26 0000 1.13 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 124440 depends on: Show dependency tree
Show dependency graph
Bug 124440 blocks: 127144
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-02-28 10:27 0000
You cannot call emege in any ebuild or eclass.  It is not safe as locking is
not used everywhere and there are races in certain areas still.

------- Comment #1 From Renat Lumpau 2006-02-28 10:28:40 0000 -------
thanks for reporting

------- Comment #2 From SpanKY 2006-02-28 20:55:32 0000 -------
> You cannot call emege in any ebuild or eclass.  It is not safe as locking is
> not used everywhere and there are races in certain areas still.

not only that, but emerge also utilizes environment pollution to pass
information, and the sandbox gets very very pissed

------- Comment #3 From Stuart Herbert (RETIRED) 2006-03-01 01:44:25 0000 -------
(In reply to comment #2)
> not only that, but emerge also utilizes environment pollution to pass
> information, and the sandbox gets very very pissed

Do you have an example demonstrating how this breaks the sandbox?  I'm not
aware of anyone ever having a problem installing a web-based app because of the
interaction between the environment pollution and the sandbox.

Best regards,
Stu

------- Comment #4 From Stuart Herbert (RETIRED) 2006-03-01 01:47:09 0000 -------
(In reply to comment #0)
> You cannot call emege in any ebuild or eclass.  It is not safe as locking is
> not used everywhere and there are races in certain areas still.

I believe we've been able to get away with this so far because webapps are at
the bottom of the resolver tree, so to speak.  Can you help me out by providing
an example of where a missing lock or an existing race condition causes a
problem with the way we're doing this?

Do you have any suggestions on how we can switch away from calling emerge?

Best regards,
Stu

------- Comment #5 From Stuart Herbert (RETIRED) 2006-03-01 05:02:27 0000 -------
I have a suggestion that might solve this.

We can introduce a new tool called webapp-cleaner.  Instead of calling emerge
-C from the eclass, we'll call 'webapp-cleaner --check-if-clean-required'
instead.  This mode will output a message if the user has web-based
applications that need removing, and will prompt the user to run
'webapp-cleaner --clean ${PN}' for themselves.

webapp-cleaner --clean will remove all installed web-based apps that have *not*
been installed using webapp-config, by building up a call to emerge -C.

This solution moves the emerge -C call out from the eclass into a tool that the
user runs outside Portage.  I believe that would satisfy all parties?

Best regards,
Stu

------- Comment #6 From solar 2006-03-01 05:07:49 0000 -------
I think you can safely unmerge files without the need of using portage at all.
It would take a little effort. But not so much.
I've been over this with the portage team before about calling emerge from
within 
an ebuild. You are the first guy to take the stance of saying it's a QA
problem. 
While it's not ideal it can be done correctly by exporting the right variables.

------- Comment #7 From Ciaran McCreesh 2006-03-01 09:53:24 0000 -------
(In reply to comment #5)
> This solution moves the emerge -C call out from the eclass into a tool that the
> user runs outside Portage.  I believe that would satisfy all parties?

Works for me.

------- Comment #8 From Gunnar Wrobel 2006-04-20 16:03:55 0000 -------
*** Bug 127144 has been marked as a duplicate of this bug. ***

------- Comment #9 From Renat Lumpau 2006-07-03 13:24:54 0000 -------
Created an attachment (id=90810) [edit]
webapp-cleaner

------- Comment #10 From Renat Lumpau 2006-07-03 13:26:17 0000 -------
Created an attachment (id=90811) [edit]
webapp.eclass_emerge.patch

------- Comment #11 From Renat Lumpau 2006-07-03 13:28:13 0000 -------
I've attached webapp-cleaner and a corresponding patch to webapp.eclass. If
this looks sane, I'd like to commit both soon.

------- Comment #12 From Renat Lumpau 2006-07-19 15:38:48 0000 -------
webapp-cleaner is part of webapp-config-1.50.15

------- Comment #13 From Elfyn McBratney (beu) (RETIRED) 2006-11-20 04:48:34 0000 -------
Ping?  Any progress on this?

------- Comment #14 From Elfyn McBratney (beu) (RETIRED) 2006-11-20 04:52:01 0000 -------
What I should have noted in comment #13 is that this is still causing problems
as the eclass is still calling emerge...

------- Comment #15 From Stuart Herbert (RETIRED) 2006-11-20 05:33:03 0000 -------
We are currently waiting for a new version of webapp-config to be released
(plus the 30 days required to get it stable).

Best regards,
Stu

------- Comment #16 From Alec Warner 2006-11-30 17:53:32 0000 -------
The ~arch version of portage causes locking issues, since the parent emerge
locks the vdb, and then in the eclass another emerge is executed, which then
blocks waiting for the parent.  This is a deadlock condition.

This bug blocks the stabling of that version of portage and breaks webapps for
~arch users.

Adding dev-portage to the CC

Webapp team, how is your replacement coming along?

------- Comment #17 From Gunnar Wrobel 2006-12-05 08:52:52 0000 -------
I restarted webapp-config development now and will try to fix this asap. 

------- Comment #18 From Zac Medico 2006-12-23 03:55:34 0000 -------
(In reply to comment #16)
> The ~arch version of portage causes locking issues, since the parent emerge
> locks the vdb, and then in the eclass another emerge is executed, which then
> blocks waiting for the parent.  This is a deadlock condition.

As a workaround this, the eclass can remove
${ROOT}/var/db/.pkg.portage_lockfile before calling emerge.  Yes, it defeats
the whole purpose of the lock, but it's  probably a better alternative than the
deadlock that users are currently exposed to.

------- Comment #19 From Ciaran McCreesh 2006-12-23 04:14:29 0000 -------
What? That's a horrible idea. This thing needs fixed, not worked around. Are
you seriously suggesting adding yet another hack to webapp.eclass???

------- Comment #20 From Zac Medico 2006-12-24 18:16:36 0000 -------
(In reply to comment #19)
> What? That's a horrible idea. This thing needs fixed, not worked around. Are
> you seriously suggesting adding yet another hack to webapp.eclass???

The current behavior is broken, and removing the lock file won't really make it
it any worse than it already is.  I just want the webapp.eclass maintainers to
know all possible options.

------- Comment #21 From Zac Medico 2006-12-25 00:09:04 0000 -------
In cvs I've added an ewarn message so that users experiencing a deadlock won't
have to search in order to find out what went wrong:

 * This action may result in a deadlock.  Please refer to
 * http://bugs.gentoo.org/show_bug.cgi?id=124440 for more information.

------- Comment #22 From Renat Lumpau 2006-12-31 11:29:09 0000 -------
done

First Last Prev Next    No search results available      Search page      Enter new bug