Skip to content

Commit

Permalink
remove system namespace
Browse files Browse the repository at this point in the history
The goal for new installer is to not need yast on target system. The
last piece needing system namespace was bootloader configuration. Since
p-BL-0.800 it have yaml CLI interface that can be used with common
system agent instead of own System namespace to communicate directly
with library.
  • Loading branch information
jreidinger committed Nov 4, 2013
1 parent d4356bc commit 26d7ae4
Show file tree
Hide file tree
Showing 12 changed files with 4 additions and 844 deletions.
8 changes: 1 addition & 7 deletions wfm/src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@ libpy2wfm_la_SOURCES = \
Y2WFMComponent.cc Y2WFMComponent.h \
Y2CCWFM.cc Y2CCWFM.h \
WFM.cc WFM.h \
WFMSubAgent.cc WFMSubAgent.h \
Y2SystemNamespace.cc \
Y2SystemNamespace.h \
Y2StdioFunction.cc \
Y2StdioFunction.h \
Y2SystemFunction.h \
Y2SystemFunction.cc
WFMSubAgent.h WFMSubAgent.cc


# use this for KMTrace: libpy2wfm_la_LIBADD = liby2wfm.la /opt/kde3/lib/libktrace_s.a
Expand Down
25 changes: 1 addition & 24 deletions wfm/src/WFMSubAgent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ WFMSubAgent::WFMSubAgent (const string& name, int handle)
my_comp (0),
my_agent (0)
{
// TODO when perl-bootloader die, remove whole system namespacing
// check if name is scr ( can be prepended by chroot like "chroot=/mnt:scr" )
if (name.find("scr") == string::npos && name.find("chroot") != string::npos)
{
Expand All @@ -53,29 +52,7 @@ WFMSubAgent::start ()
if (!my_comp)
{
y2debug ("Creating SubAgent: %d %s", my_handle, my_name.c_str ());
// different behavior in chroot and non-chroot as for chroot we need to
// handle specially system namespace via scr_remote and agents call via
// Scripting agent
// TODO remove after perl-bootloader die, then else branch is enough
if (my_name.find("chroot") != string::npos)
{
// set to my_comp component for `System::` namespace and in my_agent
// ScriptingAgent with target root
// see Y2WFMComponent::SCRSetDefault implementation for details
// how it exactly works
my_comp = Y2ComponentBroker::createServer ((my_name+"_remote").c_str ());
Y2Component *scr_comp = Y2ComponentBroker::createServer (my_name.c_str ());
if (!scr_comp)
{
ycp2error ("Can't create component %s", my_name.c_str());
return false;
}
my_agent = scr_comp->getSCRAgent();
}
else
{
my_comp = Y2ComponentBroker::createServer (my_name.c_str ());
}
my_comp = Y2ComponentBroker::createServer (my_name.c_str ());
}

return my_comp != 0;
Expand Down
6 changes: 0 additions & 6 deletions wfm/src/WFMSubAgent.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,6 @@ class WFMSubAgent
*/
int get_handle () const { return my_handle; }

/**
* Returns the Y2Component of the subagent. This does not call start ().
* Is 0 if start () was not called or failed.
*/
Y2Component* comp () { return my_comp; }

/**
* Returns the SCRAgent of the subagent. This does not call start ().
* Is 0 if start () was not called or failed or the Y2Component does not
Expand Down
7 changes: 0 additions & 7 deletions wfm/src/Y2CCWFM.cc
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,6 @@ bool Y2CCWFM::isServerCreator() const

Y2Component* Y2CCWFM::provideNamespace(const char* name)
{
// first, check if we should provide System namespace
if (strstr (name, "System::") == name)
{
return Y2WFMComponent::instance ();

}

// check the filename
string filename = YCPPathSearch::findModule (name);
if (filename.empty())
Expand Down
148 changes: 0 additions & 148 deletions wfm/src/Y2StdioFunction.cc

This file was deleted.

85 changes: 0 additions & 85 deletions wfm/src/Y2StdioFunction.h

This file was deleted.

Loading

0 comments on commit 26d7ae4

Please sign in to comment.