Re: port version reports 2.4.2 when built from tag v2.4.3

2018-04-14 Thread Rainer Müller
On 2018-04-13 23:55, Joshua Root wrote:
> On 2018-4-14 07:30 , Enrico Maria Crisostomo wrote:
>> Hence, the macports installation that was built from the dirty tree is 
>> referring to the installation directory of the previous build.  That also 
>> explains why removing that directory makes port crash, as I said in a 
>> previous mail.
> 
> OK, so the issue is not with switching tags without cleaning at all, but
> configuring for a different prefix without cleaning. The bug is in one
> of Tcl's Makefiles, which compiles tclPkgConfig.c with several -D flags
> using values that are directly substituted into the Makefile by
> autoconf. There should probably be a dependency declared on the Makefile
> itself.

FWIW, I am usually work with multiple worktrees instead of switching
branches in the same directory. That way I can have directories for both
master and release-2.4 side-by-side.

$ pwd
/Users/raimue/src/macports/base
$ git worktree add ../base-2.4 release-2.4
$ cd ../base-2.4
$ cat config/macports_version
2.4.3

See the git manual for the details:
https://git-scm.com/docs/git-worktree

The copy in base-2.4 is also configured to use a different prefix. As
the files of the build system can stay in the filesystem, I do not have
to re-configure all the time. When I want to work on release-2.4, I only
have to change directory in my shell.

Rainer


Re: port version reports 2.4.2 when built from tag v2.4.3

2018-04-14 Thread Enrico Maria Crisostomo

> On 13 Apr 2018, at 23:55, Joshua Root  wrote:
> 
> On 2018-4-14 07:30 , Enrico Maria Crisostomo wrote:
>> I think I found the culprit:
>> 
>>% strings /opt/macports-2.4.3-dirty/libexec/macports/lib/libtcl8.5.dylib 
>> | grep 2\\.4\\.
>>/opt/macports-2.4.2/libexec/macports/lib
>>/opt/macports-2.4.2/libexec/macports/bin
>>/opt/macports-2.4.2/libexec/macports/lib/tcl8.5
>>/opt/macports-2.4.2/libexec/macports/include
>>/opt/macports-2.4.2/libexec/macports/man
>>/opt/macports-2.4.3-dirty/libexec/macports/lib/tcl8.5
>>/opt/macports-2.4.3-dirty/libexec/macports/lib
>> 
>> while the library built from the clean repo is right:
>> 
>>% strings /opt/macports-2.4.3-clean/libexec/macports/lib/libtcl8.5.dylib 
>> | grep 2\\.4\\.
>>/opt/macports-2.4.3-clean/libexec/macports/lib
>>/opt/macports-2.4.3-clean/libexec/macports/bin
>>/opt/macports-2.4.3-clean/libexec/macports/lib/tcl8.5
>>/opt/macports-2.4.3-clean/libexec/macports/include
>>/opt/macports-2.4.3-clean/libexec/macports/man
>>/opt/macports-2.4.3-clean/libexec/macports/lib/tcl8.5
>>/opt/macports-2.4.3-clean/libexec/macports/lib
>> 
>> Hence, the macports installation that was built from the dirty tree is 
>> referring to the installation directory of the previous build.  That also 
>> explains why removing that directory makes port crash, as I said in a 
>> previous mail.
> 
> OK, so the issue is not with switching tags without cleaning at all, but
> configuring for a different prefix without cleaning. The bug is in one
> of Tcl's Makefiles, which compiles tclPkgConfig.c with several -D flags
> using values that are directly substituted into the Makefile by
> autoconf. There should probably be a dependency declared on the Makefile
> itself.
> 
> - Josh

Thanks Josh.

You're right, and thanks to your pointing out the file involved I've just added 
a dependency from tclPkgConfig.o to the Makefile itself and the problem 
disappears.

Here's a PR:

https://github.com/macports/macports-base/pull/79

I'm not merging until somebody has a look at it.

Cheers,
-- 
Enrico

Re: port version reports 2.4.2 when built from tag v2.4.3

