Skip to content

Commit

Permalink
Merge branch 'jayjlawrence-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
rm5248 committed Apr 15, 2018
2 parents 33232ee + 2cab427 commit 27186f1
Showing 1 changed file with 45 additions and 1 deletion.
46 changes: 45 additions & 1 deletion src/main/java/com/rm5248/debianpbuilder/DebianPbuilder.java
Expand Up @@ -149,6 +149,50 @@ public String getDebianDirLocation(){

return debianDirLocation;
}

public boolean isDebianDistribution(){
switch(distribution.toLowerCase()) {
case "buzz":
case "rex":
case "bo":
case "hamm":
case "slink":
case "potato":
case "woody":
case "sarge":
case "etch":
case "lenny":
case "squeeze":
case "wheezy":
case "jessie":
case "stretch":
case "buster":
case "bullseye":
case "sid":
return true;
}
return false;
}

public boolean isUbuntuDistribution(){
switch(distribution.toLowerCase()) {
case "bionic":
case "artful":
case "xenial":
case "trusty":
case "zesty":
case "yakkety":
case "wiley":
case "vivid":
case "utopic":
case "saucy":
case "raring":
case "quantal":
case "precise":
return true;
}
return false;
}

@Override
public void perform(Run<?,?> run, FilePath workspace, Launcher launcher, TaskListener listener )
Expand Down Expand Up @@ -289,7 +333,7 @@ private boolean doTheBuild( Run<?,?> build, FilePath workspace, Launcher launche
pbuildConfig.setAdditionalBuildResults( additionalBuildResults.split( "," ) );
}

if( isUbuntu( workspace, launcher, listener ) ){
if( isUbuntu( workspace, launcher, listener ) && isDebianDistribution() ){
pbuildConfig.setDebootstrapOpts( "--keyring", "/usr/share/keyrings/debian-archive-keyring.gpg" );
}

Expand Down

0 comments on commit 27186f1

Please sign in to comment.