Skip to content

Partial Update fails for artifact repository package #983

@ymilin

Description

@ymilin

Describe the bug
After updating satis to current dev-main from 1.X, the partial update for packages hosted in an artifact repository doesn't work anymore.

The command returns the following error:

php bin/satis build satis.json web/ this/package
Scanning packages

In PackageSelection.php line 224:

  Could not find any repositories config with "name" matching your package(s) filter: this/package


build [--repository-url REPOSITORY-URL] [--repository-strict] [--no-html-output] [--skip-errors] [--stats] [--minify] [--] [<file> [<output-dir> [<packages>...]]]

To Reproduce

{
  "require": {
    "this/package": "*"
  },
  "repositories": [
    {
      "type": "artifact",
      "url": "/path/to/directory/with/zips"
    }
  ]
}

Outcome

php bin/satis -vvv build satis.json web/ this/package
Running 2.8.6 (2025-02-25 13:03:50) with PHP 8.2.28 on Linux / 6.1.0-32-amd64
Failed to initialize global composer: Composer could not find the config file: /home/satis/.config/composer/composer.json
To initialize a project, please create a composer.json file. See https://getcomposer.org/basic-usage
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
Executing command (/home/satis): 'git' 'branch' '-a' '--no-color' '--no-abbrev' '-v'
Executing command (/home/satis): 'git' 'describe' '--exact-match' '--tags'
Executing command (CWD): 'git' '--version'
Executing command (/home/satis): 'git' 'log' '--pretty=%H' '-n1' 'HEAD' '--no-show-signature'
Executing command (/home/satis): 'hg' 'branch'
Executing command (/home/satis): 'fossil' 'branch' 'list'
Executing command (/home/satis): 'fossil' 'tag' 'list'
Executing command (/home/satis): 'svn' 'info' '--xml'
Composer could not detect the root package (foocorp/packagist) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version
Failed to initialize global composer: Composer could not find the config file: /home/satis/.config/composer/composer.json

Executing command (/home/satis): 'git' 'branch' '-a' '--no-color' '--no-abbrev' '-v'
Executing command (/home/satis): 'git' 'describe' '--exact-match' '--tags'
Executing command (/home/satis): 'git' 'log' '--pretty=%H' '-n1' 'HEAD' '--no-show-signature'
Executing command (/home/satis): 'hg' 'branch'
Executing command (/home/satis): 'fossil' 'branch' 'list'
Executing command (/home/satis): 'fossil' 'tag' 'list'
Executing command (/home/satis): 'svn' 'info' '--xml'
Scanning packages

In PackageSelection.php line 224:

  [InvalidArgumentException]
  Could not find any repositories config with "name" matching your package(s) filter: this/package


Exception trace:
  at /var/www/satis/lib/src/PackageSelection/PackageSelection.php:224
 Composer\Satis\PackageSelection\PackageSelection->select() at /var/www/satis/lib/src/Console/Command/BuildCommand.php:240
 Composer\Satis\Console\Command\BuildCommand->execute() at /var/www/satis/lib/vendor/symfony/console/Command/Command.php:279
 Symfony\Component\Console\Command\Command->run() at /var/www/satis/lib/vendor/symfony/console/Application.php:1076
 Symfony\Component\Console\Application->doRunCommand() at /var/www/satis/lib/vendor/symfony/console/Application.php:342
 Symfony\Component\Console\Application->doRun() at /var/www/satis/lib/vendor/composer/composer/src/Composer/Console/Application.php:397
 Composer\Console\Application->doRun() at /var/www/satis/lib/src/Console/Application.php:62
 Composer\Satis\Console\Application->doRun() at /var/www/satis/lib/vendor/symfony/console/Application.php:193
 Symfony\Component\Console\Application->run() at /var/www/satis/lib/vendor/composer/composer/src/Composer/Console/Application.php:137
 Composer\Console\Application->run() at /var/www/satis/lib/bin/satis:71

build [--repository-url REPOSITORY-URL] [--repository-strict] [--no-html-output] [--skip-errors] [--stats] [--minify] [--] [<file> [<output-dir> [<packages>...]]]

Expected behavior
With satis 1, it used to work and the build command would detect the new package version and update its index, effectively making the full process ~20sec, compared to a full update taking >2min with my current configuration.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions