Author: lslezak Date: Tue Apr 15 16:31:12 2008 New Revision: 46680 URL: http://svn.opensuse.org/viewcvs/yast?rev=46680&view=rev Log: - set the default RPM log file name in Pkg::PkgCommit() if it hasn't been set (bnc#372863) - 2.16.27 Modified: trunk/pkg-bindings/VERSION trunk/pkg-bindings/package/yast2-pkg-bindings.changes trunk/pkg-bindings/src/Package.cc trunk/pkg-bindings/src/PkgFunctions.cc trunk/pkg-bindings/src/PkgFunctions.h trunk/pkg-bindings/src/Target.cc Modified: trunk/pkg-bindings/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/VERSION?rev=46680&r1=46679&r2=46680&view=diff ============================================================================== --- trunk/pkg-bindings/VERSION (original) +++ trunk/pkg-bindings/VERSION Tue Apr 15 16:31:12 2008 @@ -1 +1 @@ -2.16.26 +2.16.27 Modified: trunk/pkg-bindings/package/yast2-pkg-bindings.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/package/yast2-pkg-bindings.changes?rev=46680&r1=46679&r2=46680&view=diff ============================================================================== --- trunk/pkg-bindings/package/yast2-pkg-bindings.changes (original) +++ trunk/pkg-bindings/package/yast2-pkg-bindings.changes Tue Apr 15 16:31:12 2008 @@ -2,6 +2,9 @@ Tue Apr 15 15:15:08 CEST 2008 - lslezak@suse.cz - added support for `languages in ResolvableProperties() +- set the default RPM log file name in Pkg::PkgCommit() if it + hasn't been set (bnc#372863) +- 2.16.27 ------------------------------------------------------------------- Fri Apr 11 15:13:53 CEST 2008 - ma@suse.de Modified: trunk/pkg-bindings/src/Package.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Package.cc?rev=46680&r1=46679&r2=46680&view=diff ============================================================================== --- trunk/pkg-bindings/src/Package.cc (original) +++ trunk/pkg-bindings/src/Package.cc Tue Apr 15 16:31:12 2008 @@ -2146,6 +2146,14 @@ try { + // if the target log is not set use the default to not loose the information + if (!target_log_set) + { + std::string default_path(_target_root.asString() + "/var/log/YaST2/y2logRPM"); + y2warning("Pkg::TargetLogFile() has not been called, using %s for logging", default_path.c_str()); + zypp_ptr()->target()->setInstallationLogfile(default_path); + } + zypp::ZYppCommitPolicy policy; policy.restrictToMedia( medianr ); result = zypp_ptr()->commit(policy); Modified: trunk/pkg-bindings/src/PkgFunctions.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/PkgFunctions.cc?rev=46680&r1=46679&r2=46680&view=diff ============================================================================== --- trunk/pkg-bindings/src/PkgFunctions.cc (original) +++ trunk/pkg-bindings/src/PkgFunctions.cc Tue Apr 15 16:31:12 2008 @@ -57,6 +57,7 @@ , _target_loaded(false) , zypp_pointer(NULL) ,_callbackHandler( *new CallbackHandler(*this) ) + ,target_log_set(false) { const char *domain = "pkg-bindings"; bindtextdomain( domain, LOCALEDIR ); Modified: trunk/pkg-bindings/src/PkgFunctions.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/PkgFunctions.h?rev=46680&r1=46679&r2=46680&view=diff ============================================================================== --- trunk/pkg-bindings/src/PkgFunctions.h (original) +++ trunk/pkg-bindings/src/PkgFunctions.h Tue Apr 15 16:31:12 2008 @@ -169,6 +169,8 @@ PkgError _last_error; + bool target_log_set; + /** * Logging helper: * search for a repository and in case of exception, log error Modified: trunk/pkg-bindings/src/Target.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Target.cc?rev=46680&r1=46679&r2=46680&view=diff ============================================================================== --- trunk/pkg-bindings/src/Target.cc (original) +++ trunk/pkg-bindings/src/Target.cc Tue Apr 15 16:31:12 2008 @@ -147,7 +147,9 @@ { try { - return YCPBoolean (zypp_ptr()->target()->setInstallationLogfile (name->value())); + bool ret = zypp_ptr()->target()->setInstallationLogfile (name->value()); + target_log_set = true; + return YCPBoolean(ret); } catch (zypp::Exception & excpt) { -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org