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

FIX #324 adding empty dirs to deb package #325

Merged
merged 3 commits into from
Aug 19, 2014

Conversation

kardapoltsev
Copy link
Member

No description provided.

@kardapoltsev
Copy link
Member Author

I'm not sure that this is really good way to do this, but it works for me) @muuki88, @jsuereth could you take a look at this PR?

paths map {
case (path, name) if path.isDirectory =>
val permMapper = new PermMapper(-1, -1, perms.user, perms.group, null, perms.permissions, -1, null)
new DataProducerDirectory(target / name, null, Array("**"), Array(permMapper))
val dirName = if (name.startsWith("/")) name.drop(1) else name
new DataProducerDirectory(target, Array(dirName), null, Array(permMapper))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't look wrong, but doesn't look correct either :/ So we have

pDir = target
pIncludes = Array(dirName)
pExclues = null // nothing to exclude
pMapper = Array(permMapper)

This means that if you add a directory producer with an empty directory and exclude all it's contents (the way before), the empty directory doesn't get created? Sounds for me more like a bug in jdeb. @tcurdt @ebourg may know more about this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've dug into jdeb sources before I could get it works)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thought so :( Well, as this is a bit mysterious after all, we should really add tests for this

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's already done)

@muuki88
Copy link
Contributor

muuki88 commented Aug 17, 2014

Also a test would be nice to check if this really works. One with an empty directory and one with a none empty directory.

@kardapoltsev
Copy link
Member Author

The Travis CI build failed

It's very strange since this tests were successfull on my machine.. :(

@kardapoltsev
Copy link
Member Author

Any ideas about how can I debug this case?

@muuki88
Copy link
Contributor

muuki88 commented Aug 18, 2014

Hm. That's rather strange. I'll try to build this on my computer and report if I got any failure.

@kardapoltsev
Copy link
Member Author

So... It works on my Gentoo and latest Ubuntu and doesn't work on stable Debian. Very interesting issue.

@kardapoltsev
Copy link
Member Author

Solution is simple) I've tried to add empty dir to mappings, but I couldn't add empty dir to git, hence on travis this empty dir really doesn't exists and not added to mappings.

@muuki88
Copy link
Contributor

muuki88 commented Aug 19, 2014

Well... that makes sense :D Didn't saw that in the code, damn :/

muuki88 added a commit that referenced this pull request Aug 19, 2014
@muuki88 muuki88 merged commit a6325f6 into sbt:master Aug 19, 2014
@muuki88
Copy link
Contributor

muuki88 commented Aug 19, 2014

Merged into v0.7.x

@kardapoltsev kardapoltsev deleted the wip/jdeb-empty-dir branch August 20, 2014 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants