summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2011-03-16 11:48:07 +0100
committerDenys Vlasenko <dvlasenk@redhat.com>2011-03-16 11:48:07 +0100
commit4186340206b9ba112ec67751edf5ca63d97ced18 (patch)
tree6786242a9d6055eaada862dadf22aef57534b8b1 /src/plugins
parent45fddb77052d738512003d13fce2d5cc204de25d (diff)
downloadabrt-4186340206b9ba112ec67751edf5ca63d97ced18.tar.gz
abrt-4186340206b9ba112ec67751edf5ca63d97ced18.tar.xz
abrt-4186340206b9ba112ec67751edf5ca63d97ced18.zip
install debuginfo: honor $ABRT_VERBOSE; add "Looking for pkgs in repos" msg
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src/plugins')
-rwxr-xr-xsrc/plugins/abrt-action-install-debuginfo.py27
1 files changed, 20 insertions, 7 deletions
diff --git a/src/plugins/abrt-action-install-debuginfo.py b/src/plugins/abrt-action-install-debuginfo.py
index 9253c87f..2fc9af8c 100755
--- a/src/plugins/abrt-action-install-debuginfo.py
+++ b/src/plugins/abrt-action-install-debuginfo.py
@@ -176,11 +176,11 @@ class DebugInfoDownload(YumBase):
if not files:
return
- if verbose == 0:
- # this suppress yum messages about setting up repositories
- mute_stdout()
+ #if verbose == 0:
+ # # this suppress yum messages about setting up repositories
+ # mute_stdout()
- # make yumdownloader work as non root user.
+ # make yumdownloader work as non root user
if not self.setCacheDir():
self.logger.error("Error: can't make cachedir, exiting")
sys.exit(50)
@@ -196,14 +196,20 @@ class DebugInfoDownload(YumBase):
rid = self.repos.enableRepo(repo.id)
log1("enabled repo %s" % rid)
setattr(repo, "skip_if_unavailable", True)
+
self.repos.doSetup()
+
# This is somewhat "magic", it unpacks the metadata making it usable.
+ # Looks like this is the moment when yum talks to remote servers,
+ # which takes time (sometimes minutes), let user know why
+ # we have "paused":
+ print _("Looking for needed packages in repositories")
self.repos.populateSack(mdtype='metadata', cacheonly=1)
self.repos.populateSack(mdtype='filelists', cacheonly=1)
- if verbose == 0:
- # re-enable the output to stdout
- unmute_stdout()
+ #if verbose == 0:
+ # # re-enable the output to stdout
+ # unmute_stdout()
not_found = []
package_files_dict = {}
@@ -412,6 +418,13 @@ if __name__ == "__main__":
# localization
init_gettext()
+ ABRT_VERBOSE = os.getenv("ABRT_VERBOSE")
+ if (ABRT_VERBOSE):
+ try:
+ verbose = int(ABRT_VERBOSE)
+ except:
+ pass
+
help_text = _("Usage: %s --core=COREFILE "
"--tmpdir=TMPDIR "
"--cache=CACHEDIR") % sys.argv[0]