Opened 9 years ago

Closed 9 years ago

#48035 closed defect (fixed)

py27-chainer fails destroot

Reported by: Schamschula (Marius Schamschula) Owned by: humem (humem)
Priority: Normal Milestone:
Component: ports Version: 2.3.3
Keywords: haspatch Cc: ryandesign (Ryan Carsten Schmidt), petrrr, kurthindenburg (Kurt Hindenburg)
Port: py-chainer

Description

https://trac.macports.org/changeset/137459 broke the destroot phase, see attached main.log.gz. Adding /${subport} to the copy target fixes the issue.

Attachments (2)

main.log.gz (4.1 KB) - added by Schamschula (Marius Schamschula) 9 years ago.
Portfile-py27-chainer.diff (384 bytes) - added by Schamschula (Marius Schamschula) 9 years ago.

Download all attachments as: .zip

Change History (12)

Changed 9 years ago by Schamschula (Marius Schamschula)

Attachment: main.log.gz added

Changed 9 years ago by Schamschula (Marius Schamschula)

Attachment: Portfile-py27-chainer.diff added

comment:1 Changed 9 years ago by mf2k (Frank Schima)

Keywords: haspatch added; h removed
Owner: changed from macports-tickets@… to hum@…
Port: py-chainer added; py27-chainer removed

comment:2 Changed 9 years ago by larryv (Lawrence Velázquez)

Cc: ryandesign@… added

The docdir path already ends with $subport. Wouldn’t this change install the examples to $prefix/share/doc/$subport/$subport?

comment:3 Changed 9 years ago by larryv (Lawrence Velázquez)

Cc: hum@… removed

comment:4 Changed 9 years ago by larryv (Lawrence Velázquez)

The python-1.0 portgroup creates the “examples” directory in a pre-destroot script. I think this would work.

  • dports/python/py-chainer/Portfile

    diff --git a/dports/python/py-chainer/Portfile b/dports/python/py-chainer/Portfile
    index 0f4cbee..158ae7e 100644
    a b if {${name} ne ${subport}} { 
    3535            LICENSE README.md \
    3636            ${destroot}${docdir}
    3737        # install examples
    38         copy ${worksrcpath}/examples ${destroot}${docdir}
     38        copy -force ${worksrcpath}/examples ${destroot}${docdir}
    3939    }
    4040
    4141    livecheck.type      none

comment:5 in reply to:  4 ; Changed 9 years ago by Schamschula (Marius Schamschula)

Replying to larryv@…:

The python-1.0 portgroup creates the “examples” directory in a pre-destroot script. I think this would work.

  • dports/python/py-chainer/Portfile

    diff --git a/dports/python/py-chainer/Portfile b/dports/python/py-chainer/Portfile
    index 0f4cbee..158ae7e 100644
    a b if {${name} ne ${subport}} { 
    3535            LICENSE README.md \
    3636            ${destroot}${docdir}
    3737        # install examples
    38         copy ${worksrcpath}/examples ${destroot}${docdir}
     38        copy -force ${worksrcpath}/examples ${destroot}${docdir}
    3939    }
    4040
    4141    livecheck.type      none

When experimenting I tried this very syntax, and it failed with the same error in the log.

comment:6 in reply to:  5 ; Changed 9 years ago by larryv (Lawrence Velázquez)

Okay. The file(n) man page is not very precise about what -force does.

What about this?

  • dports/python/py-chainer/Portfile

    diff --git a/dports/python/py-chainer/Portfile b/dports/python/py-chainer/Portfile
    index 0f4cbee..46ce3e8 100644
    a b if {${name} ne ${subport}} { 
    3535            LICENSE README.md \
    3636            ${destroot}${docdir}
    3737        # install examples
     38        delete ${destroot}${docdir}/examples
    3839        copy ${worksrcpath}/examples ${destroot}${docdir}
    3940    }
    4041

comment:7 in reply to:  6 Changed 9 years ago by Schamschula (Marius Schamschula)

Replying to larryv@…:

Okay. The file(n) man page is not very precise about what -force does.

What about this?

  • dports/python/py-chainer/Portfile

    diff --git a/dports/python/py-chainer/Portfile b/dports/python/py-chainer/Portfile
    index 0f4cbee..46ce3e8 100644
    a b if {${name} ne ${subport}} { 
    3535            LICENSE README.md \
    3636            ${destroot}${docdir}
    3737        # install examples
     38        delete ${destroot}${docdir}/examples
    3839        copy ${worksrcpath}/examples ${destroot}${docdir}
    3940    }
    4041

This patch works!

I should have come to this solution myself. Hind sight is 20/20…

Last edited 9 years ago by Schamschula (Marius Schamschula) (previous) (diff)

comment:8 Changed 9 years ago by petrrr

Cc: petr@… added

Cc Me!

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

Cc: khindenburg@… added

Cc Me!

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

Resolution: fixed
Status: newclosed

looks like this was fixed last summer

Note: See TracTickets for help on using tickets.