459273 - Redundant license notices
+ Only showing license acknowledgement request screen if [FILES] section contains content that does not (yet) exist
This commit is contained in:
parent
3e7b5f0fa9
commit
2141cc2dc3
|
@ -407,7 +407,7 @@ public class Main
|
|||
|
||||
if (!args.isApproveAllLicenses())
|
||||
{
|
||||
if (!module.acknowledgeLicense())
|
||||
if (!module.hasFiles(baseHome) && !module.acknowledgeLicense())
|
||||
{
|
||||
StartLog.warn(EXITING_LICENSE_NOT_ACKNOWLEDGED);
|
||||
System.exit(1);
|
||||
|
|
|
@ -279,7 +279,7 @@ public class Module
|
|||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
System.err.printf("%nModule %s:%n",getName());
|
||||
System.err.printf(" + contains software not provided by the Eclipse Foundation!%n");
|
||||
System.err.printf(" + contains software not covered by the Eclipse Public License!%n");
|
||||
|
@ -361,6 +361,20 @@ public class Module
|
|||
return enabled;
|
||||
}
|
||||
|
||||
public boolean hasFiles(BaseHome baseHome)
|
||||
{
|
||||
for (String ref : getFiles())
|
||||
{
|
||||
FileArg farg = new FileArg(this,ref);
|
||||
Path refPath = baseHome.getBasePath(farg.location);
|
||||
if (!Files.exists(refPath))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public void process(BaseHome basehome) throws FileNotFoundException, IOException
|
||||
{
|
||||
Pattern section = Pattern.compile("\\s*\\[([^]]*)\\]\\s*");
|
||||
|
@ -477,5 +491,4 @@ public class Module
|
|||
str.append(']');
|
||||
return str.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue