diff options
author | David Kalnischkies <david@kalnischkies.de> | 2021-02-04 00:48:22 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2021-02-04 00:48:22 +0100 |
commit | f701eb209fcc94e5b4f80656270d2fa21663b364 (patch) | |
tree | 88c42dae3dc358b6ed164e72e4d69dd24b2192ea | |
parent | ce2fbbbcd5d81b4cfd60d2a277cbd9ee63d2c1e7 (diff) |
Show 'Done' always for 'Building dependency tree'
For years I subconsciously thought this is wrong but ignored it:
$ LANG=C apt install -s
Reading package lists... Done
Building dependency tree
Reading state information... Done
Then I noticed:
$ LANG=C apt install -s -o dir::state::extended_states=/dev/null
Reading package lists... Done
Building dependency tree... Done
That can't be! Then it really should be:
$ LANG=C apt install -s
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
This oddity seems to be in since the introduction of the auto bit in 2005
which makes this rather hard to solve in theory, but in practice no front
end seems to call the readStateFile method directly, so we might actually
be lucky.
The alternative would be to call Done in the calling method and again
at the end of readStateFile while dropping it from the current place,
but as that is more shuffling around it could be more upsetting for
other front ends. Not sure, but now that I have seen it, I want to have
it fixed one way or another… aptitude at least seems not to explode.
References: afb1e2e3bb580077c6c917e6ea98baad8f3c39b3
-rw-r--r-- | apt-pkg/depcache.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index f2b3dbcdc..3444c6a3c 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -290,8 +290,11 @@ bool pkgDepCache::readStateFile(OpProgress * const Prog) /*{{{*/ state_file.Open(state, FileFd::ReadOnly, FileFd::Extension); off_t const file_size = state_file.Size(); if(Prog != NULL) + { + Prog->Done(); Prog->OverallProgress(0, file_size, 1, _("Reading state information")); + } pkgTagFile tagfile(&state_file); pkgTagSection section; |