On a clean macports install, I receive "can't read "prefix": no such variable"
OS: High Sierra (up to date)
Macports: clean install
port -v selfupdate
---> Updating MacPorts base sources using rsync
Willkommen auf dem RSYNC-server auf ftp.fau.de.
Nicht all unsere Mirror sind per rsync verfuegbar.
Welcome to the RSYNC daemon on ftp.fau.de.
Not all of our mirrors are available through rsync.
receiving file list ... done
sent 16 bytes received 55 bytes 28.40 bytes/sec
total size is 85608960 speedup is 1205760.00
Willkommen auf dem RSYNC-server auf ftp.fau.de.
Nicht all unsere Mirror sind per rsync verfuegbar.
Welcome to the RSYNC daemon on ftp.fau.de.
Not all of our mirrors are available through rsync.
receiving file list ... done
sent 16 bytes received 62 bytes 52.00 bytes/sec
total size is 512 speedup is 6.56
MacPorts base version 2.5.4 installed,
MacPorts base version 2.5.4 downloaded.
---> Updating the ports tree
Synchronizing local ports tree from rsync://rsync.macports.org/macports/release/tarballs/ports.tar
Willkommen auf dem RSYNC-server auf ftp.fau.de.
Nicht all unsere Mirror sind per rsync verfuegbar.
Welcome to the RSYNC daemon on ftp.fau.de.
Not all of our mirrors are available through rsync.
receiving file list ... done
./
sent 68 bytes received 99 bytes 66.80 bytes/sec
total size is 69404160 speedup is 415593.77
Creating port index in /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports
Failed to parse file archivers/xz/Portfile: can't read "prefix": no such variable
Failed to parse file databases/db48/Portfile: can't read "prefix": no such variable
Adding port databases/dbeaver-community
Failed to parse file databases/gdbm/Portfile: can't read "prefix": no such variable
Failed to parse file databases/sqlite3/Portfile: can't read "prefix": no such variable
Failed to parse file devel/gettext/Portfile: can't read "prefix": no such variable
Failed to parse file devel/gperf/Portfile: can't read "prefix": no such variable
Failed to parse file devel/icu/Portfile: can't read "prefix": no such variable
Failed to parse file devel/libedit/Portfile: can't read "prefix": no such variable
Failed to parse file devel/ncurses/Portfile: can't read "prefix": no such variable
Failed to parse file devel/pkgconfig/Portfile: can't read "prefix": no such variable
Failed to parse file devel/readline/Portfile: can't read "prefix": no such variable
Failed to parse file lang/perl5/Portfile: can't read "prefix": no such variable
Failed to parse file lang/python27/Portfile: can't read "prefix": no such variable
Adding port security/xca
Failed to parse file textproc/libiconv/Portfile: can't read "prefix": no such variable
Failed to parse file textproc/libxml2/Portfile: can't read "prefix": no such variable
Total number of ports parsed: 17
Ports successfully parsed: 2
Ports failed: 15
Up-to-date ports skipped: 21690
---> MacPorts base is already the latest version
The ports tree has been updated. To upgrade your installed ports, you should run
port upgrade outdated
jbw-macbook-pro:~# port upgrade outdated
Nothing to upgrade.
jbw-macbook-pro:~# port install bash
---> Computing dependencies for bash
Error: Dependency 'gettext' not found.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port bash failed
jbw-macbook-pro:~# port install gettext
Error: Port gettext not found
jbw-macbook-pro:~# port install gettext
I got the same bug using "port -d sync"
The bug was fixed around 13:29 UTC today in the Git repository. If you wait an hour or two it will probably appear on the RSync servers, but I don't know how fast the rsync updating process takes.