Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 239315 Details for
Bug 274489
app-portage/portage-utils-0.2: qlop -g doesn't show all the emerge instances
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
qlop.c.diff
qlop.c.diff (text/plain), 1.84 KB, created by
Fabio Rossi
on 2010-07-18 22:08:25 UTC
(
hide
)
Description:
qlop.c.diff
Filename:
MIME Type:
Creator:
Fabio Rossi
Created:
2010-07-18 22:08:25 UTC
Size:
1.84 KB
patch
obsolete
>--- qlop.c.orig 2010-01-17 01:26:29.000000000 +0100 >+++ qlop.c 2010-07-19 00:02:17.000000000 +0200 >@@ -88,11 +88,12 @@ > { > FILE *fp; > char cat[126], buf[2][BUFSIZ]; >- char *pkg, *p; >+ char *pkg, *p, *q; > char ep[BUFSIZ]; > unsigned long count, merge_time; > time_t t[2]; > depend_atom *atom; >+ unsigned int parallel_emerge; > > t[0] = t[1] = 0UL; > count = merge_time = 0; >@@ -148,6 +149,7 @@ > matched = 1; > > if (matched) { >+ parallel_emerge = 0; > while ((fgets(buf[0], sizeof(buf[0]), fp)) != NULL) { > if ((p = strchr(buf[0], '\n')) != NULL) > *p = 0; >@@ -157,6 +159,41 @@ > t[1] = atol(buf[0]); > strcpy(buf[1], p + 1); > rmspace(buf[1]); >+ >+ if (strncmp(buf[1], "Started emerge on:", 18) == 0) { >+ /* a parallel emerge was launched */ >+ parallel_emerge++; >+ continue; >+ } >+ >+ if (strncmp(buf[1], "*** terminating.", 16) == 0) { >+ if (parallel_emerge > 0) { >+ /* a parallel emerge has finished */ >+ parallel_emerge--; >+ continue; >+ } >+ else /* the main emerge was stopped */ >+ break; >+ } >+ >+ /* >+ * pay attention to malformed log files (when the end of an emerge process >+ * is not indicated by the line '*** terminating'). We assume than the log is >+ * malformed when we find a parallel emerge process which is trying to >+ * emerge the same package >+ */ >+ if (strncmp(buf[1], ">>> emerge (", 12) == 0 && parallel_emerge > 0) { >+ if ((p = strchr(buf[1], ')')) == NULL || (q = strchr(ep, ')')) == NULL) >+ continue; >+ >+ if (!strcmp(p,q)) { >+ parallel_emerge--; >+ /* update the main emerge reference data */ >+ snprintf(ep, BUFSIZ, "completed %s", &buf[1][4]); >+ continue; >+ } >+ } >+ > if ((strncmp(&buf[1][4], ep, BUFSIZ)) == 0) { > if (!average) { > strcpy(buf[1], "");
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 274489
:
214318
|
223381
| 239315