Opened 14 years ago
Closed 14 years ago
#29020 closed defect (fixed)
transmission 2.22: patch phase fails with non-default MacPorts prefix
Reported by: | netty.hacky@… | Owned by: | mnick@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.9.2 |
Keywords: | Cc: | ryandesign (Ryan Carsten Schmidt) | |
Port: | transmission |
Description
Port transmission 2.22 failed to build during patch phase.
2.4 GHz Intel Core 2 Duo
Mac OS X 10.6.7
Xcode 3.2.6
MacPorts 1.9.2
DEBUG: patch phase started at Sun Apr 3 19:35:37 PDT 2011 DEBUG: Executing proc-pre-org.macports.patch-patch-0 DEBUG: Executing org.macports.patch (transmission) ---> Applying patches to transmission ---> Applying /Users/netty/macports/var/macports/sources/rsync.macports.org/release/ports/net/transmission/files/patch-xcodebuild.diff DEBUG: Environment: CPATH='/Users/netty/macports/include' CC_PRINT_OPTIONS_FILE='/Users/netty/macports/var/macports/build/_Users_netty_macports_var_macports_sources_rsync.macports.org_release_ports_net_transmission/work/.CC_PRINT_OPTIONS' LIBRARY_PATH='/Users/netty/macports/lib' CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.6' DEBUG: Assembled command: 'cd "/Users/netty/macports/var/macports/build/_Users_netty_macports_var_macports_sources_rsync.macports.org_release_ports_net_transmission/work/transmission-2.22" && /usr/bin/patch -p0' patching file Transmission.xcodeproj/project.pbxproj Hunk #1 FAILED at 445. Hunk #4 FAILED at 1996. 2 out of 4 hunks FAILED -- saving rejects to file Transmission.xcodeproj/project.pbxproj.rej shell command " cd "/Users/netty/macports/var/macports/build/_Users_netty_macports_var_macports_sources_rsync.macports.org_release_ports_net_transmission/work/transmission-2.22" && /usr/bin/patch -p0 < '/Users/netty/macports/var/macports/sources/rsync.macports.org/release/ports/net/transmission/files/patch-xcodebuild.diff'" returned error 1 Error: Target org.macports.patch returned: shell command failed (see log for details) DEBUG: Backtrace: shell command failed (see log for details) Warning: the following items did not execute (for transmission): org.macports.destroot org.macports.patch org.macports.configure org.macports.build Log for transmission is at: /Users/netty/macports/var/macports/logs/_Users_netty_macports_var_macports_sources_rsync.macports.org_release_ports_net_transmission/main.log
Change History (4)
comment:1 Changed 14 years ago by jmroot (Joshua Root)
Owner: | changed from macports-tickets@… to mnick@… |
---|
comment:3 follow-up: 4 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… added; netty.hacky@… removed |
---|---|
Summary: | transmission 2.22 failed to build in patch phase → transmission 2.22: patch phase fails with non-default MacPorts prefix |
Confirmed, this problem exists when the MacPorts prefix is not /opt/local. The reason is that in the pre-patch phase, ${prefix} is inserted into the file being patched, and then the patchfile assumes that it is /opt/local that has been inserted.
I do not understand why this port has a pre-patch phase, a patchfile, and a post-patch phase, all affecting project.pbxproj. I would think that at most a patchfile and a post-patch reinplace would be needed.
Note that the current patchfile isn't correct, in that it replaces "/opt/local/lib/libcrypto.0.9.7.dylib" with "@@PREFIX@@/libcrypto.dylib" when it should be replacing it with "@@PREFIX@@/lib/libcrypto.dylib". Curiously, the software still manages to be linked with the proper libcrypto; not sure how that's happening.
comment:4 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Replying to ryandesign@…:
Confirmed, this problem exists when the MacPorts prefix is not /opt/local. The reason is that in the pre-patch phase, ${prefix} is inserted into the file being patched, and then the patchfile assumes that it is /opt/local that has been inserted.
Now fixed in r78589.
I do not understand why this port has a pre-patch phase, a patchfile, and a post-patch phase, all affecting project.pbxproj. I would think that at most a patchfile and a post-patch reinplace would be needed.
I've left this as-is. Turns out the pre-patch reinplace is affecting many many lines, so expressed as a patchfile this would be rather voluminous.
Note that the current patchfile isn't correct, in that it replaces "/opt/local/lib/libcrypto.0.9.7.dylib" with "@@PREFIX@@/libcrypto.dylib" when it should be replacing it with "@@PREFIX@@/lib/libcrypto.dylib". Curiously, the software still manages to be linked with the proper libcrypto; not sure how that's happening.
Upon further investigation, I saw that this peculiarity was then undone by the post-patch reinplace, which replaced "@@PREFIX@@" with "${prefix}/lib". I've changed this in the above revision as well, so now "@@PREFIX@@" gets replaced with "${prefix}" as one would expect.
Please remember to cc the maintainer.