composer / composer/satis

Gitlab zip dist download using token with "rearchive: false"

Open
#578 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
PHP
Stars
3.3k
Forks
530
Avg merge
6h 53m
Merged PRs (30d)
13

Description

**Describe the bug**
For repository "type:gitlab".
[Satisfy](https://github.com/ludofleury/satisfy/issues/116) is not working with "rearchive:false" option in "archive" section=download existing archive.

**To Reproduce**
Create satis.json with :
`
"repositories": [
{
"type": "gitlab",
"url": "http://mygitlabrep/test/test.git",
"installation-source": "dist"
},
...
],
"archive": {
"format": "zip",
"rearchive": false,
...
"checksum": true
}
`
execute:
`
./bin/satis build satis.json web --no-ansi --verbose --repository-url=http://mygitlabrep/test/test.git --repository-strict
`

**Outcome**
``In Filesystem.php line 286:

[ErrorException]
copy(/tmp/composer_archiver5de50e72b0140/archive.zip?sha=686b4b3598e5314db0a5757590f0282413e02b41): failed to open stream: No such file or directory

Exception trace:
at /var/www/satisfy/vendor/composer/composer/src/Composer/Util/Filesystem.php:286
Composer\Util\ErrorHandler::handle() at n/a:n/a
copy() at /var/www/satisfy/vendor/composer/composer/src/Composer/Util/Filesystem.php:286
Composer\Util\Filesystem->copy() at /var/www/satisfy/vendor/composer/composer/src/Composer/Util/Filesystem.php:266
Composer\Util\Filesystem->copyThenRemove() at /var/www/satisfy/vendor/composer/composer/src/Composer/Util/Filesystem.php:343
Composer\Util\Filesystem->rename() at /var/www/satisfy/vendor/composer/satis/src/Builder/ArchiveBuilder.php:258
Composer\Satis\Builder\ArchiveBuilder->archive() at /var/www/satisfy/vendor/composer/satis/src/Builder/ArchiveBuilder.php:139
Composer\Satis\Builder\ArchiveBuilder->dump() at /var/www/satisfy/vendor/composer/satis/src/Console/Command/BuildCommand.php:195
Composer\Satis\Console\Command\BuildCommand->execute() at /var/www/satisfy/vendor/symfony/console/Command/Command.php:255
Symfony\Component\Console\Command\Command->run() at /var/www/satisfy/vendor/symfony/console/Application.php:934
Symfony\Component\Console\Application->doRunCommand() at /var/www/satisfy/vendor/symfony/console/Application.php:273
Symfony\Component\Console\Application->doRun() at /var/www/satisfy/vendor/composer/satis/src/Console/Application.php:56
Composer\Satis\Console\Application->doRun() at /var/www/satisfy/vendor/symfony/console/Application.php:149
Symfony\Component\Console\Application->run() at /var/www/satisfy/vendor/composer/satis/bin/satis:26`

**Expected behavior**
Archive for gitlab repository downloaded and stored in "dist" directory.

**Additional context**
There's no "archive.zip?sha=686b4b3598e5314db0a5757590f0282413e02b41" in directory, for corresponding commit, but it has simple "/tmp/composer_archiver5de50e72b0140/archive.zip" file.
So, question is-why satis tries to create file with name including hash it downloaded from.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.