"<repo alias=\"company-foo\" name=\"Company's Foo\""
" path=\"products/foo\" distro_target=\"sle-11-i386\" priority=\"20\"/>"
"<repo alias=\"company-bar\" name=\"Company's Bar\""
- " path=\"products/bar\" distro_target=\"sle-11-i386\" enabled=\"true\"/>"
+ " path=\"products/bar\" distro_target=\"sle-11-i386\" enabled=\"tRUe\" autorefresh=\"FaLsE\"/>"
"<repo alias=\"company-foo-upd\" name=\"Company's Foo Updates\""
" path=\"products/foo/updates\" distro_target=\"sle-11-i386\" priority=\"1\"/>"
"</repoindex>";
BOOST_CHECK_EQUAL(99, repo.priority());
// "Repository is explicitly enabled"
BOOST_CHECK(repo.enabled());
+ // "Repository autorefresh is explicitly disabled"
+ BOOST_CHECK(!repo.autorefresh());
}
// optional enabled
s = reader_r->getAttribute("enabled");
if (s.get()) {
- info.setEnabled(str::strToTrue(s.asString()));
+ info.setEnabled(str::strToBool( s.asString(), info.enabled() ));
+ }
+
+ // optional autorefresh
+ s = reader_r->getAttribute("autorefresh");
+ if (s.get()) {
+ info.setAutorefresh(str::strToBool( s.asString(), info.autorefresh() ));
}
DBG << info << endl;