diff --git a/src/main/groovy/com/netflix/gradle/plugins/rpm/RpmCopyAction.groovy b/src/main/groovy/com/netflix/gradle/plugins/rpm/RpmCopyAction.groovy index bf9e0610..9f1efa4f 100755 --- a/src/main/groovy/com/netflix/gradle/plugins/rpm/RpmCopyAction.groovy +++ b/src/main/groovy/com/netflix/gradle/plugins/rpm/RpmCopyAction.groovy @@ -236,6 +236,7 @@ class RpmCopyAction extends AbstractPackagingCopyAction { RandomAccessFile rpmFile try { rpmFile = new RandomAccessFile(task.getArchiveFile().get().asFile, "rw") + rpmFile.setLength(0); builder.build(rpmFile.getChannel()) logger.info 'Created rpm {}', rpmFile } finally {