Comments

ericrdb’s picture

Category: Bug report » Feature request
Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new1.16 KB

This patch installs drush-master alongside the already installed stable drush.

Example using drush-master, note the new alias "drush-master"

$ drush-master dl drupal-8.x-dev --drupal-project-rename="test_site"
$ drush-master @test_site si standard
danylevskyi’s picture

Wow, it's really great patch.
I am curious is it possible to use drush-master with Drupal 7 or Drupal 6 sites?

ericrdb’s picture

Hey, glad you like the patch! Yes, this works with both D7 and D6 sites.

Installing Drupal6 seems to require the explicit "--db-url" argument. At least, it worked only when I did that, which I got from reading #1569832: Can't install Drupal and #1652094: Site-install fails for Drupal 6 sites.

vagrant@precise32:/var/www$ drush-master dl drupal-6 --drupal-project-rename="drupal6"
Project drupal (6.30) downloaded to /var/www/drupal6.                                                                [success]
Project drupal contains:                                                                                             [success]
 - 1 profile: default
 - 6 themes: pushbutton, minnelli, garland, marvin, chameleon, bluemarine
 - 33 modules: user, upload, update, trigger, translation, tracker, throttle, taxonomy, system, syslog, statistics,
search, profile, poll, ping, php, path, openid, node, menu, locale, help, forum, filter, dblog, contact, comment,
color, book, blogapi, blog, block, aggregator

vagrant@precise32:/var/www$ cd drupal6
vagrant@precise32:/var/www/drupal6$ drush-master si --db-url=mysql://root:root@localhost/drupal6 --yes
You are about to create a /var/www/drupal6/sites/default/settings.php file and DROP all tables in your 'drupal6' database. Do you want to continue? (y/n): y
Starting Drupal installation. This takes a few seconds ...                                                           [ok]
Installation complete.  User name: admin  User password: LanEwW7Bmu                                                  [ok]
ericrdb’s picture

I'll see about reworking the patch #2180273: Drupal sites not actually installed to install D6 sites correctly now too.

Also, I haven't yet tested a Drupal8 site install with drush-master.

discipolo’s picture

this patch can only work if the drush recipe is executed after git and curl in roles/vdd.json

but thanks a lot! it just saved me since drush channel discover currently isnt working in any of my vdds (which is a seperate issue)

ericrdb’s picture

StatusFileSize
new1.76 KB

Glad it worked for you!

Good call on the order of roles. I had done that on the patch in #2180273: Drupal sites not actually installed and forgot here, thanks for catching that. Patch updated.

Edit: Also, thanks for confirming the same pain we've been having with the pear channel failing for Drush stable installs. Odd for sure.

ericrdb’s picture

StatusFileSize
new4.16 KB

Currently, Drush is not supporting PEAR channel install:

Latest patch removes PEAR dependency and installs drush-master:

vagrant@precise32:~$ drush --version
 Drush Version   :  7.0-dev
discipolo’s picture

wonderful.
patch applies with

vdd-install-drush-master-2116195-7.patch:108: trailing whitespace.
vdd-install-drush-master-2116195-7.patch:41: new blank line at EOF.

and everything seems to work just fine!

discipolo’s picture

sadly after stopping the machine and trying to start it again i get an error that starts with:

Vagrantfile:17:in `block (2 levels) in <top (required)>': undefined method `>' for nil:NilClass (NoMethodError)

am trying to replicate that now.

ericrdb’s picture

StatusFileSize
new2.47 KB

The trailing whitespaces and extra lines in the patch shouldn't create the vagrantfile error. Could start with a clean checkout of the 8.x branch? I'm not able to replicate.

That said, here's a cleaner patch without the trailing whitespaces or extra lines. Thanks

discipolo’s picture

ok. i cannot replicate either. this patch works as expected.

ericrdb’s picture

Status: Needs review » Reviewed & tested by the community

Excellent, thanks for following up and confirming @discipolo.

Based on your comment, changing to RTBC.

danylevskyi’s picture

Status: Reviewed & tested by the community » Needs work

Folks, thanks for your patches and reviews!

+++ b/cookbooks/core/vdd/recipes/drush.rb
@@ -2,34 +2,40 @@ php_pear "Console_Table" do
+# Composer is required globally.

I think we should install composer independently from Drush. As it mentioned it's required globally.

ericrdb’s picture

What I mean is that Drush requires Composer as a "for all users" type of installation, instead of an "only me" method:
https://getcomposer.org/doc/00-intro.md#installation-nix

Perhaps a better comment would be:
# Drush requires Composer to be installed globally.

I'm not quite clear what you'd like to see. Are you suggesting we make a separate recipe for Composer?

danylevskyi’s picture

Yes, I'm suggesting to make separate recipe for Composer.

ericrdb’s picture

Status: Needs work » Needs review
StatusFileSize
new2.35 KB

Sure enough. How's this?

danylevskyi’s picture

Status: Needs review » Reviewed & tested by the community

Great!

ericrdb’s picture

Status: Reviewed & tested by the community » Fixed

Committed - yay!

duozersk’s picture

You guys rock! :)

discipolo’s picture

kudos!

danylevskyi’s picture

Should we commit it to 7.x-1.x branch?
Please, see #2209161: VDD versions

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

  • Commit ae5b2fa on 8.x-1.x, berkshelf by ericrdb:
    Issue #2116195 by ericrdb: Install drush-master