Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 351100
Collapse All | Expand All

(-)portage-utils-0.5/qlop.c (-6 / +18 lines)
Lines 88-98 Link Here
88
{
88
{
89
	FILE *fp;
89
	FILE *fp;
90
	char cat[126], buf[2][BUFSIZ];
90
	char cat[126], buf[2][BUFSIZ];
91
	char *pkg, *p, *q;
91
	char *pkg, *p;
92
	char ep[BUFSIZ];
92
	char ep[BUFSIZ];
93
	unsigned long count, merge_time;
93
	unsigned long count, merge_time;
94
	time_t t[2];
94
	time_t t[2];
95
	depend_atom *atom;
95
	depend_atom *atom, *atom2;
96
	unsigned int parallel_emerge;
96
	unsigned int parallel_emerge;
97
97
98
	t[0] = t[1] = 0UL;
98
	t[0] = t[1] = 0UL;
Lines 183-199 Link Here
183
					 * emerge the same package
183
					 * emerge the same package
184
					 */
184
					 */
185
					if (strncmp(buf[1], ">>> emerge (", 12) == 0 && parallel_emerge > 0) {
185
					if (strncmp(buf[1], ">>> emerge (", 12) == 0 && parallel_emerge > 0) {
186
						p = strchr(buf[1], ')');
186
						if ((p = strchr(buf[1], ')')) == NULL)
187
						q = strchr(ep, ')');
187
							continue;
188
						if (!p || !q)
188
						strcpy(buf[0], p + 1);
189
						rmspace(buf[0]);
190
						if ((p = strchr(buf[0], ' ')) == NULL)
191
							continue;
192
						*p = 0;
193
						if ((atom2 = atom_explode(buf[0])) == NULL)
189
							continue;
194
							continue;
190
195
191
						if (!strcmp(p, q)) {
196
						if (0 == strcmp(atom->CATEGORY, atom2->CATEGORY) && 0 == strcmp(atom->PN, atom2->PN)) {
197
							atom_implode(atom);
198
							atom=atom2;
199
							atom2=0;
200
							t[0] = t[1];
192
							parallel_emerge--;
201
							parallel_emerge--;
193
							/* update the main emerge reference data */
202
							/* update the main emerge reference data */
194
							snprintf(ep, BUFSIZ, "completed %s", &buf[1][4]);
203
							snprintf(ep, BUFSIZ, "completed %s", &buf[1][4]);
195
							continue;
204
							continue;
196
						}
205
						}
206
						else {
207
							atom_implode(atom2);
208
						}
197
					}
209
					}
198
210
199
					if (strncmp(&buf[1][4], ep, BUFSIZ) == 0) {
211
					if (strncmp(&buf[1][4], ep, BUFSIZ) == 0) {

Return to bug 351100