Skip to content

Commit

Permalink
Merge branch 'master' into fix_search_servers
Browse files Browse the repository at this point in the history
  • Loading branch information
mvidner committed Oct 8, 2014
2 parents 7a064d5 + f760fdb commit a1cd528
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 6 deletions.
2 changes: 1 addition & 1 deletion MAINTAINER
@@ -1 +1 @@
Martin Vidner <mvidner@suse.cz>
Deprecated file. Use `osc maintainer yast2-core` instead.
24 changes: 20 additions & 4 deletions agent-system/src/SystemAgent.cc
Expand Up @@ -363,7 +363,9 @@ SystemAgent::Read (const YCPPath& path, const YCPValue& arg, const YCPValue&)
return YCPNull ();
}

filename = targetPath(filename);
// .yast2 needs special handling as it searches in y2path (bnc#891053)
if (cmd != "yast2")
filename = targetPath(filename);

if (cmd == "string")
{
Expand Down Expand Up @@ -474,10 +476,24 @@ SystemAgent::Read (const YCPPath& path, const YCPValue& arg, const YCPValue&)

if (cmd == "yast2")
{
string tmp = Y2PathSearch::findy2 ("data/" + filename); // FIXME use ydatadir
if (!tmp.empty ())
string path;
bool found = false;
for (int i = 0; i < Y2PathSearch::numberOfComponentLevels(); ++i)
{
path = Y2PathSearch::searchPath(Y2PathSearch::GENERIC, i);
path.append("/data/" + filename);
// respect changed root
path = targetPath(path);
// try if the file exists and we can read it
if (access(path.c_str(), R_OK) == 0)
{
found = true;
break;
}
}
if (found)
{
filename = tmp;
filename = path;
}
else
{
Expand Down
1 change: 1 addition & 0 deletions liby2/src/Y2ProgramComponent.cc
Expand Up @@ -324,6 +324,7 @@ void Y2ProgramComponent::launchExternalProgram (char **argv)

// Prepare parser
parser.setInput(from_external[0], argv[0]); // set parser input to child output
parser.setBuffered();
}


Expand Down
11 changes: 11 additions & 0 deletions package/yast2-core.changes
@@ -1,3 +1,14 @@
-------------------------------------------------------------------
Wed Oct 8 07:55:04 UTC 2014 - mvidner@suse.com

- Allow SCR.Read(.target.yast2, ...) on chroots (bnc#891053).

-------------------------------------------------------------------
Mon Sep 8 08:59:10 UTC 2014 - mvidner@suse.com

- Enable buffering for parsing agent output (bnc#854809).
- 3.1.11

-------------------------------------------------------------------
Tue Aug 26 08:03:08 UTC 2014 - mvidner@suse.com

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-core.spec
Expand Up @@ -18,7 +18,7 @@


Name: yast2-core
Version: 3.1.10
Version: 3.1.11
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down

0 comments on commit a1cd528

Please sign in to comment.