Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 111181

Summary: qlop in portage-utils fails silently if the user is not in the portage group
Product: Portage Development Reporter: Grant Goodyear (RETIRED) <g2boojum>
Component: ToolsAssignee: SpanKY <vapier>
Status: RESOLVED FIXED    
Severity: trivial CC: solar
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Grant Goodyear (RETIRED) gentoo-dev 2005-11-01 13:05:21 UTC
If the logfile cannot be opened (such as a permissions error), qlop silently
returns.

--- /home/grant/downloads/gentoo-projects/portage-utils/qlop.c	2005-10-31
16:39:11.000000000 -0600
+++ /var/tmp/portage/portage-utils-0.1.7/work/portage-utils-0.1.7/qlop.c
2005-11-01 14:53:02.000000000 -0600
@@ -86,8 +86,10 @@
 
 	DBG("Searching for %s in %s\n", pkg, logfile);
 
-	if ((fp = fopen(logfile, "r")) == NULL)
+	if ((fp = fopen(logfile, "r")) == NULL) {
+                warnp("Opening %s failed\n", logfile);
 		return 1;
+        }
 
 	while ((fgets(buf[0], sizeof(buf[0]), fp)) != NULL) {
 		if (strstr(buf[0], pkg) == NULL)
Comment 1 solar (RETIRED) gentoo-dev 2005-11-01 18:39:35 UTC
Added the suggested fix to -projects/portage-utils. 
Perhaps later on we will move the error handler to where the function 
returns for the flags your using vs where it is now. 
This bug will be fixed in 0.1.8
Comment 2 SpanKY gentoo-dev 2005-11-01 20:21:14 UTC
fixed the three places in qlop cvs