satis icon indicating copy to clipboard operation
satis copied to clipboard

with require-all satis will include repositories from ~/.composer/config.json..

Open ppetermann opened this issue 11 years ago • 10 comments

I just run satis on a satis.json file which looks similar to this:

{
    "name": "My Repository",
    "homepage": "https://satis.somehost.com",
    "repositories": [
        { "type": "vcs", "url": "git@myowngit1host" }
    ],
    "require-all": true,
    "output-dir": "/tmp/satis-output"
}

as it turns out, satis included all packages from "git@myowngit2host" - which is only configured and referenced in my ~/.composer/config.json

i would have expected satis to stick to the repositories that are referenced in the satis.json config?

ppetermann avatar Dec 09 '14 15:12 ppetermann

Yet another satis bug https://toranproxy.com doesn't have, in case you're interested in moving over.. Less time spent here and more time spent on composer is always a win :p

As a workaround I guess you can override COMPOSER_HOME when running satis so it doesn't load the global config..

Seldaek avatar Dec 09 '14 15:12 Seldaek

I am also having this issue and having a look into it to see what I can come up with. What is odd is that I can reproduce it on my package server that currently runs php 5.3, while on my dev machine I am unable to reproduce it, running PHP 5.5.

@ppetermann What version of PHP are you running? I am going to try updating PHP on my server and see if that makes any difference.

Also setting my COMPOSER_HOME before running does not make any difference, in both my cases both are set as blank by default anyway.

emlynwest avatar Jan 15 '15 10:01 emlynwest

After updating to PHP 5.5 and making sure my composer is up to date the problem seems to have gone away, I am now no longer seeing the satis repo listed with my packages on my package server.

@ppetermann, I'd recommend making sure everything is up to date and then trying again.

emlynwest avatar Jan 15 '15 12:01 emlynwest

Nope, been on 5.5 then, and am on 5.5 now.

ppetermann avatar Jan 15 '15 18:01 ppetermann

No, you are right. I am not quite sure what is going on. When I run the update manually the the satis repo gets included from the cache but running as a script via a git hook works fine so I now wonder what the difference in environment is there, I don't know enough about satis/composer to say.

emlynwest avatar Jan 15 '15 19:01 emlynwest

Just a guess, but isn't your hook maybe in a repo owned by a different user? Like on most setups that would be "git"?

ppetermann avatar Jan 15 '15 20:01 ppetermann

Yes, it does run under a different user but I also installed satis with that user and there is also a composer cache with the user as well.

emlynwest avatar Jan 15 '15 20:01 emlynwest

Does it have the same configuration too? It's the configured private repo that's the cause, not the cache

ppetermann avatar Jan 15 '15 20:01 ppetermann

Yep, the exact same.

emlynwest avatar Jan 15 '15 20:01 emlynwest

I encountered this issue today, and managed to solve it by running satis like this:

export COMPOSER_HOME=$(pwd); ./path/to/bin/satis build satis.json web

Obviously, you can replace $(pwd) with anything that's not ~/.composer.

glynnforrest avatar Jul 10 '15 18:07 glynnforrest