Congratulations to all the selected GSOC students and projects

Clemens Lang cal at macports.org
Mon May 8 19:57:04 UTC 2017


Hi,

On Mon, May 08, 2017 at 04:02:55PM +0000, Zero King wrote:
> > Please read our guidelines we put together here:
> >  http://trac.macports.org/wiki/SummerOfCodeGuidelines
> 
> Subversion -> Git ;)

Thanks, fixed.

> My work will be done in github.com/macports-staging first and then
> deployed to github.com/macports.

That sounds reasonable given the nature of your project.

> I'm trying to install MacPorts on Travis VMs. I want to avoid syncing
> the ports tree to save more time for actual testing. Since the .pkg
> installer would automatically call `port -v selfupdate` I've modified
> .travis.yml in base to produce an archive of /opt/local after
> executing `sudo port install`. To create the "macports" user I also
> added the postflight script into the archive at
> https://github.com/macports-staging/macports-base/releases. After
> extracting the archive, patching conf files and running postflight, I
> tried to install getopt for mpbb but that failed with
> 
> Error: Updating database of binaries failed
> Error: rev-upgrade failed: can't read "env(COLUMNS)": no such variable
> Error: Follow https://guide.macports.org/#project.tickets to report a bug.

I think this happens because MacPorts for some reason thinks stdout is
connected to a terminal, but ioctl(STDOUT_FILENO, TIOCGWINSZ) does not
return useful sizes and the environment variables COLUMNS and LINES are
not set either.

You can probably work around the problem by either setting COLUMNS and
LINES, or providing the -v flag to enable verbose output and disable
progress bars (which trigger this code path).

If you want, you can also modify the progress bar drawing code in
portclient::progress::generic and portclient::progress::download for the
case where $env(COLUMNS) is not available to fix the problem.


> Please help. Even though I could just install the .pkg but using
> archives allows me to deploy it on Linux too so we could use a
> different CI for lint tests and only test PRs on Travis.

A MacPorts installation contains binaries that will very likely not run
on Linux like this (unless you also want to build a copy of MacPorts for
Linux on a Linux buildmachine, which is possible if the right
dependencies are installed).

-- 
Clemens


More information about the macports-dev mailing list