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

PHP configuration directory along versions leads to problems #1185

Closed
rrelmy opened this issue Jan 1, 2017 · 2 comments
Closed

PHP configuration directory along versions leads to problems #1185

rrelmy opened this issue Jan 1, 2017 · 2 comments
Assignees

Comments

@rrelmy
Copy link
Collaborator

rrelmy commented Jan 1, 2017

The PHP_INI_SCAN_DIR env is very useful but the current path leads to problems.
The conf directory is placed along with the version directories inside scoop/apps/php

Scoop picks conf as the latest version and also updates from conf to $latest even if $latest is already installed.

$ scoop list
Installed apps:

  php (conf)
$ scoop update php
updating php (conf -> 7.1.0)
uninstalling php (conf)
installing php (7.1.0)
creating shim for php
creating shim for php-cgi
running post-install script...
php was updated from conf to 7.1.0

I would suggest creating a separate directory conf along apps, cache, shims for such version independent configurations. For the php example it would be scoop/conf/php/ and the env_set would be set to following (or we define a $config_dir variable)

"env_set": {
    "PHP_INI_SCAN_DIR": "$dir\\..\\..\\..\\conf\\php"
},

This will break current php installations!

A dirty workaround could be filtering conf as version inside the versions function from lib/versions.ps1

@lukesampson
Copy link
Member

Yes, I agree ~/scoop/conf/php would be a better location.

And it would also be good to allow $conf_dir in the env_set. I prefer $conf_dir to $config_dir for consistency, and to avoid confusion with scoop config.

Maybe we could add a post_install script to php.json to look for ~/scoop/apps/php/conf, and move it to ~/scoop/conf/php if it exists?

Are you happy to submit a PR for all these?

@rrelmy
Copy link
Collaborator Author

rrelmy commented Jan 2, 2017

Yes, I will look into that

@rrelmy rrelmy self-assigned this Mar 25, 2017
@rrelmy rrelmy mentioned this issue Mar 26, 2017
rrelmy added a commit to rrelmy/scoop that referenced this issue Mar 30, 2017
…t found

If the old manifest is not available no $architecture is loaded
resulting in an error while installing the update.

This happend for example for php if there was a conf directory along the
versions. `conf` will be picked up as latest version but there is no
manifest inside. ScoopInstaller#1185
@r15ch13 r15ch13 closed this as completed May 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants