Skip to content

Commit

Permalink
Merge branch 'openSUSE-13_2'
Browse files Browse the repository at this point in the history
Conflicts:
	package/yast2-core.changes
	package/yast2-core.spec
	Rakefile
  • Loading branch information
mvidner committed Dec 4, 2014
2 parents 7d3570c + 2d12b94 commit 688fc4e
Show file tree
Hide file tree
Showing 10 changed files with 85 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -10,6 +10,7 @@ Makefile
Makefile.in
/Makefile.am
Makefile.am.common
compile
config.h
config.cache
config.guess
Expand Down
2 changes: 1 addition & 1 deletion agent-any/src/AnyAgent.cc
Expand Up @@ -740,7 +740,7 @@ AnyAgent::readFile (const YCPValue & arg)
{
const char *s = ss.c_str();
// Check modify time if we can use cache
if (stat (s, &buf) != 0)
if (stat (targetPath(s).c_str(), &buf) != 0)
{
mtime = 0; // error case: reset mtime
if (errno == ENOENT)
Expand Down
2 changes: 1 addition & 1 deletion base/Makefile.am
Expand Up @@ -2,6 +2,6 @@
# Makefile.am for core/base
#

SUBDIRS = src tools
SUBDIRS = src tools testsuite

EXTRA_DIST = test-helper.exp
2 changes: 2 additions & 0 deletions base/testsuite/.gitignore
@@ -0,0 +1,2 @@
*.log
*.trs
9 changes: 9 additions & 0 deletions base/testsuite/Makefile.am
@@ -0,0 +1,9 @@
ITESTS = \
target_root.ycp

EXTRA_DIST = $(ITESTS) y2base.sh

check-local:
for t in $(ITESTS); do \
./y2base.sh $$t || { cat $${t%.*}.log; exit 1; }; \
done
1 change: 1 addition & 0 deletions base/testsuite/data/toplevel/target_root
@@ -0,0 +1 @@
BOOT_IMAGE=fbdev ro root=801
41 changes: 41 additions & 0 deletions base/testsuite/target_root.ycp
@@ -0,0 +1,41 @@
{
any with_scr_root(string root, any () action) {
string component = sformat("chroot=%1:scr", root);
boolean check_version = false;
integer handle = WFM::SCROpen(component, check_version);
WFM::SCRSetDefault(handle);

any result = action();

WFM::SCRSetDefault(0);
WFM::SCRClose(handle);
return result;
}

boolean test_anyagent() {
SCR::RegisterAgent(
.tested,
`ag_anyagent(
`Description (
`File ("/toplevel/target_root"),
"#\n", // Comment
true, // read-only
`List (
`String ("^ \n"),
" "
)
)
)
);

any read = SCR::Read(.tested);

any expected = ["BOOT_IMAGE=fbdev", "ro", "root=801"];
y2milestone ("Expected: %1", expected);
y2milestone ("Read: %1", read);
return read == expected;
}

string root = sformat("%1/data", WFM::Args(0));
return with_scr_root(root, test_anyagent);
}
18 changes: 18 additions & 0 deletions base/testsuite/y2base.sh
@@ -0,0 +1,18 @@
#!/bin/sh
ROOT=../..
LIBS=src/.libs
AG_ANY_DIR=$ROOT/agent-any/$LIBS
# The agent is looked for not in $Y2DIR but in $Y2DIR/plugin so create 'plugin'
ln -snf . $AG_ANY_DIR/plugin
export Y2DIR=$AG_ANY_DIR
export LD_LIBRARY_PATH="\
$ROOT/liby2util-r/$LIBS:\
$ROOT/libycp/$LIBS:\
$ROOT/liby2/$LIBS:\
$ROOT/libscr/$LIBS:\
$ROOT/wfm/$LIBS:\
$ROOT/scr/$LIBS\
"
# ignore incompatible ruby-bindings while developing
export Y2DISABLELANGUAGEPLUGINS=1
../$LIBS/y2base -l ${1%.*}.log ./$1 -S "($(pwd))" testsuite
10 changes: 10 additions & 0 deletions package/yast2-core.changes
@@ -1,3 +1,13 @@
-------------------------------------------------------------------
Tue Nov 25 09:59:49 UTC 2014 - mvidner@suse.com

- ag_any: respect target root also when the file
does not exist in the original root (boo#903747).
If applied at installation time as a DUD, it fixes
"Internal error... in SaveModulesToLoad" during
an upgrade to oS 13.2.
- 3.1.14

-------------------------------------------------------------------
Fri Oct 24 12:29:04 UTC 2014 - lslezak@suse.cz

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


Name: yast2-core
Version: 3.1.13
Version: 3.1.14
Release: 0

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

0 comments on commit 688fc4e

Please sign in to comment.