-
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
debian:package-bin throws a FileNotFoundException for missing postrm #117
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,6 +50,13 @@ trait DebianPlugin extends Plugin with linux.LinuxPlugin { | |
} | ||
|
||
|
||
private[this] def appendAndFixPerms(script: File, lines: Seq[String], perms: LinuxFileMetaData): File = { | ||
IO.writeLines(script, lines) | ||
chmod(script, perms.permissions) | ||
script | ||
} | ||
|
||
|
||
private[this] def scriptMapping(scriptName: String)(script: Option[File], controlDir: File): Seq[(File, String)] = { | ||
(script, controlDir) match { | ||
// check if user defined script exists | ||
|
@@ -186,7 +193,7 @@ trait DebianPlugin extends Plugin with linux.LinuxPlugin { | |
prependAndFixPerms(postinst, userGroupAdd, LinuxFileMetaData()) | ||
|
||
val purgeAdd = Seq(TemplateWriter.generateScript(DebianPlugin.postrmPurgeTemplateSource, replacements)) | ||
prependAndFixPerms(postrm, purgeAdd, LinuxFileMetaData()) | ||
appendAndFixPerms(postrm, purgeAdd, LinuxFileMetaData()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While looking into the issue I noticed the code for removing the user account created during installation was being removed before the developers own By appending the user account removal script to the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good fix! Thanks. |
||
} | ||
t | ||
}, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the append flag be true here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching that, it should be true