// try to get the file from the net
try
{
- Pathname tmp_file = media.provideFile(resource);
+ Pathname tmp_file = media.provideFile(resource, resource.optional() ? MediaSetAccess::PROVIDE_NON_INTERACTIVE : MediaSetAccess::PROVIDE_DEFAULT );
Pathname dest_full_path = dest_dir + resource.filename();
try
{
- DBG << "Going to try to provide file " << file
+ DBG << "Going to try to provide " << (resource.optional() ? "optional" : "") << " file " << file
<< " from media number " << media_nr << endl;
// try to attach the media
if ( ! media_mgr.isAttached(media) )
// otherwise propagate the error
if ( ( options & PROVIDE_NON_INTERACTIVE ) && reason != media::MediaChangeReport::WRONG)
{
+ MIL << "Can't provide file. Non-Interactive mode." << endl;
ZYPP_RETHROW(excp);
}
else
Pathname sig = repoInfo().path() + "/content.asc";
- this->enqueue( OnMediaLocation( sig, 1 ) );
+ this->enqueue( OnMediaLocation( sig, 1 ).setOptional(true) );
this->start( dest_dir, media );
// only if there is a signature in the destination directory
if ( PathInfo(dest_dir / sig ).isExist() )
Pathname key = repoInfo().path() + "/content.key";
- this->enqueue( OnMediaLocation( key, 1 ) );
+ this->enqueue( OnMediaLocation( key, 1 ).setOptional(true) );
this->start( dest_dir, media );
// only if there is a key in the destination directory
if ( PathInfo(dest_dir / key).isExist() )