Skip to content

Commit

Permalink
Do include the depends field in the control file if and only if it wa…
Browse files Browse the repository at this point in the history
…s set.

When the change to no longer include the default depends was made in tcurdt#209 to fix tcurdt#208 it entirely eliminated the ability to set the depends programatically. In fact, the field DebMaker.depends is never read.
  • Loading branch information
jacobwil committed May 28, 2019
1 parent b899a7b commit c6b5a20
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/org/vafer/jdeb/DebMaker.java
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,12 @@ public BinaryPackageControlFile createSignedDeb(Compression compression, final P
if (packageControlFile.get("Description") == null) {
packageControlFile.set("Description", description);
}
if (packageControlFile.get("Depends") == null) {
// Only add a depends entry to the control file if the field in this object has actually been set
if (depends != null && depends.length() > 0) {
packageControlFile.set("Depends", depends);
}
}
if (packageControlFile.get("Homepage") == null) {
packageControlFile.set("Homepage", homepage);
}
Expand Down

0 comments on commit c6b5a20

Please sign in to comment.