-
Notifications
You must be signed in to change notification settings - Fork 444
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
"name in Linux := " ignored #188
Comments
I was able to reproduce this with the following minimal configuration import sbt._
import sbt.Keys._
import com.typesafe.sbt.SbtNativePackager._
import NativePackagerKeys._
object ApplicationBuild extends Build {
lazy val root = Project(
id = "hello_world",
base = file("."),
settings = Defaults.defaultSettings ++ packagerSettings ++ packageArchetype.java_server ++
Seq(
name := "Hello_World",
packageSummary := "Hello World Package",
packageDescription := "Say hello to the world from different packages",
maintainer in Linux := "Nepomuk Seiler <[email protected]>"
)
)
} The very easy solution is this: just replace the name := "my server" Still I will dig a bit deeper what's causing this issue. For name the |
Okay. The second way to go would be to override the normalizedName := "my-server" However this setting is not scoped in any way, so it will be applied global AFAIK. |
I currently workaround by changing the name (and hack some place to rename back). But it's crappy. Thanks. |
SO, this is an issue with derivied settings it seems. You can do |
Removing `normalizedKey` in packagerSettings. #188
@jsuereth , is there a concept of fallback scopes? E.g, name := "name"
name in Linux := "linux",
name in Debian := "debian"
// I hope <<= is the correct one :P
normalizedName <<= (name in (Debian or Linux or Global)) map (normalize _) Or defining scopes with fallback, e.g val Linux = config("linux")
val Debian = config("debian") withFallback Linux |
@jsuereth solution works (using 0.7.0-RC1) normalizedName in Debian := "hello-world" It doesn't affect other usages of |
Yep, that should work for overridding. And fallback scopes sort of exists, but probably needs documented/fleshed out a bit. That's the Config.extend bit. You have to REGISTER your configurations appropriately. Once AutoPlugins hit, we can move to those and we should get appropraite "configuration extension" semantics, I believe. |
Is this still being a blocker for |
No, writing the getting started guide is. I'm ~30% done with that. If you want I'll push what I have to a branch for you to look at. |
Sure :) |
This ticket is way more complex as we need to define a correct scoping for our main variables which are used all over the place. These are
The current code needs some refactoring here. I'm not very familiar with scope handling, so a pro would be nice :) |
Yeah, I can take a crack at it. Scope handling is one of those odd areas of sbt. basic gist:
I'll try to get to this ticket next time I have some air to work on fun projects :) |
Yikes, this one is killing me right now. Did anything ever get done to fix this guys? |
Nope. This issue is much bigger than it seems on the first glance :/ |
Ok, understood. Is there a plan to fix it? I have two major points:
Seemingly these are related to |
|
Huh, I see. have a fix, but let me check it out. |
* Each configuration should have its own `name` and `normalizedName` instance * Debian/Rpm delegate to Linux which delegates to project name. * Universal has its own name, which is used for generating BASH/BAT files * Separate key for the package filename now * Windows has its own name/normalized name which delegates to raw. Fixes #188
I tried normalizedName in Rpm, normalizedName in Linux etc, but none seemed to work. |
Did you try with my PR? |
@jsuereth im just trying it now. |
@jsuereth @muuki88 So I tried with the following settings (after building from the branch):
I got the following output using
The module name is "ci", and as you can see, its now using an odd mix of Thanks, Tim |
* Each configuration should have its own `name` and `normalizedName` instance * Debian/Rpm delegate to Linux which delegates to project name. * Universal has its own name, which is used for generating BASH/BAT files * Separate key for the package filename now * Windows has its own name/normalized name which delegates to raw. Fixes sbt#188
* Each configuration should have its own `name` and `normalizedName` instance * Debian/Rpm delegate to Linux which delegates to project name. * Universal has its own name, which is used for generating BASH/BAT files * Separate key for the package filename now * Windows has its own name/normalized name which delegates to raw. Fixes sbt#188
* Each configuration should have its own `name` and `normalizedName` instance * Debian/Rpm delegate to Linux which delegates to project name. * Universal has its own name, which is used for generating BASH/BAT files * Separate key for the package filename now * Windows has its own name/normalized name which delegates to raw. Fixes sbt#188
* Each configuration should have its own `name` and `normalizedName` instance * Debian/Rpm delegate to Linux which delegates to project name. * Universal has its own name, which is used for generating BASH/BAT files * Separate key for the package filename now * Windows has its own name/normalized name which delegates to raw. Fixes sbt#188
Hi,
My project is named with '' but for debian Debian package '' is forbidden. Like in the doc I try to provide an other name via "name in Linux := ..." or "name in Debian := ..." without success. Is it a bug or I'm doing something wrong with sbt ?
sbt: 0.13.1
sbt-native-packager: 0.7.0-M3
output
from Build.scala
Thanks for any help
The text was updated successfully, but these errors were encountered: