Bug #752
cl-update --help broken?
Status: | New | Start: | 07/06/2015 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% |
|
Category: | - | Spent time: | - | |
Target version: | - | |||
Votes: | 0 |
Description
If I run:
cl-update --help
it runs:
/usr/bin/git --git-dir /usr/portage/.git --work-tree /usr/portage status -b --porcelain
before it gets around to printing the help.
Does this make sense?
It seems that this behavior would have to affect any other code that uses main in cl_server - not that it will run git, but that it will do something other than just printing the help for the command. For example, when I try "cl-core-request-show --help" it takes several seconds before I get the command help.
History
Updated by Scott Bertilson over 8 years ago
I see that the git request is also done for cl-core-variables-show. I can tell that it is cached, but the interval seems fairly short - less than an hour.
Actually, it doesn't seem consistently cached because I ran the command several times within about 20 seconds and the first 2 times it ran git, but then it didn't any more.
Updated by Scott Bertilson over 8 years ago
Actually, I'm now thinking that the succeeding git runs must have been so fast that I didn't see them because I'm watching with top and have noticed that they go by very fast if the update interval is timed right.
Updated by Scott Bertilson over 8 years ago
Planted a wrapper script in place of git so I could log the invocations.
The following is what I see for cl-update --help
/usr/bin/git --git-dir /usr/portage/.git --work-tree /usr/portage status -b --porcelain
0.52user 3.42system 2:37.31elapsed 2%CPU (0avgtext+0avgdata 171104maxresident)k
684688inputs+0outputs (537major+8295minor)pagefaults 0swaps
/usr/bin/git --git-dir /var/lib/layman/calculate/.git --work-tree /var/lib/layman/calculate status -b --porcelain
0.04user 0.24system 0:07.49elapsed 3%CPU (0avgtext+0avgdata 21232maxresident)k
71200inputs+0outputs (149major+917minor)pagefaults 0swaps
/usr/bin/git --git-dir /var/lib/layman/distros/.git --work-tree /var/lib/layman/distros status -b --porcelain
0.00user 0.00system 0:00.48elapsed 2%CPU (0avgtext+0avgdata 13312maxresident)k
4352inputs+0outputs (21major+183minor)pagefaults 0swaps
As a result, it takes over 2.5 minutes before the help output is displayed.
Updated by Mikhail Hiretsky over 8 years ago
The problem will be resolved in calculate-utils-3.4.