[MacPorts] #53532: MacPorts 2.4 :: installation from URL bz2 file failing
MacPorts
noreply at macports.org
Fri Feb 10 12:04:33 UTC 2017
#53532: MacPorts 2.4 :: installation from URL bz2 file failing
------------------------------------------------+-------------------
Reporter: JohnPritchard | Owner:
Type: defect | Status: new
Priority: Normal | Milestone:
Component: base | Version: 2.4.0
Keywords: source installation via remote URL | Port:
------------------------------------------------+-------------------
First and foremost, apologies if this is repeating another ticket, but I
have searched and can not find anything relevant.
I am not certain exactly when this problem started but I believe it was
with Macports 2.4.
My system: Mac OS Sierra, 10.12.3, Xcode 8.2.1, Macports 2.4.0, in more
detail:
{{{
$ uname -a
Darwin ma018012.ads.eso.org 16.4.0 Darwin Kernel Version 16.4.0: Thu Dec
22 22:53:21 PST 2016; root:xnu-3789.41.3~3/RELEASE_X86_64 x86_64
$ port version
Version: 2.4.0
$ xcodebuild -version
Xcode 8.2.1
Build version 8C1002
}}}
I used to be able, prior to version 2.4 of MacPorts, to install a port
with the following command:
{{{
$ sudo port install ftp://ftp.eso.org/pub/usg/fposs/P99/macports/flames-
fposs.bz2
}}}
Where the contents of the file flames-fposs.bz2 are simply:
{{{
$ tar -tf flames-fposs.bz2
flames-fposs/Portfile
}}}
But since version 2.4, I get the following error when attempting to
install a port via a specified URL:
{{{
$ sudo port install ftp://ftp.eso.org/pub/usg/fposs/P99/macports/flames-
fposs.bz2
---> Fetching port ftp://ftp.eso.org/pub/usg/fposs/P99/macports/flames-
fposs.bz2
Can't map the URL 'ftp://ftp.eso.org/pub/usg/fposs/P99/macports/flames-
fposs.bz2' to a port description file ("couldn't change working directory
to "/opt/local/var/macports/portdirs/flames-fposs": no such file or
directory").
Please verify that the directory and portfile syntax are correct.
Error: Can't open URL 'ftp://ftp.eso.org/pub/usg/fposs/P99/macports
/flames-fposs.bz2' as a port
Error: Improper expression syntax while processing parameters
}}}
If I manually extract the file into /opt/local/var/macports/portdirs/ then
it works:
{{{
$ ftp ftp://ftp.eso.org/pub/usg/fposs/P99/macports/flames-fposs.bz2
$ sudo tar -C /opt/local/var/macports/portdirs/ -xvf flames-fposs.bz2
x flames-fposs/Portfile
$ sudo port install ftp://ftp.eso.org/pub/usg/fposs/P99/macports/flames-
fposs.bz2
---> Fetching port ftp://ftp.eso.org/pub/usg/fposs/P99/macports/flames-
fposs.bz2
---> Computing dependencies for flames-fposs
---> Cleaning flames-fposs
---> Scanning binaries for linking errors
---> No broken files found.
}}}
This has the problem that if a previous version of this port was installed
(e.g. ftp://ftp.eso.org/pub/usg/fposs/P98/macports/flames-fposs.bz2), and
thus the older version of the Portfile already exists in
/opt/local/var/macports/portdirs/flames-fposs, then the older version gets
installed rather than the newer one.
So it seems that:
1) for extraction, MacPorts is assuming that all ports specified as remote
URLs are binary packages, and this it is not handling correctly Portfile
distribution via this mechanism
2) It is nonetheless still handling "correctly" processing the Portfile if
it happens to already exist, or if the user "manually installs" it into
/opt/local/var/macports/portdirs/.
Is is a bug? Or a new feature?
Many thanks in advance.
Cheers
John Pritchard
P.S. Yes I know I should just put this package in a proper repository
somewhere, that's coming, but it's... complicated...
--
Ticket URL: <https://trac.macports.org/ticket/53532>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list