Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 710372 - qsize should accept slots, and support optional slot output mode.
Summary: qsize should accept slots, and support optional slot output mode.
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-21 07:13 UTC by Robin Johnson
Modified: 2020-04-25 06:08 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2020-02-21 07:13:59 UTC
qsize does not support cat/pn:slot as input, and does not have slots in output

Present output:
$ qsize python:3.6
$ qsize -v python:3.6
$ qsize python
dev-lang/python: 6893 files, 229 non-files, 108.6M 
dev-lang/python: 4566 files, 91 non-files, 68.3M 
dev-lang/python: 6656 files, 225 non-files, 103.4M 
$ qsize -v python
dev-lang/python-3.6.9: 6893 files, 229 non-files, 108.6M 
dev-lang/python-2.7.17: 4566 files, 91 non-files, 68.3M 
dev-lang/python-3.5.9: 6656 files, 225 non-files, 103.4M 

Desired output:
$ qsize python:3.6
dev-lang/python: 6893 files, 229 non-files, 108.6M 
$ qsize -v python:3.6
dev-lang/python-3.6.9: 6893 files, 229 non-files, 108.6M 
$ qsize --slot python:3.6
dev-lang/python:3.6: 6893 files, 229 non-files, 108.6M 
$ qsize --slot -v python:3.6
dev-lang/python-3.6.9:3.6: 6893 files, 229 non-files, 108.6M 

Open question:
If a slot is required to disambiguate slots
Comment 1 Fabian Groffen gentoo-dev 2020-02-21 08:12:28 UTC
you can use -F (format) to output the slot:

% ./qsize -F "%[CAT]%[PF]%[SLOT]%[SUBSLOT]" python
dev-lang/python-2.7.16:2.7: 4102 files, 76 non-files, 63.8M 
dev-lang/python-3.7.2:3.7/3.7m: 6370 files, 230 non-files, 101.4M 
dev-lang/python-3.6.8:3.6/3.6m: 6169 files, 208 non-files, 101.4M 

that it doesn't respect the input slot is a bug.
Comment 2 Larry the Git Cow gentoo-dev 2020-02-21 08:18:01 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=814f9ad4b3bfe41617e21f634b6facb84c2e1dfe

commit 814f9ad4b3bfe41617e21f634b6facb84c2e1dfe
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2020-02-21 08:17:09 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2020-02-21 08:17:09 +0000

    libq/tree: respect SLOT in query atom for tree_open_pkg
    
    Bug: https://bugs.gentoo.org/710372
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 TODO.md     | 1 -
 libq/tree.c | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
Comment 3 Fabian Groffen gentoo-dev 2020-02-21 08:19:24 UTC
with above fix, this now works

./qsize -F "%[CAT]%[PF]%[SLOT]%[SUBSLOT]" python:3.7
dev-lang/python-3.7.2:3.7/3.7m: 6370 files, 230 non-files, 101.4M
Comment 4 Joakim Tjernlund 2020-02-26 17:57:16 UTC
Will this apply to qlist too?
Comment 5 Fabian Groffen gentoo-dev 2020-02-26 19:14:20 UTC
yes, this is a generic (e.g libq/tree) fix that affects most applets
Comment 6 Larry the Git Cow gentoo-dev 2020-03-08 08:00:09 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79b140be686c76a38301525c52e49a177d718d1d

commit 79b140be686c76a38301525c52e49a177d718d1d
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2020-03-08 07:59:56 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2020-03-08 07:59:56 +0000

    app-portage/portage-utils-0.86: version bump
    
    Closes: https://bugs.gentoo.org/711830
    Closes: https://bugs.gentoo.org/701470
    Closes: https://bugs.gentoo.org/710372
    Package-Manager: Portage-2.3.89, Repoman-2.3.20
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 app-portage/portage-utils/Manifest                                      | 2 +-
 .../{portage-utils-0.85.ebuild => portage-utils-0.86.ebuild}            | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
Comment 7 Joakim Tjernlund 2020-04-24 09:16:10 UTC
I would like to see the qsize python:3.6 syntax work too.
Comment 8 Fabian Groffen gentoo-dev 2020-04-25 06:08:34 UTC
% qsize python:3.6
dev-lang/python: 6172 files, 209 non-files, 102.1M 

works?