move oldfolder newfolder results in oldfolder/newfolder

Bradley Giesbrecht pixilla at macports.org
Wed Feb 15 22:41:42 PST 2012


On Feb 15, 2012, at 9:53 PM, Ryan Schmidt wrote:

> 
> On Feb 15, 2012, at 19:16, Bradley Giesbrecht wrote:
> 
>> It seems that if you use the move macro or file rename on a folder a new folder is created for the target folder and the source is moved _into_ the target.
> 
> That would be news to me. Can you provide a portfile that exhibits this behavior?

I don't know what to say. I was battling this for a half hour or more and now it behaves as one would expect. The port I am working on uses subports and I have noticed
some oddities with subports.

Here is an example: (py-cairo is a uncommitted unification port I am working on)
pillbox:dports brad$ sudo port clean name:^py..-cairo$
--->  Cleaning py24-cairo
--->  Cleaning py25-cairo
--->  Cleaning py26-cairo
--->  Cleaning py27-cairo
--->  Cleaning py31-cairo
--->  Cleaning py32-cairo
pillbox:dports brad$ sudo port extract name:^py..-cairo$
--->  Fetching py24-cairo
--->  Verifying checksum(s) for py24-cairo
--->  Extracting py24-cairo
--->  Fetching py25-cairo
--->  Verifying checksum(s) for py25-cairo
--->  Extracting py25-cairo
--->  Fetching py26-cairo
--->  Verifying checksum(s) for py26-cairo
--->  Extracting py26-cairo
--->  Fetching py27-cairo
--->  Verifying checksum(s) for py27-cairo
--->  Extracting py27-cairo
--->  Fetching py31-cairo
--->  Verifying checksum(s) for py31-cairo
--->  Extracting py31-cairo
--->  Fetching py32-cairo
--->  Verifying checksum(s) for py32-cairo
--->  Extracting py32-cairo
pillbox:dports brad$ ls -la python/py-cairo/work/
total 8
drwxr-xr-x   4 macports  admin   136 Feb 15 22:38 .
drwxr-xr-x   3 macports  admin   102 Feb 15 22:38 ..
-rw-r--r--   1 macports  admin   100 Feb 15 22:38 .macports.py24-cairo.state
drwxr-xr-x  30 macports  admin  1020 Dec 13  2007 pycairo-1.4.12
pillbox:dports brad$ 


> Here is a portfile that works properly for me:
> 
> 
> 
> PortSystem          1.0
> 
> name                test
> version             1
> maintainers         nomaintainer
> 
> distfiles
> 
> extract.mkdir       yes
> 
> configure {
>    file mkdir ${worksrcpath}/foo
>    move ${worksrcpath}/foo ${worksrcpath}/bar
> }

Thanks.


Regards,
Bradley Giesbrecht (pixilla)







More information about the macports-dev mailing list