move oldfolder newfolder results in oldfolder/newfolder

Ryan Schmidt ryandesign at macports.org
Thu Feb 16 11:15:22 PST 2012


On Feb 16, 2012, at 00:41, Bradley Giesbrecht wrote:

> 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.

Is it possible you had not cleaned before trying again? Certainly, if you "mv foo bar" and "bar" does not exist, then "foo" gets renamed to "bar", however if "bar" already exists and is a directory, "foo" is moved to "bar/foo". Perhaps something similar was happening in your case.


> 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$ 

What about that looks odd to you?

Note that when you begin work on multiple subports of a single port, only the first subport's work directory is symlinked into the port's directory. To find the others, you'll have to dig into /opt/local/var/macports/build. If you want a particular subport's work directory to be symlinked into a port's directory, make sure all of that port's other subports have been cleaned first.





More information about the macports-dev mailing list