Mailinglist Archive: zypp-commit (172 mails)

< Previous Next >
[zypp-commit] <zypper> master : Show rpm output after installing/removing (bnc #369450).
  • From: Ján Kupec <jkupec@xxxxxxx>
  • Date: Sun, 15 Feb 2009 21:40:58 +0100
  • Message-id: <E1LYo8t-0000HY-Vu@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit ccf280485344bce5b44a4af6d90239d648057db6
Author: Ján Kupec <jkupec@xxxxxxx>
Date: Sun Feb 15 21:40:58 2009 +0100

Show rpm output after installing/removing (bnc #369450).
---
src/callbacks/rpm.h | 20 +++++++++++++++++---
1 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/src/callbacks/rpm.h b/src/callbacks/rpm.h
index e9b6f3f..0251de3 100644
--- a/src/callbacks/rpm.h
+++ b/src/callbacks/rpm.h
@@ -126,7 +126,7 @@ struct ScanRpmDbReceive : public
zypp::callback::ReceiveReport<zypp::target::rpm
{
int & _step; // step counter for install & receive
steps
int last_reported;
-
+
ScanRpmDbReceive( int & step )
: _step( step )
{
@@ -181,7 +181,7 @@ struct RemoveResolvableReportReceiver : public
zypp::callback::ReceiveReport<zyp
::clock_gettime(CLOCK_REALTIME, &_last_reported);
// translators: This text is a progress display label e.g. "Removing
packagename-x.x.x [42%]"
_label = boost::str(boost::format(_("Removing %s-%s"))
- % resolvable->name() % resolvable->edition());
+ % resolvable->name() % resolvable->edition());
Zypper::instance()->out().progressStart("remove-resolvable", _label);
}

@@ -211,7 +211,14 @@ struct RemoveResolvableReportReceiver : public
zypp::callback::ReceiveReport<zyp
// set proper exit code, don't write to output, the error should have
been reported in problem()
Zypper::instance()->setExitCode(ZYPPER_EXIT_ERR_ZYPP);
else
+ {
Zypper::instance()->out().progressEnd("remove-resolvable", _label);
+
+ // print additional rpm output
+ // bnc #369450
+ if (!reason.empty())
+ Zypper::instance()->out().info(reason);
+ }
}
};

@@ -233,7 +240,7 @@ struct InstallResolvableReportReceiver : public
zypp::callback::ReceiveReport<zy
zypp::Resolvable::constPtr _resolvable;
std::string _label;
timespec _last_reported;
-
+
void display_step( zypp::Resolvable::constPtr resolvable, int value )
{
}
@@ -289,7 +296,14 @@ struct InstallResolvableReportReceiver : public
zypp::callback::ReceiveReport<zy
// don't write to output, the error should have been reported in
problem() (bnc #381203)
Zypper::instance()->setExitCode(ZYPPER_EXIT_ERR_ZYPP);
else
+ {
Zypper::instance()->out().progressEnd("install-resolvable", _label);
+
+ // print additional rpm output
+ // bnc #369450
+ if (!reason.empty())
+ Zypper::instance()->out().info(reason);
+ }
}
};

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages