return isSystem() && myPool().isOnSystemByAuto( ident() );
}
- bool Solvable::identIsAutoInstalled() const
+ bool Solvable::identIsAutoInstalled( const IdString & ident_r )
{
- return myPool().isOnSystemByAuto( ident() );
+ return myPool().isOnSystemByAuto( ident_r );
}
bool Solvable::multiversionInstall() const
if ( ret.empty() && isKind<Product>() )
{
const RepoInfo & ri( repoInfo() );
- if ( ri.needToAcceptLicense() || ! ui::Selectable::get( *this )->hasInstalledObj() )
- ret = ri.getLicense( lang_r ); // bnc#908976: suppress informal license upon update
+ std::string riname( name() ); // "license-"+name with fallback "license"
+ if ( ! ri.hasLicense( riname ) )
+ riname.clear();
+
+ if ( ri.needToAcceptLicense( riname ) || ! ui::Selectable::get( *this )->hasInstalledObj() )
+ ret = ri.getLicense( riname, lang_r ); // bnc#908976: suppress informal license upon update
}
return ret;
}
bool Solvable::needToAcceptLicense() const
{
NO_SOLVABLE_RETURN( false );
- return ( isKind<Product>() ? repoInfo().needToAcceptLicense() : true );
+ if ( isKind<Product>() )
+ {
+ const RepoInfo & ri( repoInfo() );
+ std::string riname( name() ); // "license-"+name with fallback "license"
+ if ( ! ri.hasLicense( riname ) )
+ riname.clear();
+
+ return ri.needToAcceptLicense( riname );
+ }
+ return true;
}