Author: mvidner
Date: Thu Oct 4 15:08:36 2007
New Revision: 41260
URL: http://svn.opensuse.org/viewcvs/yast?rev=41260&view=rev
Log:
Distinguish "foo.ycp contains an error" from "foo.ycp not found"
(#330656).
Added:
trunk/core/liby2/src/Y2ErrorComponent.cc
trunk/core/liby2/src/include/y2/Y2ErrorComponent.h
Modified:
trunk/core/VERSION
trunk/core/liby2/src/Makefile.am
trunk/core/liby2/src/genericfrontend.cc
trunk/core/liby2/src/include/y2/Makefile.am
trunk/core/package/yast2-core.changes
trunk/core/wfm/src/Y2CCWFM.cc
Modified: trunk/core/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/VERSION?rev=41260&r1=41259&r2=41260&view=diff
==============================================================================
--- trunk/core/VERSION (original)
+++ trunk/core/VERSION Thu Oct 4 15:08:36 2007
@@ -1 +1 @@
-2.16.0
+2.16.1
Modified: trunk/core/liby2/src/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/liby2/src/Makefile.am?rev=41260&r1=41259&r2=41260&view=diff
==============================================================================
--- trunk/core/liby2/src/Makefile.am (original)
+++ trunk/core/liby2/src/Makefile.am Thu Oct 4 15:08:36 2007
@@ -17,6 +17,7 @@
Y2LanguageLoader.cc \
genericfrontend.cc \
SymbolEntry.cc \
+ Y2ErrorComponent \
Y2ProgramComponent.cc Y2CCProgram.cc \
Y2PluginComponent.cc Y2CCPlugin.cc \
Y2StdioComponent.cc Y2CCStdio.cc
Added: trunk/core/liby2/src/Y2ErrorComponent.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/liby2/src/Y2ErrorComponent.cc?rev=41260&view=auto
==============================================================================
--- trunk/core/liby2/src/Y2ErrorComponent.cc (added)
+++ trunk/core/liby2/src/Y2ErrorComponent.cc Thu Oct 4 15:08:36 2007
@@ -0,0 +1,24 @@
+/*---------------------------------------------------------------------\
+| |
+| __ __ ____ _____ ____ |
+| \ \ / /_ _/ ___|_ _|___ \ |
+| \ V / _` \___ \ | | __) | |
+| | | (_| |___) || | / __/ |
+| |_|\__,_|____/ |_| |_____| |
+| |
+| core system |
+| (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+ File: Y2ErrorComponent.cc
+
+ Component that represents an error while creating another component
+
+ Author: Martin Vidner
+
+/-*/
+
+#include "Y2ErrorComponent.h"
+
+// the default implementation of doActualWork logs an error and returns nil,
+// which is fine for us
Modified: trunk/core/liby2/src/genericfrontend.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/liby2/src/genericfrontend.cc?rev=41260&r1=41259&r2=41260&view=diff
==============================================================================
--- trunk/core/liby2/src/genericfrontend.cc (original)
+++ trunk/core/liby2/src/genericfrontend.cc Thu Oct 4 15:08:36 2007
@@ -33,6 +33,7 @@
#include
#include
#include "Y2Component.h"
+#include "Y2ErrorComponent.h"
#include "Y2ComponentBroker.h"
#include
#include
@@ -538,6 +539,12 @@
print_usage ();
exit (5);
}
+ if (dynamic_cast(client))
+ {
+ print_error ("Error while creating client module %s", client_name);
+ exit (5);
+ }
+
// The environment variable YAST_IS_RUNNING is checked in rpm
// post install scripts. Might be useful for other scripts as
Modified: trunk/core/liby2/src/include/y2/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/liby2/src/include/y2/Makefile.am?rev=41260&r1=41259&r2=41260&view=diff
==============================================================================
--- trunk/core/liby2/src/include/y2/Makefile.am (original)
+++ trunk/core/liby2/src/include/y2/Makefile.am Thu Oct 4 15:08:36 2007
@@ -9,6 +9,7 @@
pkginclude_HEADERS = \
Y2Component.h Y2ComponentBroker.h Y2ComponentCreator.h \
Y2CCProgram.h Y2CCSerial.h Y2CCStdio.h \
+ Y2ErrorComponent.h \
Y2ProgramComponent.h \
Y2SerialComponent.h Y2StdioComponent.h \
Y2PluginComponent.h Y2CCPlugin.h \
Added: trunk/core/liby2/src/include/y2/Y2ErrorComponent.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/liby2/src/include/y2/Y2ErrorComponent.h?rev=41260&view=auto
==============================================================================
--- trunk/core/liby2/src/include/y2/Y2ErrorComponent.h (added)
+++ trunk/core/liby2/src/include/y2/Y2ErrorComponent.h Thu Oct 4 15:08:36 2007
@@ -0,0 +1,52 @@
+/*-----------------------------------------------------------*- c++ -*-\
+| |
+| __ __ ____ _____ ____ |
+| \ \ / /_ _/ ___|_ _|___ \ |
+| \ V / _` \___ \ | | __) | |
+| | | (_| |___) || | / __/ |
+| |_|\__,_|____/ |_| |_____| |
+| |
+| core system |
+| (C) SuSE GmbH |
+\----------------------------------------------------------------------/
+
+ File: Y2ErrorComponent.h
+
+ Author: Martin Vidner
+
+/-*/
+
+/*
+ * Component that represents an error while creating another component
+ * (the component creator would otherwise keep trying while we want to cry foul)
+ *
+ * BTW we do not need a matching component creator because we do not
+ * WANT errors, they just happen, pesky things.
+ */
+
+#ifndef Y2ErrorComponent_h
+#define Y2ErrorComponent_h
+
+#include "Y2Component.h"
+
+/**
+ * @short A dummy component representing an error
+ */
+class Y2ErrorComponent : public Y2Component
+{
+public:
+
+ /**
+ * Constructor.
+ */
+ Y2ErrorComponent () {}
+
+ /**
+ * Returns "ErrorComponent".
+ */
+ string name() const { return "ErrorComponent"; }
+
+};
+
+
+#endif // Y2ErrorComponent_h
Modified: trunk/core/package/yast2-core.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/package/yast2-core.changes?rev=41260&r1=41259&r2=41260&view=diff
==============================================================================
--- trunk/core/package/yast2-core.changes (original)
+++ trunk/core/package/yast2-core.changes Thu Oct 4 15:08:36 2007
@@ -1,3 +1,11 @@
+-------------------------------------------------------------------
+Thu Oct 4 15:03:52 CEST 2007 - mvidner@suse.cz
+
+- Distinguish "foo.ycp contains an error" from "foo.ycp not found"
+ (#330656).
+- 2.16.1
+
+-------------------------------------------------------------------
Tue Oct 2 15:53:06 CEST 2007 - mvidner@suse.cz
- Close unneeded file descriptors before execing another
Modified: trunk/core/wfm/src/Y2CCWFM.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/wfm/src/Y2CCWFM.cc?rev=41260&r1=41259&r2=41260&view=diff
==============================================================================
--- trunk/core/wfm/src/Y2CCWFM.cc (original)
+++ trunk/core/wfm/src/Y2CCWFM.cc Thu Oct 4 15:08:36 2007
@@ -33,6 +33,7 @@
#include
#include
#include
+#include
#include
@@ -168,7 +169,9 @@
return s;
}
- return NULL;
+ // NULL would mean not found and the component broker would keep trying
+ // which means it would ignore errors in y2update (#330656)
+ return new Y2ErrorComponent ();
}
bool Y2CCWFM::isServerCreator() const
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org