Q about post-extract recent commit breakage
Michael Dickens
michaelld at macports.org
Tue Dec 4 18:03:49 UTC 2018
Or, even more simply, just remove the post-extract all together. I don't recall why it's the in the first place, but removing it seems to do the trick. Thanks! - MLD
On Tue, Dec 4, 2018, at 2:07 AM, Ryan Schmidt wrote:
> On Dec 4, 2018, at 01:04, Ryan Schmidt wrote:
>
> > On Dec 3, 2018, at 19:35, Michael Dickens wrote:
> >
> >> Here's the error (just do "sudo port extract cmake-devel"; it results in this error on every OS I tested, from 10.5 to 10.14):
> >> {{{
> >> Error: Failed to extract cmake-devel: error renaming "/opt/local/var/macports/build/_opt_sources_MacPorts_ports_github_macports_devel_cmake/cmake-devel/work/cmake-772edffbf0c08fc0a6fcf74fb98545b7afcfee13-772edffbf0c08fc0a6fcf74fb98545b7afcfee13" to "/opt/local/var/macports/build/_opt_sources_MacPorts_ports_github_macports_devel_cmake/cmake-devel/work/cmake-772edffbf0c08fc0a6fcf74fb98545b7afcfee13/cmake-772edffbf0c08fc0a6fcf74fb98545b7afcfee13-772edffbf0c08fc0a6fcf74fb98545b7afcfee13": trying to rename a volume or move a directory into itself
> >> Error: See /opt/local/var/macports/logs/_opt_sources_MacPorts_ports_github_macports_devel_cmake/cmake-devel/main.log for details.
> >> }}}
> >
> > Ok, that's because cmake-devel does this:
> >
> > post-extract {
> > move ${workpath}/${name}-${commit}-${commit} ${workpath}/${name}-${commit}
> > }
> >
> > Now that base has been changed, MacPorts has already made a ${worksrcdir} (in this case ${name}-${commit}) symlink for you. So for compatibility with both the released version of MacPorts and master, you should ensure it doesn't already exist before moving it:
> >
> > post-extract {
> > if {![file exists ${worksrcpath}]} {
> > move ${workpath}/${name}-${commit}-${commit} ${worksrcpath}
> > }
> > }
> >
> > which is basically what's done in the remaining commit for libao in this PR:
> >
> > https://github.com/macports/macports-ports/pull/1760
> >
> > After compatibility with the current version of MacPorts is no longer needed, the entire post-extract block can be removed.
>
> Or, more simply and more usually, you should be able to just:
>
> worksrcdir ${name}-${commit}-${commit}
>
> (and again, if desired, remove it once a future version of MacPorts is
> released).
>
More information about the macports-dev
mailing list