2018-04-13 Thread Joshua Root
On 2018-4-14 07:30 , Enrico Maria Crisostomo wrote:
> I think I found the culprit:
> 
> % strings /opt/macports-2.4.3-dirty/libexec/macports/lib/libtcl8.5.dylib 
> | grep 2\\.4\\.
> /opt/macports-2.4.2/libexec/macports/lib
> /opt/macports-2.4.2/libexec/macports/bin
> /opt/macports-2.4.2/libexec/macports/lib/tcl8.5
> /opt/macports-2.4.2/libexec/macports/include
> /opt/macports-2.4.2/libexec/macports/man
> /opt/macports-2.4.3-dirty/libexec/macports/lib/tcl8.5
> /opt/macports-2.4.3-dirty/libexec/macports/lib
> 
> while the library built from the clean repo is right:
> 
> % strings /opt/macports-2.4.3-clean/libexec/macports/lib/libtcl8.5.dylib 
> | grep 2\\.4\\.
> /opt/macports-2.4.3-clean/libexec/macports/lib
> /opt/macports-2.4.3-clean/libexec/macports/bin
> /opt/macports-2.4.3-clean/libexec/macports/lib/tcl8.5
> /opt/macports-2.4.3-clean/libexec/macports/include
> /opt/macports-2.4.3-clean/libexec/macports/man
> /opt/macports-2.4.3-clean/libexec/macports/lib/tcl8.5
> /opt/macports-2.4.3-clean/libexec/macports/lib
> 
> Hence, the macports installation that was built from the dirty tree is 
> referring to the installation directory of the previous build.  That also 
> explains why removing that directory makes port crash, as I said in a 
> previous mail.

OK, so the issue is not with switching tags without cleaning at all, but
configuring for a different prefix without cleaning. The bug is in one
of Tcl's Makefiles, which compiles tclPkgConfig.c with several -D flags
using values that are directly substituted into the Makefile by
autoconf. There should probably be a dependency declared on the Makefile
itself.

- Josh


Re: port version reports 2.4.2 when built from tag v2.4.3

2018-04-13 Thread Enrico Maria Crisostomo
I think I found the culprit:

% strings /opt/macports-2.4.3-dirty/libexec/macports/lib/libtcl8.5.dylib | 
grep 2\\.4\\.
/opt/macports-2.4.2/libexec/macports/lib
/opt/macports-2.4.2/libexec/macports/bin
/opt/macports-2.4.2/libexec/macports/lib/tcl8.5
/opt/macports-2.4.2/libexec/macports/include
/opt/macports-2.4.2/libexec/macports/man
/opt/macports-2.4.3-dirty/libexec/macports/lib/tcl8.5
/opt/macports-2.4.3-dirty/libexec/macports/lib

while the library built from the clean repo is right:

% strings /opt/macports-2.4.3-clean/libexec/macports/lib/libtcl8.5.dylib | 
grep 2\\.4\\.
/opt/macports-2.4.3-clean/libexec/macports/lib
/opt/macports-2.4.3-clean/libexec/macports/bin
/opt/macports-2.4.3-clean/libexec/macports/lib/tcl8.5
/opt/macports-2.4.3-clean/libexec/macports/include
/opt/macports-2.4.3-clean/libexec/macports/man
/opt/macports-2.4.3-clean/libexec/macports/lib/tcl8.5
/opt/macports-2.4.3-clean/libexec/macports/lib

Hence, the macports installation that was built from the dirty tree is 
referring to the installation directory of the previous build.  That also 
explains why removing that directory makes port crash, as I said in a previous 
mail.

Cheers,
-- 
Enrico

> On 13 Apr 2018, at 22:28, Enrico Maria Crisostomo 
>  wrote:
> 
> 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  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.
> 



Re: port version reports 2.4.2 when built from tag v2.4.3

2018-04-13 Thread Enrico Maria Crisostomo
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  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.



Re: port version reports 2.4.2 when built from tag v2.4.3

2018-04-12 Thread Ryan Schmidt

On Apr 12, 2018, at 18:02, Jack Howarth wrote:

> Okay. I was confused as to whether the installer contained the complete ports 
> repo or if it had to download that from the servers. I'm used to fink where 
> the installer only provides a core set of the base package files and the rest 
> have to be obtained from their servers. 

