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 two bugs #32

Merged
merged 1 commit into from
Sep 3, 2013
Merged

Fixed two bugs #32

merged 1 commit into from
Sep 3, 2013

Conversation

ptrbrtz
Copy link
Contributor

@ptrbrtz ptrbrtz commented Sep 3, 2013

Hey,

I was searching and reverse-engineering quite a while to find these two bugs is stumbled across when trying to bundle ja Java Runtime Environment with an app.

The directory tree in the .wix file was broken when having intermediate folders with just subfolders and no files. groupBy just didn't generate the missing link, so some folders got "orphaned". I think there might be a more elegant solution than my brute-force attack... but hey.

File ID collisions in .wix file, e.g. when two files are present: flup+1.a and flub-1.a. I appended a file name hash to the end of every ID, making it (a lot mor) unique.

Cheers!
Peter

Directory tree in .wix file was broken when having intermediate folders with just subfolders and no files.
File ID collisions in .wix file, e.g. when two files are present: flup+1.a and flub-1.a. Appended file name hash to end of id.
@@ -113,7 +113,7 @@ trait GenericPackageSettings
} yield ComponentFile(name, editable = (name startsWith "conf"))
val corePackage =
WindowsFeature(
id=WixHelper.cleanStringForId(name+"_core"),
id=WixHelper.cleanStringForId(name + "_core").takeRight(38), // Must be no longer
Copy link
Member

Choose a reason for hiding this comment

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

Huh, I thought the cleanStringForId would takeRight in the past... In any case, great catch.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

:)

@jsuereth
Copy link
Member

jsuereth commented Sep 3, 2013

LGTM! If you have any more WiX fixes keep em coming ;). I still need to detangle the Feature/Shortcut stuff so you can safely define more than one shortcut and it will generate the correct XML.

jsuereth added a commit that referenced this pull request Sep 3, 2013
@jsuereth jsuereth merged commit 122ed21 into sbt:master Sep 3, 2013
@ptrbrtz
Copy link
Contributor Author

ptrbrtz commented Sep 3, 2013

Yes, if I come across other issues I'll let you know!
Right now I'm looking at the rpm feature of the plugin and I found something strange. Everything gets built like it should, but the log has these lines:

[info] Building target platforms: noarch-Arago-linux
[info] Building for target noarch-Arago-linux
[info] Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.CLrjQi
[error] + umask 022
[error] + cd /home/dev/arago-visualizer/target/rpm/BUILD
[error] + '[' -e /home/dev/arago-visualizer/target/rpm/buildroot ']'
[error] + mv /home/dev/arago-visualizer/target/rpm/tmp-buildroot/usr /home/dev/arago-visualizer/target/rpm/buildroot
[error] + /usr/lib/rpm/brp-compress
[error] + /usr/lib/rpm/brp-strip /usr/bin/strip
[error] + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip
[error] + /usr/lib/rpm/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
[info] Processing files: autopilot-visualizer-0.2-1.noarch
[info] Provides: ....
[info] Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
[info] Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/dev/arago-visualizer/target/rpm/buildroot
[info] Wrote: /home/dev/arago-visualizer/target/rpm/RPMS/noarch/autopilot-visualizer-0.2-1.noarch.rpm
[info] Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.mFAnIu
[error] + umask 022
[error] + cd /home/dev/arago-visualizer/target/rpm/BUILD
[error] + /usr/bin/rm -rf /home/dev/arago-visualizer/target/rpm/buildroot
[error] + exit 0

They suggest an error happened, but on the other hand "exit 0" does look ok and the output is good. Maybe you have a clue, what's going on there?

And a second question: also in the log there is "[info] Building target platforms: noarch-Arago-linux". Arago is taken from the spec metadata "Vendor" field. Why did you put it into the --target parameter?
According to here http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch-rpmbuild.html it should be something like "fedora" or "redhat".
Does this need a fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants