Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 112818 - app-portage/portage-utils: qlop: args should be processed as atoms and not substring
Summary: app-portage/portage-utils: qlop: args should be processed as atoms and not su...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Third-Party Tools (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Portage Utils Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-17 06:44 UTC by Jeroen Roovers (RETIRED)
Modified: 2016-02-14 01:30 UTC (History)
2 users (show)

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


Attachments
portage-utils-0.1.9-qlop-pkgname-fix.patch (portage-utils-0.1.9-qlop-pkgname-fix.patch,795 bytes, patch)
2005-11-17 06:47 UTC, Jeroen Roovers (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeroen Roovers (RETIRED) gentoo-dev 2005-11-17 06:44:50 UTC
`qlop <pkgname>` doesn't just find <pkgname>, but in effect *<pkgname>*. The 
patch that follows makes qlop search for "/<pkgname>-x" where (! isalpha(x)).

Before the patch the output would look like this:

-------------
hpvis /keeps/gentoo/bugs # qlop -ul binutils | tail
Sat Jun 25 10:18:31 2005 <<< sys-devel/binutils-config-1.8-r3
...
Wed Nov  2 07:54:35 2005 >>> sys-devel/binutils-2.15.92.0.2-r10
-------------

whereas after the patch, it looks like this:

-------------
henke ~ # qlop -ul binutils | tail
Sun Apr 24 04:15:30 2005 >>> sys-devel/binutils-2.15.92.0.2-r7
...
Mon Jul 18 12:55:37 2005 >>> sys-devel/binutils-2.15.92.0.2-r10
-------------


Reproducible: Always
Steps to Reproduce:



Actual Results:  



Expected Results:
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2005-11-17 06:47:21 UTC
Created attachment 73086 [details, diff]
portage-utils-0.1.9-qlop-pkgname-fix.patch
Comment 2 SpanKY gentoo-dev 2005-11-17 06:56:45 UTC
all q applets suffer from this "feature"

we should prob bite the bullet and standardize this stuff ...
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2005-11-17 07:25:12 UTC
(In reply to comment #2)
> all q applets suffer from this "feature"
> 
> we should prob bite the bullet and standardize this stuff ...

Perhaps. The way I did the patch, it would return info on all ambiguous names 
cat-one/pkgname vs cat-two/pkgname. I might rewrite it to 1) apply to all 
applets (probably in main.c) and 2) to allow for the inclusion of a category, 
but not today. :)
Comment 4 Dan Girellini 2005-12-14 00:48:31 UTC
I think there is some additional brokeness with qlop.  The output from this
command doesn't seem self-consistent to me:

dan@tangier ~ $ sudo qlop -lt  links
Wed Jun 22 18:58:22 2005 >>> www-client/links-2.1_pre17
Tue Jul  5 09:24:53 2005 >>> www-client/links-2.1_pre17-r1
Mon Nov 21 15:49:38 2005 >>> www-client/links-2.1_pre18
Wed Dec 14 00:46:16 2005 >>> www-client/links-2.1_pre19
links: 98 seconds average for 7 merges
Comment 5 solar (RETIRED) gentoo-dev 2005-12-14 07:08:07 UTC
onyx ~ # qlop -t portage-utils
portage-utils: 21 seconds average for 5 merges

onyx ~ # qlop -l portage-utils
Thu Nov 10 07:28:07 2005 >>> app-portage/portage-utils-0.1.8
Mon Nov 14 13:58:42 2005 >>> app-portage/portage-utils-0.1.9
Thu Nov 17 12:44:41 2005 >>> app-portage/portage-utils-0.1.9
Fri Nov 18 17:19:38 2005 >>> app-portage/portage-utils-0.1.9
Thu Dec  1 14:22:53 2005 >>> app-portage/portage-utils-0.1.10

onyx ~ # qlop -lt portage-utils
Thu Nov 10 07:28:07 2005 >>> app-portage/portage-utils-0.1.8
Mon Nov 14 13:58:42 2005 >>> app-portage/portage-utils-0.1.9
Thu Nov 17 12:44:41 2005 >>> app-portage/portage-utils-0.1.9
Fri Nov 18 17:19:38 2005 >>> app-portage/portage-utils-0.1.9
Thu Dec  1 14:22:53 2005 >>> app-portage/portage-utils-0.1.10
portage-utils: 21 seconds average for 5 merges


How would you expect the output to look like when invoking two unrelated options?
Comment 6 SpanKY gentoo-dev 2005-12-14 07:11:23 UTC
there is a bug i noticed where qlop gets confused when you run multiple emerges
at the sametime ... so in the log file you get events like 'starting emerge;
starting emerge; finish emerge; finish emerge' instead of 'starting emerge;
finish emerge; starting emerge; finish emerge'
Comment 7 Dan Girellini 2005-12-14 09:11:56 UTC
I should have been more clear.  You can see in the command output in comment #4
that it only lists links being as being merged 4 times yet it says it calculated
its average time to merge based on 7 merges.  Where did those extra three come
from?  What else is it counting?
Comment 8 Denilson Sá Maia 2005-12-15 19:47:22 UTC
Simple way to reproduce and understand this bug:
"qdepends -a alsa"  shows a different output from  "qdepends -a media-sound/
alsa"
Comment 9 Denilson Sá Maia 2005-12-20 06:03:32 UTC
I can confirm the problem on comment #4

