Author: lslezak
Date: Wed Jan 2 17:16:17 2008
New Revision: 43256
URL: http://svn.opensuse.org/viewcvs/yast?rev=43256&view=rev
Log:
- use simple logging function
Modified:
trunk/pkg-bindings/src/Callbacks.YCP.cc
trunk/pkg-bindings/src/PkgModuleFunctions.h
trunk/pkg-bindings/src/Resolvable_Patches.cc
trunk/pkg-bindings/src/Selection.cc
trunk/pkg-bindings/src/Source_Create.cc
trunk/pkg-bindings/src/Source_Get.cc
trunk/pkg-bindings/src/Source_Installation.cc
trunk/pkg-bindings/src/Source_Set.cc
trunk/pkg-bindings/src/Target.cc
trunk/pkg-bindings/src/Target_Load.cc
trunk/pkg-bindings/src/Y2PkgFunction.cc
Modified: trunk/pkg-bindings/src/Callbacks.YCP.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Callbacks.YCP.cc?rev=43256&r1=43255&r2=43256&view=diff
==============================================================================
--- trunk/pkg-bindings/src/Callbacks.YCP.cc (original)
+++ trunk/pkg-bindings/src/Callbacks.YCP.cc Wed Jan 2 17:16:17 2008
@@ -151,7 +151,7 @@
Y2Component *c = Y2ComponentBroker::getNamespaceComponent (module.c_str());
if (c == NULL)
{
- ycp2error ("No component can provide namespace %s for a callback of %s (callback id %d)",
+ y2error ("No component can provide namespace %s for a callback of %s (callback id %d)",
module.c_str (), symbol.c_str (), id_r);
return;
}
@@ -169,7 +169,7 @@
_cbdata[id_r].push (CBdata (module, symbol, ns));
} else {
- ycp2error ("Callback must be a part of a namespace");
+ y2error ("Callback must be a part of a namespace");
}
}
/**
@@ -228,7 +228,7 @@
Y2Function* func = ns->createFunctionCall (name, Type::Unspec); // FIXME: here we can setup the type check
if (func == NULL)
{
- ycp2error ("Cannot find function %s in module %s as a callback", name.c_str (), module.c_str());
+ y2error ("Cannot find function %s in module %s as a callback", name.c_str (), module.c_str());
return NULL;
}
Modified: trunk/pkg-bindings/src/PkgModuleFunctions.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/PkgModuleFunctions.h?rev=43256&r1=43255&r2=43256&view=diff
==============================================================================
--- trunk/pkg-bindings/src/PkgModuleFunctions.h (original)
+++ trunk/pkg-bindings/src/PkgModuleFunctions.h Wed Jan 2 17:16:17 2008
@@ -26,7 +26,7 @@
#include <string>
#define y2log_component "Pkg"
-#include
+#include
class YCPBoolean;
class YCPValue;
Modified: trunk/pkg-bindings/src/Resolvable_Patches.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Resolvable_Patches.cc?rev=43256&r1=43255&r2=43256&view=diff
==============================================================================
--- trunk/pkg-bindings/src/Resolvable_Patches.cc (original)
+++ trunk/pkg-bindings/src/Resolvable_Patches.cc Wed Jan 2 17:16:17 2008
@@ -117,8 +117,8 @@
// schedule for installation
// but take the best edition. Bug #206927
{
- stringstream str;
- str << *i << endl;
+ std::ostringstream str;
+ str << *i << std::endl;
y2milestone( "Setting '%s' to transact", str.str().c_str() );
// selected successfully - increase the counter
selected_patches++;
Modified: trunk/pkg-bindings/src/Selection.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Selection.cc?rev=43256&r1=43255&r2=43256&view=diff
==============================================================================
--- trunk/pkg-bindings/src/Selection.cc (original)
+++ trunk/pkg-bindings/src/Selection.cc Wed Jan 2 17:16:17 2008
@@ -519,7 +519,7 @@
YCPValue
PkgModuleFunctions::ClearSelection (const YCPString& selection)
{
- ycpwarning( "Pkg::ClearSelection does not reset add-on selections anymore");
+ y2warning( "Pkg::ClearSelection does not reset add-on selections anymore");
return YCPBoolean( DoRemoveNameKind( selection->value(), zypp::ResTraitszypp::Selection::kind ) );
}
Modified: trunk/pkg-bindings/src/Source_Create.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Source_Create.cc?rev=43256&r1=43255&r2=43256&view=diff
==============================================================================
--- trunk/pkg-bindings/src/Source_Create.cc (original)
+++ trunk/pkg-bindings/src/Source_Create.cc Wed Jan 2 17:16:17 2008
@@ -403,7 +403,7 @@
{
if (aliasExists(alias))
{
- ycperror("alias %s already exists", alias.c_str());
+ y2error("alias %s already exists", alias.c_str());
return YCPVoid();
}
}
@@ -421,7 +421,7 @@
{
if( ! lst->value(index)->isString() )
{
- ycperror( "Pkg::RepositoryAdd(): entry not a string at index %d: %s", index, lst->toString().c_str());
+ y2error( "Pkg::RepositoryAdd(): entry not a string at index %d: %s", index, lst->toString().c_str());
return YCPVoid();
}
@@ -460,7 +460,7 @@
}
else
{
- ycperror("Missing \"base_urls\" key in the map");
+ y2error("Missing \"base_urls\" key in the map");
return YCPVoid();
}
@@ -490,7 +490,7 @@
}
catch (zypp::repo::RepoUnknownTypeException &e)
{
- ycperror("Unknown source type '%s': %s", type.c_str(), e.asString().c_str());
+ y2error("Unknown source type '%s': %s", type.c_str(), e.asString().c_str());
_last_error.setLastError(ExceptionAsString(e));
return YCPVoid();
}
Modified: trunk/pkg-bindings/src/Source_Get.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Source_Get.cc?rev=43256&r1=43255&r2=43256&view=diff
==============================================================================
--- trunk/pkg-bindings/src/Source_Get.cc (original)
+++ trunk/pkg-bindings/src/Source_Get.cc Wed Jan 2 17:16:17 2008
@@ -33,6 +33,8 @@
#include
#include
#include
+#include
+#include
/*
Textdomain "pkg-bindings"
Modified: trunk/pkg-bindings/src/Source_Installation.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Source_Installation.cc?rev=43256&r1=43255&r2=43256&view=diff
==============================================================================
--- trunk/pkg-bindings/src/Source_Installation.cc (original)
+++ trunk/pkg-bindings/src/Source_Installation.cc Wed Jan 2 17:16:17 2008
@@ -31,6 +31,7 @@
#include
#include
+#include
/*
Textdomain "pkg-bindings"
Modified: trunk/pkg-bindings/src/Source_Set.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Source_Set.cc?rev=43256&r1=43255&r2=43256&view=diff
==============================================================================
--- trunk/pkg-bindings/src/Source_Set.cc (original)
+++ trunk/pkg-bindings/src/Source_Set.cc Wed Jan 2 17:16:17 2008
@@ -148,7 +148,7 @@
{
if( ! states->value(index)->isMap() )
{
- ycperror( "Pkg::SourceEditSet, entry not a map at index %d", index);
+ y2error( "Pkg::SourceEditSet, entry not a map at index %d", index);
error = true;
continue;
}
@@ -157,7 +157,7 @@
if (descr->value( YCPString("SrcId") ).isNull() || !descr->value(YCPString("SrcId"))->isInteger())
{
- ycperror( "Pkg::SourceEditSet, SrcId not defined for a source description at index %d", index);
+ y2error( "Pkg::SourceEditSet, SrcId not defined for a source description at index %d", index);
error = true;
continue;
}
@@ -167,7 +167,7 @@
YRepo_Ptr repo = logFindRepository(id);
if (!repo)
{
- ycperror( "Pkg::SourceEditSet, source %d not found", index);
+ y2error( "Pkg::SourceEditSet, source %d not found", index);
error = true;
continue;
}
@@ -179,7 +179,7 @@
if (repo->repoInfo().enabled() != enable)
{
- ycpwarning("Pkg::SourceEditSet() does not refresh the pool (src: %zd, state: %s)", id, enable ? "disabled -> enabled" : "enabled -> disabled");
+ y2warning("Pkg::SourceEditSet() does not refresh the pool (src: %zd, state: %s)", id, enable ? "disabled -> enabled" : "enabled -> disabled");
}
y2debug("set enabled: %d", enable);
Modified: trunk/pkg-bindings/src/Target.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Target.cc?rev=43256&r1=43255&r2=43256&view=diff
==============================================================================
--- trunk/pkg-bindings/src/Target.cc (original)
+++ trunk/pkg-bindings/src/Target.cc Wed Jan 2 17:16:17 2008
@@ -66,7 +66,7 @@
catch (zypp::Exception & excpt)
{
_last_error.setLastError(ExceptionAsString(excpt));
- ycperror("TargetDisableSources has failed: %s", excpt.msg().c_str() );
+ y2error("TargetDisableSources has failed: %s", excpt.msg().c_str() );
return YCPBoolean(false);
}
@@ -96,7 +96,7 @@
catch (zypp::Exception & excpt)
{
_last_error.setLastError(ExceptionAsString(excpt));
- ycperror("TargetInstall has failed: %s", excpt.asString().c_str());
+ y2error("TargetInstall has failed: %s", excpt.asString().c_str());
return YCPBoolean(false);
}
@@ -125,7 +125,7 @@
catch (zypp::Exception & excpt)
{
_last_error.setLastError(ExceptionAsString(excpt));
- ycperror("TargetRemove has failed: %s", excpt.asString().c_str());
+ y2error("TargetRemove has failed: %s", excpt.asString().c_str());
return YCPBoolean(false);
}
@@ -150,7 +150,7 @@
catch (zypp::Exception & excpt)
{
_last_error.setLastError(ExceptionAsString(excpt));
- ycperror("TargetLogfile has failed: %s", excpt.asString().c_str());
+ y2error("TargetLogfile has failed: %s", excpt.asString().c_str());
return YCPBoolean(false);
}
return YCPBoolean (true); // never reached
@@ -257,7 +257,7 @@
catch (zypp::Exception & excpt)
{
_last_error.setLastError(ExceptionAsString(excpt));
- ycperror("TargetRebuildDB has failed: %s", excpt.msg().c_str() );
+ y2error("TargetRebuildDB has failed: %s", excpt.msg().c_str() );
return YCPBoolean(false);
}
Modified: trunk/pkg-bindings/src/Target_Load.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Target_Load.cc?rev=43256&r1=43255&r2=43256&view=diff
==============================================================================
--- trunk/pkg-bindings/src/Target_Load.cc (original)
+++ trunk/pkg-bindings/src/Target_Load.cc Wed Jan 2 17:16:17 2008
@@ -67,7 +67,7 @@
catch (zypp::Exception & excpt)
{
_last_error.setLastError(ExceptionAsString(excpt));
- ycperror("TargetInit has failed: %s", excpt.msg().c_str() );
+ y2error("TargetInit has failed: %s", excpt.msg().c_str() );
return YCPError(excpt.msg().c_str(), YCPBoolean(false));
}
@@ -97,7 +97,7 @@
catch (zypp::Exception & excpt)
{
_last_error.setLastError(ExceptionAsString(excpt));
- ycperror("TargetInit has failed: %s", excpt.msg().c_str() );
+ y2error("TargetInit has failed: %s", excpt.msg().c_str() );
return YCPError(excpt.msg().c_str(), YCPBoolean(false));
}
@@ -129,7 +129,7 @@
catch (zypp::Exception & excpt)
{
_last_error.setLastError(ExceptionAsString(excpt));
- ycperror("TargetLoad has failed: %s", excpt.msg().c_str() );
+ y2error("TargetLoad has failed: %s", excpt.msg().c_str() );
return YCPError(excpt.msg().c_str(), YCPBoolean(false));
}
@@ -155,7 +155,7 @@
catch (zypp::Exception & excpt)
{
_last_error.setLastError(ExceptionAsString(excpt));
- ycperror("TargetFinish has failed: %s", excpt.msg().c_str() );
+ y2error("TargetFinish has failed: %s", excpt.msg().c_str() );
return YCPBoolean(false);
}
Modified: trunk/pkg-bindings/src/Y2PkgFunction.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Y2PkgFunction.cc?rev=43256&r1=43255&r2=43256&view=diff
==============================================================================
--- trunk/pkg-bindings/src/Y2PkgFunction.cc (original)
+++ trunk/pkg-bindings/src/Y2PkgFunction.cc Wed Jan 2 17:16:17 2008
@@ -32,6 +32,8 @@
#include
#include
+#include
+
Y2PkgFunction::Y2PkgFunction (string name, PkgModuleFunctions* instance, unsigned int pos) :
m_position (pos)
, m_instance (instance)
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org