MacPorts is the same. The installer installs the base code, and then runs "sudo 
port selfupdate" which updates base to the latest version *and* downloads the 
collection of portfiles. The collection of portfiles is not tied to a specific 
version of MacPorts, but is meant to always be used with the latest (or nearly 
the latest) version of MacPorts.




Re: port version reports 2.4.2 when built from tag v2.4.3

2018-04-12 Thread Jack Howarth
On Thu, Apr 12, 2018 at 6:47 PM, Rainer Müller  wrote:

> On 2018-04-13 00:42, Jack Howarth wrote:
> > This issue might also be impacting the High Sierra macports 2.4.3
> > installer image as well. After installing it on a machine with no
> > /opt/local, I get the following from 'sudo port self update'...
> >
> > --->  Updating MacPorts base sources using rsync
> >
> > MacPorts base version 2.4.3 installed,
> >
> > MacPorts base version 2.4.2 downloaded.
>
> It is actually an unrelated problem. The new version is not yet
> available over selfupdate. The script that is supposed to update the
> rsync server is failing.
>
> Check this and following messages in the thread on macports-users:
> https://lists.macports.org/pipermail/macports-users/2018-April/044969.html
>
> Rainer
>

So I assume there is no simple way to just reconfigure the installed 2.4.3
macports to use a 2.4.3 branch git repo?


Re: port version reports 2.4.2 when built from tag v2.4.3

2018-04-12 Thread Ryan Schmidt

On Apr 12, 2018, at 17:42, Jack Howarth wrote:

> This issue

"This issue" isn't an issue, it's just a misunderstanding of how the shell 
caches information.

> might also be impacting the High Sierra macports 2.4.3 installer image as 
> well. After installing it on a machine with no /opt/local, I get the 
> following from 'sudo port self update'...
> 
> --->  Updating MacPorts base sources using rsync
> MacPorts base version 2.4.3 installed,
> MacPorts base version 2.4.2 downloaded.
> --->  Updating the ports tree
> --->  MacPorts base is probably trunk or a release candidate
> 
> The ports tree has been updated. To upgrade your installed ports, you should 
> run
>   port upgrade outdated
> 
> When I execute 'sudo port upgrade outdated', I get...
> 
> Nothing to upgrade.

That's a server problem that should be resolved within the hour.



Re: port version reports 2.4.2 when built from tag v2.4.3

2018-04-12 Thread Ryan Schmidt

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.




Re: port version reports 2.4.2 when built from tag v2.4.3

2018-04-12 Thread Enrico Maria Crisostomo


> 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




Re: port version reports 2.4.2 when built from tag v2.4.3

2018-04-11 Thread Ryan Schmidt

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



Re: port version reports 2.4.2 when built from tag v2.4.3

2018-04-11 Thread Joshua Root
On 2018-4-11 23:48 , Enrico Maria Crisostomo wrote:
>   * 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

Not sure what to tell you. The code could scarcely be simpler:




> If I clean the repo between the builds, the problem does not happen.

You could install both ways to different prefixes and do a recursive diff?

- Josh


Re: port version reports 2.4.2 when built from tag v2.4.3

2018-04-11 Thread Enrico Maria Crisostomo
Not if I'm installing a MacPorts instance from source _side-by-side_ with 
another one installed in /opt/local (e.g.: from the packages).  At least that's 
my understanding of the documentation.

> On 11 Apr 2018, at 15:52, G A  wrote:
> 
> Your path should have /opt/local/bin first.
> 
> On Wed, Apr 11, 2018 at 06: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
> 
> If I clean the repo between the builds, the problem does not happen.
> 
> Cheers,
> --
> Enrico
> 
> > On 11 Apr 2018, at 15:32, Joshua Root  wrote:
> >
> > On 2018-4-11 23:27 , Enrico Maria Crisostomo wrote:
> >> Thanks Rainer,
> >>
> >> I can't check it but as I said in my previous mail I think I had forgotten 
> >> to run `make distclean` when I previously built `v2.4.2`.  And now I see 
> >> that the `macports_autoconf.tcl` file you cite is an Autoconf config file. 
> >>  Why this happen now makes sense.
> >
> > As Rainer said, running configure is supposed to update that file (and
> > in my experience it does).
> >
> > - Josh
> 



