vtsykun/packeton

Composer mirror wrong dist URL

Closed this issue · 1 comments

Description

Hi, I'm trying to setup a mirror for Laravel Nova.
But Packeton is using the wrong json for the package:

Installs: laravel/nova:4.23.0
  - Downloading laravel/nova (4.23.0)
Downloading https://<packeton>/mirror/nova/zipball/laravel/nova/4.23.0.0/ref6a14d83663f0484889a7f73ffaed7262bba7a26a.zip
[404] https://<packeton>/mirror/nova/zipball/laravel/nova/4.23.0.0/ref6a14d83663f0484889a7f73ffaed7262bba7a26a.zip
    Failed downloading laravel/nova: [Composer\Downloader\TransportException] 404: The "https://<packeton>/mirror/nova/zipball/laravel/nova/4.23.0.0/ref6a14d83663f0484889a7f73ffaed7262bba7a26a.zip" file could not be downloaded (HTTP/2 404 ):
{"status":404,"detail":"Unable to download dist from source. The \"https://api.github.com/repos/laravel/nova/zipball/6a14d83663f0484889a7f73ffaed7262bba7a26a\" file could not be downloaded (HTTP/2 404...
    Trying the next URL for laravel/nova
  - Downloading laravel/nova (4.23.0)
Using HTTP basic authentication with username "<username>"
Downloading https://nova.laravel.com/dist/laravel/nova/laravel-nova-6a14d83663f0484889a7f73ffaed7262bba7a26a-zip-1df780.zip
[200] https://nova.laravel.com/dist/laravel/nova/laravel-nova-6a14d83663f0484889a7f73ffaed7262bba7a26a-zip-1df780.zip

It tries to download https://api.github.com/repos/laravel/nova/zipball/6a14d83663f0484889a7f73ffaed7262bba7a26a

which exists here: https://nova.laravel.com/p2/laravel/nova~dev.json
But the correct one is here: https://nova.laravel.com/p2/laravel/nova.json:
https://nova.laravel.com/dist/laravel/nova/laravel-nova-6a14d83663f0484889a7f73ffaed7262bba7a26a-zip-1df780.zip

Output of sync:mirrors

bin/console packagist:sync:mirrors nova -vvv


 [INFO] Start sync: https://nova.laravel.com


Loading root file packages.json
Checked CA file /etc/pki/tls/certs/ca-bundle.crt does not exist or it is not a file.
Checked directory /etc/pki/tls/certs/ca-bundle.crt does not exist or it is not a directory.
Checked CA file /etc/ssl/certs/ca-certificates.crt: valid
Downloading https://nova.laravel.com/packages.json
[200] https://nova.laravel.com/packages.json
Downloading https://nova.laravel.com/p2/laravel/nova.json if modified
Downloading https://nova.laravel.com/p2/laravel/nova~dev.json if modified
[200] https://nova.laravel.com/p2/laravel/nova.json
[200] https://nova.laravel.com/p2/laravel/nova~dev.json
Updated packages: 1

Is there a way to ignore the dev json?

Can you reproduce the bug on the Packeton demo site?

Not applicable

Database

MySQL

Screenshots

No response

How are you running Packeton?

php-fpm, nginx

Fixed in master