Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#48811 closed defect (fixed)

rev-upgrade failed: can't read "{os.platform}": no such variable

Reported by: bustamitenator@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: base Version: 2.3.99
Keywords: Cc:
Port:

Description (last modified by ryandesign (Ryan Carsten Schmidt))

I have recently installed macports to which i am a big fan. I have had no issues on my previous mac running MAC OSX Yosemite ( Macbook Pro mid 2011 ), i have just bought a new Macbook Pro mid 2015 Model Identifier:MacBookPro11,5

I installed xcode then command line tools as well as developer tools then Macports . Install was easy enough , i used the source download to install 1st time round.. i made sure my profile path was updated.

My Profile :-

#!/usr/bin/bash
# MacPort
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"

I also installed Quartz as i do use this a fair amount ..

OS = MAC OSX Yosemite 10.10.5
Xcode = Xcode 7 Beta
Command line Tools = Command Line Tools OSX 10.10 for Xcode 7 beta 6
Quartz = XQuartz-2.7.7
MacPorts = MacPorts-2.3.3.tar.bz2

I then tried to install minicom @2.7 & i got this output from my screen :-

Jimbo:base Jimbo$ sudo port install minicom
--->  Computing dependencies for minicom
--->  Cleaning minicom
--->  Scanning binaries for linking errors
--->  Found 3 broken files, matching files to ports
--->  Found 1 broken port, determining rebuild order
You can always run 'port rev-upgrade' again to fix errors.
The following ports will be rebuilt: minicom @2.7
Continue? [Y/n]: Y
Error: rev-upgrade failed: can't read "{os.platform}": no such variable
Error: Follow http://guide.macports.org/#project.tickets to report a bug.
Jimbo:base Jimbo$ sudo port rev-upgrade
--->  Scanning binaries for linking errors
--->  Found 3 broken files, matching files to ports
--->  Found 1 broken port, determining rebuild order
You can always run 'port rev-upgrade' again to fix errors.
The following ports will be rebuilt: minicom @2.7
Continue? [Y/n]: Y
Error: rev-upgrade failed: can't read "{os.platform}": no such variable
Error: Follow http://guide.macports.org/#project.tickets to report a bug.

This is from the log file :-

version:1
:msg:clean --->  Computing dependencies for pkgconfig:msg:clean 
:debug:clean pkgconfig has no conflicts
:debug:clean Searching for dependency: libiconv
:debug:clean Found Dependency: receipt exists for libiconv
:debug:main Executing org.macports.main (pkgconfig)
:debug:main changing euid/egid - current euid: 0 - current egid: 0
:debug:main egid changed to: 501
:debug:main euid changed to: 502
:debug:main Skipping completed org.macports.archivefetch (pkgconfig)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.fetch (pkgconfig)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.checksum (pkgconfig)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.extract (pkgconfig)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.patch (pkgconfig)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.configure (pkgconfig)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.build (pkgconfig)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.destroot (pkgconfig)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:install install phase started at Tue Sep  8 14:45:38 BST 2015
:notice:install --->  Installing pkgconfig @0.28_0
:debug:install Can't run install on this port without elevated privileges. Escalating privileges back to root.
:debug:install euid changed to: 0. egid changed to: 0.
:debug:install Executing org.macports.install (pkgconfig)
:debug:install Using /usr/bin/tar
:debug:install Using /usr/bin/bzip2
:error:install org.macports.install for port pkgconfig returned: no destroot found at: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_pkgconfig/pkgconfig/work/destroot
:debug:install Error code: NONE
:debug:install Backtrace: no destroot found at: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_pkgconfig/pkgconfig/work/destroot
    while executing
"create_archive $location $portarchivetype"
    (procedure "portinstall::install_main" line 22)
    invoked from within
"portinstall::install_main org.macports.install"
    ("eval" body line 1)
    invoked from within
"eval $procedure $targetname"
:info:install Warning: targets not executed for pkgconfig: org.macports.activate org.macports.install
:notice:install Please see the log file for port pkgconfig for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_pkgconfig/pkgconfig/main.log
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_pkgconfig/pkgconfig/main.log (END) 

I have looked around on your ticket system for other similar issues but cannot seem to narrow any of them down to a particular remedy.
I am hoping this is an easy enough one for you to remedy & point me in the right direction...

Thanks in advance
Regards
Jimbo :)

Attachments (1)

rev-upgrade.txt.bz2 (1.5 KB) - added by bustamitenator@… 9 years ago.

Download all attachments as: .zip

Change History (15)

comment:1 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Keywords: Yosemite OSX 10.10.5 os.platform destroot removed
Owner: changed from macports-tickets@… to ryandesign@…
Port: @2.7 removed
Status: newassigned

