Ryan,

Unless there's something I'm not understanding, in which case I apologise for 
the noise, I don't think my shell is caching anything.  I went so far as to 
change my user's .zshrc file and try this four possibilities _with a reboot 
between each test_:

  * /opt/local: installed from packages: works fine
  * /opt/macports-2.4.2: installed from git, built clean: works fine and 
reports 2.4.2
  * /opt/macports-2.4.3-dirty: installed from git after switching tag and _not_ 
cleaning the tree: still reports 2.4.2.
  * /opt/macports-2.4.3-clean: installed from git after cleaning (git clean 
-xfd): works fine and reports 2.4.3.

How could the shell be caching anything?  And why it would be caching for the 
/opt/macports-2.4.3-dirty tree and not for the /opt/macports-2.4.3-clean tree?

Cheers,
-- 
Enrico

> On 12 Apr 2018, at 18:44, Ryan Schmidt <ryandes...@macports.org> wrote:
> 
> 
> On Apr 12, 2018, at 03:39, Enrico Maria Crisostomo wrote:
> 
>> On 12 Apr 2018, at 02:30, Ryan Schmidt wrote:
>> 
>>> On Apr 11, 2018, at 08:48, Enrico Maria Crisostomo wrote:
>>> 
>>>> Well, I replicated it:
>>>> 
>>>> * Clean the repo (e.g.: git clean -xfd)
>>>> * git checkout v2.4.2
>>>> * build and install 2.4.2:
>>>> 
>>>>   $ export PATH=/bin:/sbin:/usr/bin:/usr/sbin
>>>>   $ MP_PREFIX=/opt/macports-2.4.2
>>>>   $ ./configure --prefix=$MP_PREFIX 
>>>> --with-applications-dir=$MP_PREFIX/Applications
>>>>   $ make
>>>>   $ sudo make install
>>>> 
>>>> * open new terminal
>>>> * git checkout v2.4.3
>>>> * configure 2.4.3:
>>>> 
>>>>   $ export PATH=/bin:/sbin:/usr/bin:/usr/sbin
>>>>   $ MP_PREFIX=/opt/macports-2.4.3
>>>>   $ ./configure --prefix=$MP_PREFIX 
>>>> --with-applications-dir=$MP_PREFIX/Applications
>>>> 
>>>> * At this point src/macports1.0/macports_autoconf.tcl correctly contains 
>>>> `variable macports_version "2.4.3"`
>>>> * build and install 2.4.3:
>>>> 
>>>>   $ make
>>>>   $ sudo make install
>>>> 
>>>> * At this point 
>>>> /opt/macports-2.4.3/libexec/macports/lib/macports1.0/macports_autoconf.tcl 
>>>> correctly contains `variable macports_version "2.4.3"`.
>>>> * But port reports 2.4.2:
>>>> 
>>>>   % echo path
>>>>   
>>>> /opt/macports-2.4.3/bin:/opt/macports-2.4.3/sbin:/bin:/usr/bin:/usr/ucb:/usr/local/bin
>>>>   % type port
>>>>   port is /opt/macports-2.4.3/bin/port
>>>>   % port version
>>>>   Version: 2.4.2
>>> 
>>> Just to be absolutely certain which `port' binary you're running:
>>> 
>>> What happens if you run:
>>> 
>>> /opt/macports-2.4.3/bin/port version
>> 
>> Hi Ryan,
>> 
>> This happens:
>> 
>>   % /opt/macports-2.4.3-clean/bin/port version
>>   Version: 2.4.3
> 
> Then I would say that MacPorts is working correctly. I would guess that the 
> problem occurred because of your shell's cached lookup of the port command in 
> the previous /opt/macports-2.4.2 location.

Reply via email to