Re: port version reports 2.4.2 when built from tag v2.4.3

2018-04-11 Thread G A
Your path should have /opt/local/bin first.

On Wed, Apr 11, 2018 at 06:48 Enrico Maria Crisostomo <
enrico.m.crisost...@gmail.com> 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
>
> If I clean the repo between the builds, the problem does not happen.
>
> Cheers,
> --
> Enrico
>
> > On 11 Apr 2018, at 15:32, Joshua Root  wrote:
> >
> > On 2018-4-11 23:27 , Enrico Maria Crisostomo wrote:
> >> Thanks Rainer,
> >>
> >> I can't check it but as I said in my previous mail I think I had
> forgotten to run `make distclean` when I previously built `v2.4.2`.  And
> now I see that the `macports_autoconf.tcl` file you cite is an Autoconf
> config file.  Why this happen now makes sense.
> >
> > As Rainer said, running configure is supposed to update that file (and
> > in my experience it does).
> >
> > - Josh
>
>


Re: port version reports 2.4.2 when built from tag v2.4.3

2018-04-11 Thread Enrico Maria Crisostomo
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

If I clean the repo between the builds, the problem does not happen.

Cheers,
-- 
Enrico

> On 11 Apr 2018, at 15:32, Joshua Root  wrote:
> 
> On 2018-4-11 23:27 , Enrico Maria Crisostomo wrote:
>> Thanks Rainer,
>> 
>> I can't check it but as I said in my previous mail I think I had forgotten 
>> to run `make distclean` when I previously built `v2.4.2`.  And now I see 
>> that the `macports_autoconf.tcl` file you cite is an Autoconf config file.  
>> Why this happen now makes sense.
> 
> As Rainer said, running configure is supposed to update that file (and
> in my experience it does).
> 
> - Josh



Re: port version reports 2.4.2 when built from tag v2.4.3

2018-04-11 Thread Enrico Maria Crisostomo
Ok, now I'm sufficiently curious as to dig deeper and replicate what I think 
the sequence of events were.

> On 11 Apr 2018, at 15:32, Joshua Root  wrote:
> 
> On 2018-4-11 23:27 , Enrico Maria Crisostomo wrote:
>> Thanks Rainer,
>> 
>> I can't check it but as I said in my previous mail I think I had forgotten 
>> to run `make distclean` when I previously built `v2.4.2`.  And now I see 
>> that the `macports_autoconf.tcl` file you cite is an Autoconf config file.  
>> Why this happen now makes sense.
> 
> As Rainer said, running configure is supposed to update that file (and
> in my experience it does).
> 
> - Josh



Re: port version reports 2.4.2 when built from tag v2.4.3

2018-04-11 Thread Joshua Root
On 2018-4-11 23:27 , Enrico Maria Crisostomo wrote:
> Thanks Rainer,
> 
> I can't check it but as I said in my previous mail I think I had forgotten to 
> run `make distclean` when I previously built `v2.4.2`.  And now I see that 
> the `macports_autoconf.tcl` file you cite is an Autoconf config file.  Why 
> this happen now makes sense.

As Rainer said, running configure is supposed to update that file (and
in my experience it does).

- Josh


Re: port version reports 2.4.2 when built from tag v2.4.3

2018-04-11 Thread Enrico Maria Crisostomo
Thanks Rainer,

I can't check it but as I said in my previous mail I think I had forgotten to 
run `make distclean` when I previously built `v2.4.2`.  And now I see that the 
`macports_autoconf.tcl` file you cite is an Autoconf config file.  Why this 
happen now makes sense.

Cheers,
-- 
Enrico

> On 11 Apr 2018, at 14:22, Rainer Müller  wrote:
> 
> On 2018-04-11 10:52, Enrico Maria Crisostomo wrote:
>> I've just created a new installation of macports-base from tag v2.4.3 
>> following the instructions in the documentation (basically git checkout 
>> v2.4.3, ./configure ..., make and make install) and I've just noticed that 
>> `port` reports 2.4.2:
> 
> Hm, I cannot reproduce this problem. The configure script is supposed to
> update the relevant file with the version number.
> 
> Check "macports_version" in src/macports1.0/macports_autoconf.tcl in
> your working tree.
> 
> Rainer



