drupal-composer / drupal-packagist

:package: Drupal Packagist server to automatically build package information from projects on drupal.org
http://packagist.drupal-composer.org
28 stars 4 forks source link

Composer replace #36

Closed albertvolkman closed 7 years ago

albertvolkman commented 9 years ago

When attempting to add this package to my project-

https://packagist.drupal-composer.org/packages/drupal/grammar_parser_lib

It attempts to install the library listed in the "replace" section, gplib. This fails. Is there something I need to do differently to add this package? Or is this a bug?

derhasi commented 9 years ago

The replace section only makes sure, the module "glib" is not installed from another source. For example it could be a metapackage (see #15).

It attempts to install the library listed in the "replace" section, gplib.

Packages in "replace" will (or at least should) not be installed. Can you clarify where it tries to do so? (Maybe a screenshot?)

albertvolkman commented 9 years ago

I'm trying to do a Drupal build for our internal API. Here's my current working composer.json-

{
    "repositories": [
        {
            "type": "composer",
            "url": "https://packagist.drupal-composer.org"
        }
    ],
    "minimum-stability": "dev",
    "require": {
        "davidbarratt/custom-installer": "dev-master",
        "derhasi/composer-preserve-paths": "0.1.*",
        "drupal/drupal": "7.*",
        "drupal/composer_vendor": "7.1.*",
        "drupal/ctools": "7.1.*",
        "drupal/devel": "7.1.*",
        "drupal/grammar_parser": "7.2.*",
        "drupal/grammar_parser_lib": "7.2.1",
        "drupal/libraries": "7.2.*@dev",
        "drupal/views": "7.3.*"
    },
    "scripts": {
        "post-create-project-cmd": [
            "rm README.md LICENSE"
        ]
    },
    "config": {
        "vendor-dir": "htdocs/sites/all/vendor"
    },
    "extra": {
        "custom-installer": {
            "drupal-module": "htdocs/sites/all/modules/contrib/{$name}/",
            "drupal-theme": "htdocs/sites/all/themes/contrib/{$name}/",
            "drupal-library": "htdocs/sites/all/libraries/{$name}/",
            "drupal-drush": "htdocs/sites/all/drush/{$name}/",
            "drupal-profile": "htdocs/profiles/{$name}/",
            "drupal-core": "htdocs/"
        },
        "preserve-paths": [
            "htdocs/sites/all/modules/contrib",
            "htdocs/sites/all/themes/contrib",
            "htdocs/sites/all/libraries",
            "htdocs/sites/all/drush",
            "htdocs/sites/all/vendor",
            "htdocs/sites/default/settings.php",
            "htdocs/sites/default/files"
        ]
    }
}

My issues are 2 fold-

  1. The required module grammar_parser_lib fails to download in this manner.
  2. This module is actually supposed to be placed in the libraries directory... is there an easy way to see the composer.json that's created for each module? I'm wondering if this module's project type is set correctly.