#include <fstream>
#include <sstream>
#include <boost/format.hpp>
+#include <boost/logic/tribool_io.hpp>
#include <zypp/Patch.h>
#include <zypp/base/Algorithm.h>
// zypper status (enabled, autorefresh)
else
{
- tr << (repo.enabled() || indeterminate(repo.enabled()) ?
- _("Yes") : _("No"));
+ tr << (repo.enabled() ? _("Yes") : _("No"));
tr << (repo.autorefresh() ? _("Yes") : _("No"));
}
{
RepoInfo repo = *it;
+ // by default set enabled and autorefresh to true
+ repo.setEnabled(true);
+ repo.setAutorefresh(true);
+
if (!indeterminate(enabled))
repo.setEnabled(enabled);
if (!indeterminate(autorefresh))
repo.setAutorefresh(autorefresh);
- // by default set enabled and autorefresh to true
- if (indeterminate(repo.enabled()))
- repo.setEnabled(true);
- if (indeterminate(repo.autorefresh()))
- repo.setAutorefresh(true);
-
add_repo(repo);
}
return ZYPPER_EXIT_ERR_PRIVILEGES;
}
- tribool enabled(indeterminate);
+ // indeterminate indicates the user has not specified the values
+ tribool enabled(indeterminate);
tribool refresh(indeterminate);
if (copts.count("disabled"))
string alias;
if (arguments.size() > 1)
alias = arguments[1];
- //! \todo use timestamp as alias, if no alias was given
+ //! \todo use timestamp as alias, if no alias was given?
if (alias.empty ())
alias = url.asString();
+ // by default, enable the repo and set autorefresh
if (indeterminate(enabled)) enabled = true;
if (indeterminate(refresh)) refresh = true;