Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] 404 error when package version is dev-master #421

Closed
slappyslap opened this issue Feb 26, 2021 · 1 comment · Fixed by #422
Closed

[BUG] 404 error when package version is dev-master #421

slappyslap opened this issue Feb 26, 2021 · 1 comment · Fixed by #422
Labels
bug Something isn't working

Comments

@slappyslap
Copy link
Contributor

slappyslap commented Feb 26, 2021

Configuration

Repman => 1.2.1
Private gitlab => 13.2.2
php => 7.4
composer => 2.0.9

The bug

We have a private package hosted in a self-host Gitlab (myvendor/mypackage for example)
When we run : composer require myvendor/mypackage:dev-master
Composer tries to retrieve the dist package from Repman via this URL :
https://organization.repo.repman.domain.com/dists/myvendor/mypackage/dev-master/XXXXXX.zip (where XXXXXX is the commit hash)

Repman answers with a 404 error. After some investigations, we found that Repman is looking for a zip file with this path :
/var/www/repman/shared/var/repo/organization/dist/myvendor/mypackage/dev-master_XXXXXX.zip
but in reality only this file exists :
/var/www/repman/shared/var/repo/organization/dist/myvendor/mypackage/9999999-dev_XXXXXX.zip

It seems related to a Composer issue :
[2.0][RFC] Stop normalizing dev-master as 9999999-dev

We add in Service/Dist.php => version() a condition to translate dev-master to 999999-dev.

Is this condition the better solution or it needs to be corrected in an another function ?

@akondas
Copy link
Member

akondas commented Mar 1, 2021

Thanks for reporting. I would love to see the pull request with changes. From this description it appears that your approach should be correct.

@akondas akondas added the bug Something isn't working label Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants