#12306 closed defect (fixed)
BUG: "variant foo bar { ... }" constructs fail at package archival time
Reported by: | jmpalacios (Juan Manuel Palacios) | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | MacPorts 2.4.0 |
Component: | base | Version: | 1.5.0 |
Keywords: | Cc: | cooljeanius (Eric Gallager) | |
Port: |
Description
Listing two variant names in a single line in order to define a common code block for both causes the archival stage to fail:
archiving port+foo bar.<platform>.<archiveformat> bar.<platform>.<archiveformat>: no such file or directory
Archive creation code is failing to add the second variant to the archive file name and adding a space instead, causing a no such file or directory error. We should either fix this or refuse such constructs, in view of the variant descriptions feature introduced recently (don't know if two variants on a single line plays well with variant descriptions, haven't checked).
-jmpp
Change History (12)
comment:1 Changed 17 years ago by jmpalacios (Juan Manuel Palacios)
Priority: | Expected → Important |
---|---|
severity: | Normal → Serious |
comment:2 Changed 17 years ago by jmpalacios (Juan Manuel Palacios)
Some investigation reveals MacPorts chokes when spaces are inserted in the receipts directory:
$[juan @macbookpro: cyrus-sasl2](337/0,0) -> sudo rm -rf /opt/local/var/macports/receipts/cyrus-sasl2 $[juan @macbookpro: cyrus-sasl2](338/0,0) -> port installed The following ports are currently installed: apr @1.2.8_0 (active) apr-util @1.2.8_2+no_bdb+no_sqlite (active) autoconf @2.61_0 (active) bash-completion @20060301_0 (active) ---snip--- $[juan @macbookpro: cyrus-sasl2](343/1,0) -> sudo mkdir -p /opt/local/var/macports/receipts/foo/1\+foo\ bar $[juan @macbookpro: cyrus-sasl2](345/0,0) -> ls /opt/local/var/macports/receipts/foo/ total 0 drwxr-xr-x 2 root admin 68B Jul 16 15:33 1+foo bar/ $[juan @macbookpro: cyrus-sasl2](346/0,0) -> port installed Error: port installed failed: Registry error: foo @2.0.1_0 not registered as installed. No ports are installed. $[juan @macbookpro: cyrus-sasl2](347/1,0) -> sudo rm -rf /opt/local/var/macports/receipts/foo $[juan @macbookpro: cyrus-sasl2](348/0,0) -> port installed The following ports are currently installed: apr @1.2.8_0 (active) apr-util @1.2.8_2+no_bdb+no_sqlite (active) ---snip---
The installed command does not escape the space and returns with a foo @1+foo
string, which is naturally not recorded as installed (the full string should have been "foo @1+foo+bar
", supressing the space). My mistake to have used foo
for both the example port and variant names, but that's orthogonal. In any case, the bug seems to be in full installation name construction (portname plus version plus revision plus all variants), which is either not escaping the space too or not supressing it in the first place, as I believe it should be done (was it like that before this bug cropped up?).
-jmpp
comment:3 Changed 17 years ago by jmpalacios (Juan Manuel Palacios)
Milestone: | Needs developer review → MacPorts base bugs |
---|
Milestone Needs developer review deleted
comment:4 Changed 17 years ago by nox@…
Priority: | Important → High |
---|---|
Summary: | "variant foo bar { ... }" constructs fail at package archival time → BUG: "variant foo bar { ... }" constructs fail at package archival time |
comment:5 Changed 16 years ago by tobypeterson
Milestone: | MacPorts base bugs → MacPorts Future |
---|
Milestone MacPorts base bugs deleted
comment:6 follow-up: 8 Changed 12 years ago by cooljeanius (Eric Gallager)
Does this still happen? Base has changed since this ticket was opened...
comment:8 Changed 12 years ago by larryv (Lawrence Velázquez)
Cc: | jmpp@… removed |
---|---|
Keywords: | archivemode double variants removed |
Replying to egall@…:
Does this still happen? Base has changed since this ticket was opened...
The Guide doesn’t even suggest variant foo bar
as a valid portfile construct, although base still allows it. Do any portfiles even do this?
comment:9 Changed 10 years ago by mf2k (Frank Schima)
Priority: | High → Normal |
---|
comment:10 Changed 10 years ago by mf2k (Frank Schima)
Owner: | changed from jmpp@… to macports-tickets@… |
---|
jmpp is no longer active. See #44809.
comment:11 Changed 8 years ago by raimue (Rainer Müller)
Resolution: | → fixed |
---|---|
Status: | new → closed |
A Portfile with
variant foo bar { ... }
will lead to
Can't map the URL 'file://.' to a port description file ("Variant name foo bar contains invalid characters").
comment:12 Changed 8 years ago by jmroot (Joshua Root)
Milestone: | MacPorts Future → MacPorts 2.4.0 |
---|
It seems like this is a serious bug, installing ports with this variant constructs apparently messes up the registry:
This when attempting a port installation off the old Portfile. But I also cancelled a port call somewhere along the line (don't recall if it was a destooring or an installation) so my registry might have broken because of that too. In any case, bumping this bug up to higher priority/severity just in case.
-jmpp