bool nonroot( geteuid() != 0 );
if ( nonroot && ! PathInfo(dir).userMayRX() )
{
- JobReport::warning( str::FormatNAC(_("Cannot read repo directory '%1%': Permission denied")) % dir );
+ JobReport::warning( str::Format(_("Cannot read repo directory '%1%': Permission denied")) % dir );
}
else
{
{
if ( nonroot && ! PathInfo(*it).userMayR() )
{
- JobReport::warning( str::FormatNAC(_("Cannot read repo file '%1%': Permission denied")) % *it );
+ JobReport::warning( str::Format(_("Cannot read repo file '%1%': Permission denied")) % *it );
}
else
{
std::list<RepoInfo> readRepoFile( const Url & repo_file )
{
- // no interface to download a specific file, using workaround:
- //! \todo add MediaManager::provideFile(Url file_url) to easily access any file URLs? (no need for media access id or media_nr)
- Url url(repo_file);
- Pathname path(url.getPathName());
- url.setPathName ("/");
- MediaSetAccess access(url);
- Pathname local = access.provideFile(path);
+ ManagedFile local = MediaSetAccess::provideFileFromUrl(repo_file);
DBG << "reading repo file " << repo_file << ", local path: " << local << endl;
}
}
- repo::PluginServices(_options.pluginsPath/"services", ServiceCollector(_services));
+ repo::PluginServices(_options.pluginsPath/"services", ServiceCollector(_services));
}
///////////////////////////////////////////////////////////////////
// translators: Cleanup a repository previously owned by a meanwhile unknown (deleted) service.
// %1% = service name
// %2% = repository name
- JobReport::warning( str::FormatNAC(_("Unknown service '%1%': Removing orphaned service repository '%2%'"))
+ JobReport::warning( str::Format(_("Unknown service '%1%': Removing orphaned service repository '%2%'"))
% repoInfo.service()
% repoInfo.alias() );
try {
{
if ( info.alias() == (*it).alias() )
{
- RepoInfo modifiedrepo = info;
+ RepoInfo modifiedrepo = *it;
modifiedrepo.setType( repokind );
modifyRepository( info.alias(), modifiedrepo );
break;
cmd.push_back( "-o" );
cmd.push_back( solvfile.asString() );
cmd.push_back( "-X" ); // autogenerate pattern from pattern-package
+ // bsc#1104415: no more application support // cmd.push_back( "-A" ); // autogenerate application pseudo packages
if ( repokind == RepoType::RPMPLAINDIR )
{
// and in zypper.
std::pair<DefaultIntegral<bool,false>, repo::ServicePluginInformalException> uglyHack;
try {
- ServiceRepos( service, bind( &RepoCollector::collect, &collector, _1 ) );
+ // FIXME bsc#1080693: Shortcoming of (plugin)services (and repos as well) is that they
+ // are not aware of the RepoManagers rootDir. The service url, as created in known_services,
+ // contains the full path to the script. The script however has to be executed chrooted.
+ // Repos would need to know the RepoMangers rootDir to use the correct vars.d to replace
+ // repos variables. Until RepoInfoBase is aware if the rootDir, we need to explicitly pass it
+ // to ServiceRepos.
+ ServiceRepos( _options.rootDir, service, bind( &RepoCollector::collect, &collector, _1 ) );
}
catch ( const repo::ServicePluginInformalException & e )
{
// Make sure the service repo is created with the appropriate enablement
if ( ! indeterminate(toBeEnabled) )
- it->setEnabled( toBeEnabled );
+ it->setEnabled( ( bool ) toBeEnabled );
DBG << "Service adds repo " << it->alias() << " " << (it->enabled()?"enabled":"disabled") << endl;
addRepository( *it );