Re: port version reports 2.4.2 when built from tag v2.4.3

2018-04-11 Thread Enrico Maria Crisostomo
Hi Joshua,

Thanks.  The port script was the correct one.  I think I re-configured and 
built v2.4.3 over a previous v2.4.2 build but I can't confirm.  I cleaned the 
HEAD and rebuilt and the result is as expected.

I noticed in the documentation that "2.2.3 git install" instructs to make 
distclean after the build, while "2.2.4 Install multiple MacPorts Copies" does 
not.  Perhaps amending the documentation may help others not to stumble on this 
one, even if the blame is to be attributed to the user in this case.  I'll send 
a PR for that one.

Cheers,
-- 
Enrico

> On 11 Apr 2018, at 14:17, Joshua Root  wrote:
> 
> On 2018-4-11 18:52 , Enrico Maria Crisostomo wrote:
>> Hi,
>> 
>> I've just created a new installation of macports-base from tag v2.4.3 
>> following the instructions in the documentation (basically git checkout 
>> v2.4.3, ./configure ..., make and make install) and I've just noticed that 
>> `port` reports 2.4.2:
>> 
>>% which port
>>/opt/macports-2.4.3/bin/port
>>% port version
>>Version: 2.4.2
>> 
>> I built from:
>> 
>>% git rev-parse HEAD
>>a393413460aae5ac9749b994681381087089cdb5
>> 
>> which appears to be the correct v2.4.3:
>> 
>>* commit a393413460aae5ac9749b994681381087089cdb5 (HEAD, tag: v2.4.3, 
>> upstream/release-2.4)
>>| Author: Joshua Root 
>>| Date:   Wed Apr 11 10:23:40 2018 +1000
>>|
>>| Bump branch version to 2.4.3
>> 
>> Am I missing something obvious or it this a typo?
> 
> I'm not sure how that happened for you. Browsing the tag on GitHub, it
> says 2.4.3 in the appropriate places.
> 
> 
> 
> 
> Are you sure your shell didn't cache the location of port? Check with
> 'type port'. (Using 'which' tells you where it would be found if you
> cleared the cache.)
> 
> - Josh



Re: port version reports 2.4.2 when built from tag v2.4.3

2018-04-11 Thread Rainer Müller
On 2018-04-11 10:52, Enrico Maria Crisostomo wrote:
> I've just created a new installation of macports-base from tag v2.4.3 
> following the instructions in the documentation (basically git checkout 
> v2.4.3, ./configure ..., make and make install) and I've just noticed that 
> `port` reports 2.4.2:

Hm, I cannot reproduce this problem. The configure script is supposed to
update the relevant file with the version number.

Check "macports_version" in src/macports1.0/macports_autoconf.tcl in
your working tree.

Rainer


Re: port version reports 2.4.2 when built from tag v2.4.3

2018-04-11 Thread Joshua Root
On 2018-4-11 18:52 , Enrico Maria Crisostomo wrote:
> Hi,
> 
> I've just created a new installation of macports-base from tag v2.4.3 
> following the instructions in the documentation (basically git checkout 
> v2.4.3, ./configure ..., make and make install) and I've just noticed that 
> `port` reports 2.4.2:
> 
> % which port
> /opt/macports-2.4.3/bin/port
> % port version
> Version: 2.4.2
> 
> I built from:
> 
> % git rev-parse HEAD
> a393413460aae5ac9749b994681381087089cdb5
> 
> which appears to be the correct v2.4.3:
> 
> * commit a393413460aae5ac9749b994681381087089cdb5 (HEAD, tag: v2.4.3, 
> upstream/release-2.4)
> | Author: Joshua Root 
> | Date:   Wed Apr 11 10:23:40 2018 +1000
> |
> | Bump branch version to 2.4.3
> 
> Am I missing something obvious or it this a typo?

I'm not sure how that happened for you. Browsing the tag on GitHub, it
says 2.4.3 in the appropriate places.




Are you sure your shell didn't cache the location of port? Check with
'type port'. (Using 'which' tells you where it would be found if you
cleared the cache.)

- Josh