continue;
}
+
// do the refresh
+
+ // raw metadata refresh
bool error = false;
if (!copts.count("build-only"))
{
bool force_download =
copts.count("force") || copts.count("force-download");
+ // without this a cd is required to be present in the drive on each refresh
+ // (or more 'refresh needed' check)
+ bool is_cd = is_changeable_media(*repo.baseUrlsBegin());
+ if (!force_download && is_cd)
+ {
+ MIL << "Skipping refresh of a changeable read-only media." << endl;
+ continue;
+ }
+
MIL << "calling refreshMetadata" << (force_download ? ", forced" : "")
<< endl;
error = refresh_raw_metadata(repo, force_download);
}
+ // db rebuild
if (!(error || copts.count("download-only")))
{
bool force_build =
// ----------------------------------------------------------------------------
-//! \todo handle zypp exceptions
static
int add_repo(RepoInfo & repo)
{
bool is_changeable_media(const zypp::Url & url)
{
+ MIL << "Checking if this is a changeable medium" << endl;
bool is_cd = false;
try
{
catch (const media::MediaException & e)
{
ZYPP_CAUGHT(e);
- WAR << "Could not determine if the URL points to a changeable media" << endl;
+ WAR << "Could not determine if the URL points to a changeable medium" << endl;
}
return is_cd;