# genlop -t kdelibs
 * kde-base/kdelibs

     Fri Nov 25 02:58:21 2005 >>> kde-base/kdelibs-3.4.1-r1
       merge time: 5 hours, 9 minutes and 40 seconds.

     Sat Nov 26 22:03:36 2005 >>> kde-base/kdelibs-3.4.1-r1
       merge time: 1 hour, 41 minutes and 1 second.

# qlop -lt kdelibs
Fri Nov 25 02:58:21 2005 >>> kde-base/kdelibs-3.4.1-r1
Sat Nov 26 22:03:36 2005 >>> kde-base/kdelibs-3.4.1-r1
kdelibs: 6061 seconds average for 1 merges

Yes, one of those emerges (could you guess which one? ;) ) was done in parallel with some other(s) emerge(s). (confirming the comment #6)
Comment 10 Christophe Garault 2006-04-11 06:44:12 UTC
Another case which seems to demonstrate the strange behaviour of qlop:

marge ~ # qlop -gl mysql
Tue May  4 18:19:23 2004 >>> dev-db/mysql-4.0.18-r1
Tue May  4 18:20:57 2004 >>> dev-perl/DBD-mysql-2.1027
Wed May 19 12:36:41 2004 >>> dev-db/mysql-4.0.18-r2
Mon Jul 12 21:03:31 2004 >>> dev-db/mysql-4.0.20
Mon Aug 30 19:04:29 2004 >>> dev-db/mysql-4.0.20-r1
Sun Oct 24 11:59:45 2004 >>> dev-db/mysql-4.0.21
Wed Nov  3 23:00:56 2004 >>> dev-db/mysql-4.0.22
Fri Jan 21 11:52:28 2005 >>> dev-db/mysql-4.0.22-r2
Fri Feb 11 16:08:33 2005 >>> dev-perl/DBD-mysql-2.1027
Thu Mar 17 11:08:11 2005 >>> dev-db/mysql-4.0.24
Wed Apr 27 11:53:07 2005 >>> dev-perl/DBD-mysql-2.9003
Tue Aug  9 19:50:58 2005 >>> dev-perl/DBD-mysql-2.9003
Thu Aug 18 12:10:30 2005 >>> dev-db/mysql-4.0.25-r2
Tue Dec 13 13:15:19 2005 >>> dev-db/mysql-4.1.14
Tue Dec 13 13:16:01 2005 >>> dev-perl/DBD-mysql-2.9007
mysql: Tue May  4 17:49:31 2004: 1792 seconds
mysql: Wed May 19 11:37:07 2004: 3574 seconds
mysql: Mon Jul 12 20:35:21 2004: 1690 seconds
mysql: Mon Aug 30 18:32:18 2004: 1931 seconds
mysql: Fri Jan 21 11:27:04 2005: 1524 seconds
mysql: Thu Mar 17 10:36:17 2005: 1914 seconds
mysql: Thu Aug 18 11:43:43 2005: 1607 seconds
mysql: Tue Dec 13 12:05:49 2005: 4170 seconds
mysql: 8 times
marge ~ #

1st part list all 10 emerge of mysql whereas it reports only 8 in the second part. Also genlop displays all of them:

marge ~ # genlop mysql
 * dev-db/mysql

     Tue May  4 18:19:23 2004 >>> dev-db/mysql-4.0.18-r1
     Wed May 19 12:36:41 2004 >>> dev-db/mysql-4.0.18-r2
     Mon Jul 12 21:03:31 2004 >>> dev-db/mysql-4.0.20
     Mon Aug 30 19:04:29 2004 >>> dev-db/mysql-4.0.20-r1
     Sun Oct 24 11:59:45 2004 >>> dev-db/mysql-4.0.21
     Wed Nov  3 23:00:56 2004 >>> dev-db/mysql-4.0.22
     Fri Jan 21 11:52:28 2005 >>> dev-db/mysql-4.0.22-r2
     Thu Mar 17 11:08:11 2005 >>> dev-db/mysql-4.0.24
     Thu Aug 18 12:10:30 2005 >>> dev-db/mysql-4.0.25-r2
     Tue Dec 13 13:15:19 2005 >>> dev-db/mysql-4.1.14
marge ~ #
Comment 11 SpanKY gentoo-dev 2016-01-29 05:59:01 UTC
with recent versions, we have the ability to sanely process & compare atoms.  so this should be feasible now.  the advantage would you could do things like:
  qlop -l '>sys-devel/gcc-5'
  qlop -l 'python:2.7'

the downside is you'd no longer have substring matching.  but maybe that's for the best.