return str::form(_("Object '%s' not found in specified repositories."), _reqpkg.orig_str.c_str());
}
case NOT_FOUND_CAP:
+ {
// translators: meaning a package %s or provider of capability %s
- return str::form(_("No provider of '%s' found."), _reqpkg.orig_str.c_str());
+ std::string ret( str::form(_("No provider of '%s' found."), _reqpkg.orig_str.c_str()) );
+ if ( _reqpkg.orig_str.find("debuginfo") != std::string::npos )
+ ret += " ['--plus-content debug'?]";
+ return ret;
+ }
case NOT_INSTALLED:
if (_reqpkg.orig_str.find_first_of("?*") != string::npos) // wildcards used
// ---------------------------------------------------------------------------
-static bool build_cache(Zypper & zypper, const RepoInfo &repo, bool force_build)
+static bool build_cache(Zypper & zypper, const RepoInfo & repo, bool force_build)
{
if (force_build)
zypper.out().info(_("Forcing building of repository cache"));
RepoInfo repo(*it);
MIL << "checking if to refresh " << repo.alias() << endl;
+ // disabled repos may get temp. enabled to check for --plus-content
+ bool contentcheck = false;
+ if ( ! ( gData.additional_content_repos.empty()
+ || repo.url().schemeIsVolatile()
+ || repo.enabled() ) )
+ {
+ // Preliminarily enable if last content matches or no content info available.
+ // Final check is done after refresh.
+ if ( repo.hasContentAny( gData.additional_content_repos ) || ! repo.hasContent() )
+ {
+ contentcheck = true;
+ repo.setEnabled( true );
+ zypper.out().info( boost::format(_("Scanning content of disabled repository '%s'."))
+ % repo.asUserString(),
+ " [--plus-content]" );
+ MIL << "[--plus-content] check " << repo.alias() << endl;
+ }
+ }
+
bool do_refresh =
repo.enabled() &&
repo.autorefresh() &&
% repo.alias() << endl;
it->setEnabled(false);
+ contentcheck = false;
}
}
// non-root user
% repo.alias() << endl;
it->setEnabled(false);
+ contentcheck = false;
}
}
// non-root user
% repo.asUserString()));
WAR << "Disabling repository '" << repo.alias() << "'" << endl;
it->setEnabled(false);
+ contentcheck = false;
}
}
}
+
+ if ( contentcheck )
+ {
+ if ( repo.hasContentAny( gData.additional_content_repos ) )
+ {
+ zypper.out().info( boost::format(_("Temporarily enabling repository '%s'."))
+ % repo.asUserString(),
+ " [--plus-content]" );
+ it->setEnabled(true);
+ MIL << "[--plus-content] check says use " << repo.alias() << endl;
+ }
+ else
+ {
+ zypper.out().info( boost::format(_("Repository '%s' stays disabled."))
+ % repo.asUserString(),
+ " [--plus-content]" );
+ MIL << "[--plus-content] check says disable " << repo.alias() << endl;
+ }
+ }
}
}