Skip to content

Commit

Permalink
Fixed wrong archive name in jdeb packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
kardapoltsev committed Aug 21, 2014
1 parent e09d65a commit d3de8f7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
Expand Up @@ -252,6 +252,15 @@ trait DebianPlugin extends Plugin with linux.LinuxPlugin with NativePackaging wi
case (scr, _) => scr.toSeq.map(_ -> scriptName)
}
}

private[debian] def archiveFilename(appName: String, version: String, arch: String): String = {
appName + "_" + version + "_" + arch + ".deb"
}

private[debian] def changesFilename(appName: String, version: String, arch: String): String = {
appName + "_" + version + "_" + arch + ".changes"
}

}

/**
Expand Down
Expand Up @@ -37,12 +37,13 @@ trait JDebPackaging { this: DebianPlugin with linux.LinuxPlugin =>
*/
debianJDebPackaging <<= (debianExplodedPackage, linuxPackageMappings, linuxPackageSymlinks,
debianControlFile, debianMaintainerScripts, debianConffilesFile,
normalizedName, version, target, streams) map {
normalizedName, version, packageArchitecture, target, streams) map {
(_, mappings, symlinks, controlfile, controlscripts, conffile,
name, version, target, s) =>
name, version, arch, target, s) =>
s.log.info("Building debian package with java based implementation 'jdeb'")
val console = new JDebConsole(s.log)
val debianFile = target.getParentFile / "%s_%s_all.deb".format(name, version)
val archive = archiveFilename(name, version, arch)
val debianFile = target.getParentFile / archive
val debMaker = new DebMaker(console,
fileAndDirectoryProducers(mappings, target) ++ linkProducers(symlinks),
conffileProducers()
Expand Down
Expand Up @@ -70,7 +70,7 @@ trait NativePackaging { this: DebianPlugin with linux.LinuxPlugin =>
(pkgdir, _, section, priority, name, version, arch, tdir, s) =>
s.log.info("Building debian package with native implementation")
// Make the package. We put this in fakeroot, so we can build the package with root owning files.
val archive = name + "_" + version + "_" + arch + ".deb"
val archive = archiveFilename(name, version, arch)
Process(Seq("fakeroot", "--", "dpkg-deb", "--build", pkgdir.getAbsolutePath, "../" + archive), Some(tdir)) ! s.log match {
case 0 => ()
case x => sys.error("Failure packaging debian file. Exit code: " + x)
Expand Down

0 comments on commit d3de8f7

Please sign in to comment.