composer validate can't find spdx-licenses.json

Bug #1595289 reported by Pierre Rudloff
46
This bug affects 10 people
Affects Status Importance Assigned to Milestone
composer
New
Undecided
Unassigned
composer (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

composer validate crashes with this error:
file_get_contents(/usr/share/php/Composer/../../data/Composer/res/spdx-licenses.json): failed to open stream: No such file or directory

The correct path seems to be /usr/share/php/data/Composer/res/spdx-licenses.json.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: composer 1.0.0~beta2-1
ProcVersionSignature: Ubuntu 4.4.0-24.43-generic 4.4.10
Uname: Linux 4.4.0-24-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
CurrentDesktop: XFCE
Date: Wed Jun 22 20:15:27 2016
InstallationDate: Installed on 2014-05-30 (754 days ago)
InstallationMedia: Mythbuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417)
PackageArchitecture: all
SourcePackage: composer
UpgradeStatus: Upgraded to xenial on 2016-06-01 (21 days ago)

Revision history for this message
Pierre Rudloff (rudloff) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in composer (Ubuntu):
status: New → Confirmed
Changed in composer (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Sam Wilson (samwilson.id.au) wrote :

Is there a workaround for this?

Revision history for this message
abel (duhl) wrote :

a workaround until this is fixed:

cd /usr/share
sudo ln -s /usr/share/php/data data

Revision history for this message
pwaring (launchpad-pwaring) wrote :

Confirmed that this still definitely fails in a clean 16.04 VM. Other composer commands work fine.

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

Reproducing this on a clean xenial installation:

# apt install -y composer
# cat <<EOF > composer.json
{
 "name": "foo/bar",
 "description": "foo",
 "license": "GPL-3.0-or-later"
}
EOF
# composer validate

returns:

  [ErrorException]
  file_get_contents(/usr/share/php/Composer/../../data/Composer/res/spdx-licenses.json): failed to open stream: No such file or directory

However, from bionic and on, we get:

./composer.json is valid

Hence, this seems to be fixed since bionic.

Since xenial is no longer under standard support, I am closing this as fixed.

Changed in composer (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.