I am not certain whether "can't read "{os.platform}": no such variable" is a relevant or correct error. MacPorts sometime prints an incorrect error at the end of a failed operation. I don't know what port it thinks the problem is in. os.platform is a variable that exists in MacPorts. Only a handful of ports use it, and glancing at the code I don't see any that use it improperly. So I am inclined to ignore this error.

The error "org.macports.install for port pkgconfig returned: no destroot found at: ..." is definitely relevant. This error means you must clean the affected port and try again. In this case: run "sudo port clean pkgconfig". Cleaning and trying again is the first thing you should do anytime any port fails.

Ports should not normally be broken. I suspect the reason why MacPorts thinks minicom is broken on your system is that minicom uses ncurses, though it does not declare a dependency on it, and so it needs to be rebuilt following the recent update of ncurses to version 6. I fixed this in r140150. To receive this change, wait 30 minutes, then run "sudo port selfupdate". Then you can "sudo port upgrade outdated" to rebuild minicom.

comment:2 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

No reply from reporter; presumed fixed.

comment:3 Changed 9 years ago by bustamitenator@…

Good Afternoon Ryandesign :)

Thankyou for the feedback , I thought I had responded to the previous comment but obviously I failed, here is the response I posted last time. I did wonder why it was taking a little while to get a response :) my previous post below :-

I think i have understood what you have said , I did run the port clean as per pre-requisites for ticket & have done what you have asked as follows :-

I did not manage to get around to having a go at this util late last night so I ran the sudo port clean pkgconfig & it was the instruction after i was not certain of, i was not sure if you meant to sudo port install pkgconfig or minicom after waiting , so i ran the sudo port install minicom again & still no go. I ran the sudo port clean --all minicom & sudo port clean --all pkgconfig just to make sure all were cleared & then ran the sudo port selfupdate command as suggested , this went fine.. I then ran the sudo port upgrade outdated & this kicked back some errors.. I then ignored those as i do not have any ports installed & then tried to re-install pkgconfig & minicom again but this time all i get is unable to read os.platform.

This is the total output from my screen ( including mistakes - no holds barred ;)

Last login: Wed Sep  9 11:19:10 on ttys002
Jimbo:~ Jimbo$ sudo port clean pkgconfig
Password:
--->  Cleaning pkgconfig
Jimbo:~ Jimbo$ sudo port install minicom
--->  Computing dependencies for minicom
--->  Cleaning minicom
--->  Scanning binaries for linking errors
--->  Found 3 broken files, matching files to ports
--->  Found 1 broken port, determining rebuild order
You can always run 'port rev-upgrade' again to fix errors.
The following ports will be rebuilt: minicom @2.7
Continue? [Y/n]: Y
Error: rev-upgrade failed: can't read "{os.platform}": no such variable
Error: Follow http://guide.macports.org/#project.tickets to report a bug.
Jimbo:~ Jimbo$ sudo port clean --all minicom
--->  Cleaning minicom
Jimbo:~ Jimbo$ sudo port clean --all pkgconfig
--->  Cleaning pkgconfig
Jimbo:~ Jimbo$ sudo port selfupdate
--->  Updating MacPorts base sources using rsync
MacPorts base version 2.3.99 installed,
MacPorts base version 2.3.3 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
Jimbo:~ Jimbo$ sudo port upgrade outdated
can't read "{os.platform}": no such variable
    while executing
"set {{os.platform}}"
    invoked from within
"$workername eval [list set $key]"
    (procedure "_mportkey" line 3)
    invoked from within
"_mportkey $mport {{os.platform}}"
    (procedure "macports::_upgrade" line 287)
    invoked from within
"macports::_upgrade $d $dspec $variationslist [array get options] depscache"
    (procedure "_upgrade_dependencies" line 37)
    invoked from within
"_upgrade_dependencies portinfo depscache variationslist options"
    (procedure "macports::_upgrade" line 78)
    invoked from within
"macports::_upgrade $d $dspec $variationslist [array get options] depscache"
    (procedure "_upgrade_dependencies" line 37)
    invoked from within
"_upgrade_dependencies portinfo depscache variationslist options [expr {$will_build && $already_installed}]"
    (procedure "macports::_upgrade" line 325)
    invoked from within
"macports::_upgrade $portname $dspec $variationslist $optionslist depscache"
    (procedure "macports::upgrade" line 20)
    invoked from within
"macports::upgrade $portname "port:$portname" [array get requested_variations] [array get options] depscache"
    ("uplevel" body line 3)
    invoked from within
"uplevel 1 $block"
    (procedure "foreachport" line 20)
    invoked from within
