Opened 9 years ago

Closed 9 years ago

#50310 closed defect (fixed)

p5-musicbrainz-discid: patch fails

Reported by: mojca (Mojca Miklavec) Owned by: kurthindenburg (Kurt Hindenburg)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: p5-musicbrainz-discid

Description

patching p5-musicbrainz-discid fails with:

--->  Extracting p5-musicbrainz-discid
DEBUG: Executing org.macports.extract (p5-musicbrainz-discid)
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: patch phase started at Tue Jan 12 14:12:41 PST 2016
DEBUG: Executing org.macports.patch (p5-musicbrainz-discid)
--->  Applying patches to p5-musicbrainz-discid
--->  Applying pod-encoding.patch
DEBUG: Creating patch directory: /opt/local/var/macports/build/_opt_mports_dports_perl_p5-musicbrainz-discid/p5-musicbrainz-discid/work/MusicBrainz-DiscID-0.03
DEBUG: Environment: 
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_mports_dports_perl_p5-musicbrainz-discid/p5-musicbrainz-discid/work/.CC_PRINT_OPTIONS'
CPATH='/opt/local/include'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='10.8'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_mports_dports_perl_p5-musicbrainz-discid/p5-musicbrainz-discid/work/MusicBrainz-DiscID-0.03" && /usr/bin/patch -p1'
DEBUG: Executing command line:  cd "/opt/local/var/macports/build/_opt_mports_dports_perl_p5-musicbrainz-discid/p5-musicbrainz-discid/work/MusicBrainz-DiscID-0.03" && /usr/bin/patch -p1 < '/opt/mports/dports/perl/p5-musicbrainz-discid/files/pod-encoding.patch'
can't find file to patch at input line 11
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Description: use plain ascii apostrophe
|Origin: vendor
|Bug: https://rt.cpan.org/Ticket/Display.html?id=85212
|Bug-Debian: http://bugs.debian.org/708079
|Forwarded: https://rt.cpan.org/Ticket/Display.html?id=85212
|Author: gregor herrmann <gregoa@debian.org>
|Last-Update: 2013-05-13
|
|--- a/lib/MusicBrainz/DiscID.pm
|+++ b/lib/MusicBrainz/DiscID.pm
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
1 out of 1 hunk ignored
Command failed:  cd "/opt/local/var/macports/build/_opt_mports_dports_perl_p5-musicbrainz-discid/p5-musicbrainz-discid/work/MusicBrainz-DiscID-0.03" && /usr/bin/patch -p1 < '/opt/mports/dports/perl/p5-musicbrainz-discid/files/pod-encoding.patch'
Exit code: 1
Error: org.macports.patch for port p5-musicbrainz-discid returned: command execution failed
DEBUG: Error code: CHILDSTATUS 66740 1
DEBUG: Backtrace: command execution failed
    while executing
"system $fullcmdstring"
    ("eval" body line 1)
    invoked from within
"eval system $notty $nice \$fullcmdstring"
    invoked from within
"command_exec patch "" "< '$patch'""
    (procedure "portpatch::patch_main" line 35)
    invoked from within
"portpatch::patch_main org.macports.patch"
    ("eval" body line 1)
    invoked from within
"eval $procedure $targetname"
Warning: targets not executed for p5-musicbrainz-discid: org.macports.activate org.macports.patch org.macports.configure org.macports.build org.macports.destroot org.macports.install
Please see the log file for port p5-musicbrainz-discid for details:
    /opt/local/var/macports/logs/_opt_mports_dports_perl_p5-musicbrainz-discid/p5-musicbrainz-discid/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port p5-musicbrainz-discid failed
failure
--->  Cleaning p5-musicbrainz-discid

I'm attaching the patch that could fix that (even though I'm not exactly sure why the failure).

Attachments (1)

p5-musicbrainz-discid.diff (2.2 KB) - added by mojca (Mojca Miklavec) 9 years ago.
A patch for patching p5-musicbrainz-discid

Download all attachments as: .zip

Change History (5)

Changed 9 years ago by mojca (Mojca Miklavec)

Attachment: p5-musicbrainz-discid.diff added

A patch for patching p5-musicbrainz-discid

comment:1 Changed 9 years ago by kurthindenburg (Kurt Hindenburg)

Strange it worked back in Sept and it works now on my system. I'll try to figure out why

comment:2 Changed 9 years ago by kurthindenburg (Kurt Hindenburg)

To clarify you/buildbot are doing 'sudo port patch p5-musicbrainz-discid' ?

that should be p5.xx-musicbrainz-discid correct?

comment:3 Changed 9 years ago by mojca (Mojca Miklavec)

Nice catch. When I saw the error on the buildbot (please keep in mind that buildbot will try port patch p5-musicbrainz-discid in any case, so this has to be fixed) and tried to reproduce it, I got the same error without much thinking. After "fixing the problem" with -p1 vs. -p0, I tried p5.22-musicbrainz-discid of course. (If I would commit that change afterwards, I would probably have noticed another problem ... :)

So you need to put

if {${perl5.major} != ""} {

above the patches. I would still suggest you to fix "Hunk #1 succeeded at 31 (offset 3 lines)." and I would remove -p1, but that is up to you. (You probably wanted to keep 100% original patches from somewhere upstream?)

comment:4 Changed 9 years ago by kurthindenburg (Kurt Hindenburg)

Resolution: fixed
Status: newclosed

Thanks r144638 - I'd rather keep the patches since they match what Debian/bugreports use.

Note: See TracTickets for help on using tickets.