Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 652312 - app-portage/portage-utils: qlop -d date parsing needs to be more liberal
Summary: app-portage/portage-utils: qlop -d date parsing needs to be more liberal
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All All
: Normal normal
Assignee: Fabian Groffen
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-03 09:03 UTC by Fabian Groffen
Modified: 2018-05-18 12:27 UTC (History)
1 user (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 Fabian Groffen gentoo-dev 2018-04-03 09:03:55 UTC
qlop -d accepts almost no dates, it must in a be very specific date format, which isn't documented either.  Also adding something like "today" would be nice.

Reproducible: Always
Comment 1 Amel Hodzic 2018-04-12 01:05:18 UTC
FWIW, the original comment to this bug (from 20180403) states that there's no documentation about the expected date/time format.  I did get some useful info back when qlop -d failed via commandline.  I'm not sure if docs need to be updated, but the tool itself is helpful in that regard
Comment 2 Amel Hodzic 2018-04-12 01:06:14 UTC
qlop -d 20180411
Usage: qlop [opts] <pkgname> : emerge log analyzer

The --date option can take a few forms:
  -d '# <day|week|month|year>[s] [ago]'  (e.g. '3 days ago')
Or using strptime(3) formats:
  -d '2015-12-25'           (detected as %F)
  -d '1459101740'           (detected as %s)
  -d '%d.%m.%Y|25.12.2015'  (format is specified)
Comment 3 Fabian Groffen gentoo-dev 2018-04-12 06:44:17 UTC
openindiana x64:
% qlop -l -d 2018-04-09
...

gentoo ppc64
% qlop -l -d 2018-04-09
...

gentoo amd64
% qlop -l -d 2018-04-09
...

solaris 10 sparc:
% qlop -l -d 2018-04-09
lop: invalid date: 2018-04-09
% qlop -l -d '%d.%m.%Y|9.4.2018'
...
% qlop -l -d '%Y-%m-%d|2018-04-09'
...

gentoo arm
% qlop -l -d 2018-04-09
...

I don't have a musl target or uclibc target to test, but I think it responds weird there too.
Comment 4 Larry the Git Cow gentoo-dev 2018-04-12 19:33:54 UTC
The bug has been referenced in the following commit(s):

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

commit b5cc7d87b7adf46c2444c68537d8fcfb73ae0060
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2018-04-12 19:32:37 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2018-04-12 19:32:37 +0000

    qlop: accept "today" and "yesterday" for parse_date
    
    Bug: https://bugs.gentoo.org/652312

 man/include/qlop.optdesc.yaml |  4 ++++
 man/qlop.1                    |  4 ++++
 qlop.c                        | 13 +++++++++++--
 3 files changed, 19 insertions(+), 2 deletions(-)}
Comment 5 Larry the Git Cow gentoo-dev 2018-05-18 12:27:32 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47d5c9788b9550078e17aad238fa03cabe20fd46

commit 47d5c9788b9550078e17aad238fa03cabe20fd46
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2018-05-18 12:27:07 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2018-05-18 12:27:23 +0000

    app-portage/portage-utils: version bump to v0.71
    
    Closes: https://bugs.gentoo.org/619988
    Closes: https://bugs.gentoo.org/653202
    Closes: https://bugs.gentoo.org/652312
    Closes: https://bugs.gentoo.org/652720
    Closes: https://bugs.gentoo.org/653032
    Package-Manager: Portage-2.3.24, Repoman-2.3.6

 app-portage/portage-utils/Manifest                                | 2 +-
 .../{portage-utils-0.65.ebuild => portage-utils-0.71.ebuild}      | 8 --------
 2 files changed, 1 insertion(+), 9 deletions(-)