"foreachport $portlist {
        if {![info exists depscache(port:$portname)]} {
            set status [macports::upgrade $portname "port:$portname" [..."
    (procedure "action_upgrade" line 9)
    invoked from within
"$action_proc $action $portlist [array get global_options]"
    (procedure "process_cmd" line 103)
    invoked from within
"process_cmd $remaining_args"
    invoked from within
"if { [llength $remaining_args] > 0 } {

    # If there are remaining arguments, process those as a command
    set exit_status [process_cmd $remaining..."
    (file "/opt/local/bin/port" line 5610)
Jimbo:~ Jimbo$ sudp port install pkgconfigg 
-bash: sudp: command not found
Jimbo:~ Jimbo$ sudo port install pkgconfig
Password:
Error: Unable to execute port: can't read "{os.platform}": no such variable
Jimbo:~ Jimbo$ sudo port clean --all pkgconfig
--->  Cleaning pkgconfig
Jimbo:~ Jimbo$ sudo port install minicom
Password:
Error: Unable to execute port: can't read "{os.platform}": no such variable
Jimbo:~ Jimbo$

Sorry to be the pain here but i have no issue about posting as much info as possible & including if you wanted a remote session to this device..

Look forward to hearing back from you..

Rgds
Jimbo :)

Last edited 9 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:4 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

MacPorts does seem rather insistent about that "can't read "{os.platform}": no such variable" error. I can't explain that. I don't recall seeing that before.

What ports are outdated at this point? What shows up if you run "port outdated"?

comment:5 Changed 9 years ago by bustamitenator@…

At this point there are no outdated ports to outdated, minicom is the 1st port I am trying to install, my laptop is brand new, I have installed the pre-requisites needed to run macports then once I have installed macports I try to install minicom as my 1st port install & I get the above error.. If you need any more info or even a remote session to it please say so..

Rgds
Jimbo

Last edited 9 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:6 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

I'm not sure what you mean by "1st port I am trying to install". According to the output you've shown, minicom is already installed. But MacPorts thinks it is broken and is trying to rebuild it and is failing to do so. We don't yet understand why MacPorts thinks minicom is broken, nor do we understand why it fails to rebuild it.

Perhaps we would learn more if you ran rev-upgrade with the debug flag. This might produce a lot of output, so let's send that output to a file and compress it, then you can attach that file to this ticket. Try:

sudo port -d rev-upgrade 2>&1 | tee /dev/tty | bzip2 -c > ~/Desktop/rev-upgrade.txt.bz2

Then attach the file rev-upgrade.txt.bz2 from your desktop to this ticket.

comment:7 Changed 9 years ago by bustamitenator@…

Resolution: fixed
Status: closedreopened

comment:8 Changed 9 years ago by bustamitenator@…

Good Afternoon Ryandesign,

Aah ok , maybe i mis-understood the output properly but in overall it is the only port i have tried to install at this point..

I have ran the command you have suggested & attached the relevant file as requested ...

Rgds Jimbo :)

comment:9 Changed 9 years ago by bustamitenator@…

Hmm i cannot see anywhere on how to attach the file you requested !!

comment:10 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Under the ticket description, in the Attachments section, there should be an Attach File button.

Changed 9 years ago by bustamitenator@…

Attachment: rev-upgrade.txt.bz2 added

comment:11 Changed 9 years ago by bustamitenator@…

Cool - thanks for that - file attached..

Rgds Jimbo :)

comment:12 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Component: portsbase
Port: minicom removed
Summary: minicom @2.7 Error: rev-upgrade failed: can't read "{os.platform}": no such variablerev-upgrade failed: can't read "{os.platform}": no such variable
Version: 2.3.32.3.99

I think I've finally realized what the problem is. Some earlier output you posted says:

MacPorts base version 2.3.99 installed,

That means you're running a version of MacPorts trunk, not the released version 2.3.3. And I think the particular problem you're experiencing with {os.platform} not existing was introduced in r140015 on September 6 and fixed in r140050 on September 7. You just got unlucky by building MacPorts trunk during that time. So you should just need to update the Subversion working copy of MacPorts base that you used to install MacPorts trunk originally, and configure and build and install it again, like you did originally.

After you do that, hopefully MacPorts will work properly, and you can then sync properly, which will show you what ports are outdated, and then you can upgrade the outdated ports, which will fix the minicom problem by rebuilding it against ncurses 6.

If you're going to use MacPorts trunk instead of the released version, you have to expect that things will be broken from time to time, and make sure you keep your installation up to date.

comment:13 Changed 9 years ago by bustamitenator@…

Good Evening RyanDesign,

Oh wow , talk about picking my moment to install hah hah..

Thankyou very muchly for taking the time & effort to look into this for me..
I have updated subversion & now i can install minicom & ipcalc perfectly fine :)

Awesome thankyou :)
How do i send you over the proverbial beers for helping & fixing ?

Best Regards
Jimbo :)

comment:14 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: reopenedclosed

No worries, I'm glad you got it working!

Last edited 9 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)
Note: See TracTickets for help on using tickets.