Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed wrong archive name in jdeb packaging #328

Merged
merged 1 commit into from
Aug 21, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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