Closed alanmels closed 4 years ago
Hi @alanmels! drush dl devel
(and other modules I tested) is working for me in two different environments; I'm using Drush version 8.2.3 and Backdrop Drush commands version 1.x-1.x. Which version of each are you using? Might help pinpoint the issue you're experiencing.
Hi @alanmels!
drush dl devel
(and other modules I tested) is working for me in two different environments; I'm using Drush version 8.2.3 and Backdrop Drush commands version 1.x-1.x. Which version of each are you using? Might help pinpoint the issue you're experiencing.
Hi @jackaponte! Here is the output of st
:
docker@cli:/var/www/docroot$ drush st
Backdrop version : 1.14.1
Site URI : http://docroot
Database driver : mysql
Database hostname : db
Database username : user
Database name : default
Backdrop bootstrap : Successful
Backdrop user :
PHP configuration :
PHP OS : Linux
Drush script : /usr/local/bin/drush8
Drush version : 8.1.16
Backdrop Drush : 1.x-1.x
Drush temp directory : /tmp
Drush configuration : /home/docker/.drush/drushrc.php
Drush alias files :
Install profile : standard
Backdrop Settings File : ./settings.php
docker@cli:/var/www/docroot$
I'll upgrade my drush to 8.2.3 and run another test later and see if it works.
Now I have:
docker@cli:/var/www/docroot$ drush st
Backdrop version : 1.14.1
Site URI : http://docroot
Database driver : mysql
Database hostname : db
Database username : user
Database name : default
Backdrop bootstrap : Successful
Backdrop user :
PHP configuration :
PHP OS : Linux
Drush script : /usr/local/bin/drush8
Drush version : 8.2.3
Backdrop Drush : 1.x-1.x
Drush temp directory : /tmp
Drush configuration : /home/docker/.drush/drushrc.php
Drush alias files :
Install profile : standard
Backdrop Settings File : ./settings.php
but it still does not see the correct location:
docker@cli:/var/www/docroot$ drush dl devel
Error: There is no release located at https://github.com/backdrop-contrib/devel/releases/download//devel.zip.
Try visiting the devel page directly: https://github.com/backdrop-contrib/devel
docker@cli:/var/www/docroot$
Now I've started wondering if something is wrong with Docksal's implementation of Backdrop Drush :(
Even with the latest Docksal CLI version the problem persists:
docker@cli:/var/www/docroot$ drush st
Backdrop version : 1.14.1
Site URI : http://docroot
Database driver : mysql
Database hostname : db
Database username : user
Database name : default
Backdrop bootstrap : Successful
Backdrop user :
PHP configuration :
PHP OS : Linux
Drush script : /usr/local/bin/drush8
Drush version : 8.3.0
Backdrop Drush : 1.x-1.x
Drush temp directory : /tmp
Drush configuration : /home/docker/.drush/drushrc.php
Drush alias files :
Install profile : standard
Backdrop Settings File : ./settings.php
docker@cli:/var/www/docroot$ drush dl devel
Error: There is no release located at https://github.com/backdrop-contrib/devel/releases/download//devel.zip.
Try visiting the devel page directly: https://github.com/backdrop-contrib/devel
docker@cli:/var/www/docroot$
so I doubt it's about drush version anymore.
@alanmels do the docksal containers have wget
and/or curl
installed on them?
ssh into docksal container
which wget
which curl
if they are missing wget
then drush dl
will not work it'd be the wrong error message (bug), but it might be something to look at.
Also could be helpful to know where dockal puts the backdrop-drush-extension
in ~/.drush
?
@serundeputy to ssh into the docksal container we simply run fin bash
, and inside of the container both commands are present:
docker@cli:/var/www/docroot$ which wget
/usr/bin/wget
docker@cli:/var/www/docroot$ which curl
/usr/bin/curl
Docksal places the https://github.com/backdrop-contrib/drush in /home/docker/.drush/backdrop/
:
docker@cli:/var/www/docroot$ ll /home/docker/.drush/backdrop/
total 176
-rw-r--r-- 1 docker dialout 25199 Oct 16 16:18 BackdropBoot.php
-rw-r--r-- 1 docker dialout 24664 Oct 16 16:18 backdrop-drush-extension-logopn.png
-rw-r--r-- 1 docker dialout 4875 Oct 16 16:18 backdrop.drush.inc
drwxr-xr-x 8 docker dialout 4096 Oct 16 16:18 commands
-rw-r--r-- 1 docker dialout 630 Oct 16 16:18 composer.json
-rw-r--r-- 1 docker dialout 62224 Oct 16 16:18 composer.lock
drwxr-xr-x 2 docker dialout 4096 Oct 16 16:18 grn
drwxr-xr-x 2 docker dialout 4096 Oct 16 16:18 includes
-rw-r--r-- 1 docker dialout 18093 Oct 16 16:18 LICENSE.txt
-rw-r--r-- 1 docker dialout 6117 Oct 16 16:18 README.md
drwxr-xr-x 2 docker dialout 4096 Oct 16 16:18 tests
docker@cli:/var/www/docroot$
I even tried to replace Docksal's implementation with freshly git-pulled repository:
cd /home/docker/.drush && mv backdrop/ backdrop.bk
git clone https://github.com/backdrop-contrib/drush.git backdrop
and compared two directories to see some difference:
docker@cli:~/.drush$ diff -r backdrop backdrop.bk/
Only in backdrop/.git/hooks: fsmonitor-watchman.sample
diff -r backdrop/.git/hooks/pre-commit.sample backdrop.bk/.git/hooks/pre-commit.sample
15c15
< against=$(git hash-object -t tree /dev/null)
---
> against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
diff -r backdrop/.git/hooks/prepare-commit-msg.sample backdrop.bk/.git/hooks/prepare-commit-msg.sample
12,13c12,13
< # This hook includes three examples. The first one removes the
< # "# Please enter the commit message..." help message.
---
> # This hook includes three examples. The first comments out the
> # "Conflicts:" part of a merge commit.
23,25c23,25
< COMMIT_MSG_FILE=$1
< COMMIT_SOURCE=$2
< SHA1=$3
---
> case "$2,$3" in
> merge,)
> /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;;
27c27,30
< /usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE"
---
> # ,|template,)
> # /usr/bin/perl -i.bak -pe '
> # print "\n" . `git diff --cached --name-status -r`
> # if /^#/ && $first++ == 0' "$1" ;;
29,35c32,33
< # case "$COMMIT_SOURCE,$SHA1" in
< # ,|template,)
< # /usr/bin/perl -i.bak -pe '
< # print "\n" . `git diff --cached --name-status -r`
< # if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;;
< # *) ;;
< # esac
---
> *) ;;
> esac
37,42c35,36
< # SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
< # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE"
< # if test -z "$COMMIT_SOURCE"
< # then
< # /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE"
< # fi
---
> # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
> # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
diff -r backdrop/.git/hooks/pre-rebase.sample backdrop.bk/.git/hooks/pre-rebase.sample
61c61
< echo >&2 "$topic is already up to date with master"
---
> echo >&2 "$topic is already up-to-date with master"
Binary files backdrop/.git/index and backdrop.bk/.git/index differ
diff -r backdrop/.git/logs/HEAD backdrop.bk/.git/logs/HEAD
1c1
< 0000000000000000000000000000000000000000 57508f96ab44cbfb2a874308ae4c4b71ac3a15c5 docker <docker@cli.(none)> 1571257135 +0000 clone: from https://github.com/backdrop-contrib/drush.git
---
> 0000000000000000000000000000000000000000 57508f96ab44cbfb2a874308ae4c4b71ac3a15c5 root <root@cli.(none)> 1571242719 +0000 clone: from https://github.com/backdrop-contrib/drush.git
diff -r backdrop/.git/logs/refs/heads/1.x-1.x backdrop.bk/.git/logs/refs/heads/1.x-1.x
1c1
< 0000000000000000000000000000000000000000 57508f96ab44cbfb2a874308ae4c4b71ac3a15c5 docker <docker@cli.(none)> 1571257135 +0000 clone: from https://github.com/backdrop-contrib/drush.git
---
> 0000000000000000000000000000000000000000 57508f96ab44cbfb2a874308ae4c4b71ac3a15c5 root <root@cli.(none)> 1571242719 +0000 clone: from https://github.com/backdrop-contrib/drush.git
diff -r backdrop/.git/logs/refs/remotes/origin/HEAD backdrop.bk/.git/logs/refs/remotes/origin/HEAD
1c1
< 0000000000000000000000000000000000000000 57508f96ab44cbfb2a874308ae4c4b71ac3a15c5 docker <docker@cli.(none)> 1571257135 +0000 clone: from https://github.com/backdrop-contrib/drush.git
---
> 0000000000000000000000000000000000000000 57508f96ab44cbfb2a874308ae4c4b71ac3a15c5 root <root@cli.(none)> 1571242719 +0000 clone: from https://github.com/backdrop-contrib/drush.git
diff -r backdrop/.git/packed-refs backdrop.bk/.git/packed-refs
1c1
< # pack-refs with: peeled fully-peeled sorted
---
> # pack-refs with: peeled fully-peeled
docker@cli:~/.drush$
Unfortunately, the problem persists:
docker@cli:/var/www/docroot$ drush dl devel
Error: There is no release located at https://github.com/backdrop-contrib/devel/releases/download//devel.zip.
Try visiting the devel page directly: https://github.com/backdrop-contrib/devel
so I did:
docker@cli:/var/www/docroot$ drush dl devel -vvv
Drush preflight prepare loaded autoloader at [0.01 sec, 3.23 MB] [preflight]
Starting Drush preflight. [0.01 sec, 3.23 MB] [preflight]
Loading drushrc "/home/docker/.drush/drushrc.php" into "home.drush" scope. [0.01 sec, 3.59 MB] [bootstrap]
Executing: cd /var/www/docroot && git rev-parse --show-toplevel 2> /dev/null
/var/www/docroot
Cache HIT cid: 8.3.0-commandfiles-0-604b0c2d295b9430224b8800747b540e [0.02 sec, 3.63 MB] [debug]
Scanning into /etc/drush for /.*aliases\.drush(8|)rc\.php$/ [0.05 sec, 6.95 MB] [debug]
Scanning into /etc/drush for /self\.alias\.drush(8|)rc\.php$/ [0.05 sec, 6.95 MB] [debug]
Scanning into phar:///usr/local/bin/drush8/includes/.. for /.*aliases\.drush(8|)rc\.php$/ [0.05 sec, 6.95 MB] [debug]
Scanning into phar:///usr/local/bin/drush8/includes/.. for /self\.alias\.drush(8|)rc\.php$/ [0.06 sec, 6.95 MB] [debug]
Scanning into /home/docker/.drush for /.*aliases\.drush(8|)rc\.php$/ [0.07 sec, 6.95 MB] [debug]
Scanning into /home/docker/.drush for /self\.alias\.drush(8|)rc\.php$/ [0.07 sec, 6.95 MB] [debug]
Scanning into /var/www/docroot/drush/aliases for /.*aliases\.drush(8|)rc\.php$/ [0.08 sec, 6.96 MB] [debug]
Scanning into /var/www/docroot/drush/aliases for /self\.alias\.drush(8|)rc\.php$/ [0.08 sec, 6.96 MB] [debug]
Scanning into /var/www/docroot/../drush for /.*aliases\.drush(8|)rc\.php$/ [0.08 sec, 6.96 MB] [debug]
Scanning into /var/www/docroot/../drush for /self\.alias\.drush(8|)rc\.php$/ [0.08 sec, 6.96 MB] [debug]
Scanning into /var/www/docroot/drush for /.*aliases\.drush(8|)rc\.php$/ [0.08 sec, 6.96 MB] [debug]
Scanning into /var/www/docroot/drush for /self\.alias\.drush(8|)rc\.php$/ [0.08 sec, 6.96 MB] [debug]
Scanning into /var/www/docroot/sites/all/drush for /.*aliases\.drush(8|)rc\.php$/ [0.08 sec, 6.96 MB] [debug]
Scanning into /var/www/docroot/sites/all/drush for /self\.alias\.drush(8|)rc\.php$/ [0.08 sec, 6.96 MB] [debug]
Scanning into /var/www/docroot/sites/default for /.*aliases\.drush(8|)rc\.php$/ [0.08 sec, 6.96 MB] [debug]
Scanning into /var/www/docroot/sites/default for /self\.alias\.drush(8|)rc\.php$/ [0.08 sec, 6.96 MB] [debug]
Bootstrap to phase 1. [0.29 sec, 9.7 MB] [bootstrap]
Drush bootstrap phase : bootstrap_backdrop_root() [0.29 sec, 9.7 MB] [bootstrap]
Initialized Backdrop 1.14.1 root directory at /var/www/docroot [0.3 sec, 10.1 MB] [notice]
Find command files for phase 1 (max=1) [0.3 sec, 8.17 MB] [debug]
Cache HIT cid: 8.3.0-commandfiles-1-5124c92f9363c043e3294751e93844d0 [0.3 sec, 8.17 MB] [debug]
Cache HIT cid: 8.3.0-annotationfiles-1-5f4cf62445f0c229b599737cddb4ecd5 [0.3 sec, 8.17 MB] [debug]
Trying to bootstrap as far as we can. [0.32 sec, 10.11 MB] [debug]
Scanning into /etc/drush for /.*aliases\.drush(8|)rc\.php$/ [0.32 sec, 10.11 MB] [debug]
Scanning into /etc/drush for /self\.alias\.drush(8|)rc\.php$/ [0.32 sec, 10.11 MB] [debug]
Scanning into phar:///usr/local/bin/drush8/includes/.. for /.*aliases\.drush(8|)rc\.php$/ [0.32 sec, 10.11 MB] [debug]
Scanning into phar:///usr/local/bin/drush8/includes/.. for /self\.alias\.drush(8|)rc\.php$/ [0.33 sec, 10.11 MB] [debug]
Scanning into /home/docker/.drush for /.*aliases\.drush(8|)rc\.php$/ [0.34 sec, 10.11 MB] [debug]
Scanning into /home/docker/.drush for /self\.alias\.drush(8|)rc\.php$/ [0.34 sec, 10.11 MB] [debug]
Scanning into /var/www/docroot/drush/aliases for /.*aliases\.drush(8|)rc\.php$/ [0.34 sec, 10.12 MB] [debug]
Scanning into /var/www/docroot/drush/aliases for /self\.alias\.drush(8|)rc\.php$/ [0.34 sec, 10.12 MB] [debug]
Scanning into /var/www/docroot/../drush for /.*aliases\.drush(8|)rc\.php$/ [0.34 sec, 10.12 MB] [debug]
Scanning into /var/www/docroot/../drush for /self\.alias\.drush(8|)rc\.php$/ [0.34 sec, 10.12 MB] [debug]
Scanning into /var/www/docroot/drush for /.*aliases\.drush(8|)rc\.php$/ [0.34 sec, 10.12 MB] [debug]
Scanning into /var/www/docroot/drush for /self\.alias\.drush(8|)rc\.php$/ [0.34 sec, 10.12 MB] [debug]
Scanning into /var/www/docroot/sites/all/drush for /.*aliases\.drush(8|)rc\.php$/ [0.34 sec, 10.12 MB] [debug]
Scanning into /var/www/docroot/sites/all/drush for /self\.alias\.drush(8|)rc\.php$/ [0.34 sec, 10.12 MB] [debug]
Scanning into /var/www/docroot/sites/docroot for /.*aliases\.drush(8|)rc\.php$/ [0.34 sec, 10.12 MB] [debug]
Scanning into /var/www/docroot/sites/docroot for /self\.alias\.drush(8|)rc\.php$/ [0.35 sec, 10.12 MB] [debug]
Drush bootstrap phase : bootstrap_backdrop_site() [0.36 sec, 10.13 MB] [bootstrap]
Initialized Backdrop site docroot at . [0.36 sec, 10.13 MB] [notice]
Find command files for phase 2 (max=6) [0.36 sec, 8.2 MB] [debug]
Drush bootstrap phase : bootstrap_backdrop_configuration() [0.37 sec, 8.2 MB] [bootstrap]
Find command files for phase 3 (max=6) [0.37 sec, 8.61 MB] [debug]
Drush bootstrap phase : bootstrap_backdrop_database() [0.38 sec, 9.24 MB] [bootstrap]
Find command files for phase 4 (max=6) [0.39 sec, 9.29 MB] [debug]
Drush bootstrap phase : bootstrap_backdrop_full() [0.39 sec, 9.29 MB] [bootstrap]
Find command files for phase 5 (max=6) [0.56 sec, 19.87 MB] [debug]
Cache MISS cid: [0.56 sec, 19.87 MB] [debug]
Cache HIT cid: 8.3.0-commandfiles-5-b8ee68a6fd98113f43b22096f1454736 [0.58 sec, 19.88 MB] [debug]
Cache HIT cid: 8.3.0-annotationfiles-5-97ebce946390de8080c24da5cac0dfff [0.58 sec, 19.88 MB] [debug]
Drush bootstrap phase : bootstrap_backdrop_login() [0.58 sec, 19.87 MB] [bootstrap]
Find command files for phase 6 (max=6) [0.6 sec, 20.45 MB] [debug]
Found command: pm-download (commandfile=pm) [0.6 sec, 20.45 MB] [bootstrap]
Undefined index: description command.inc:1304 [0.61 sec, 20.81 MB] [notice]
Undefined index: description command.inc:1304 [0.61 sec, 20.82 MB] [notice]
Undefined index: description command.inc:1304 [0.61 sec, 20.82 MB] [notice]
Undefined index: description command.inc:1304 [0.61 sec, 20.82 MB] [notice]
Undefined index: description command.inc:1304 [0.61 sec, 20.84 MB] [notice]
Undefined index: description command.inc:1304 [0.62 sec, 21.2 MB] [notice]
Calling hook backdrop_command_pm_download [0.64 sec, 22.66 MB] [debug]
Executing: wget --version
Undefined offset: 1 backdrop_pm.drush.inc:132 [10.46 sec, 22.67 MB] [notice]
Error: There is no release located at https://github.com/backdrop-contrib/devel/releases/download//devel.zip.
Try visiting the devel page directly: https://github.com/backdrop-contrib/devel
Returned from hook backdrop_command_pm_download [15.7 sec, 22.67 MB] [debug]
Command dispatch complete [15.7 sec, 22.59 MB] [notice]
Timer Cum (sec) Count Avg (msec)
page 15.335 1 15335.26
docker@cli:/var/www/docroot$
I've traced the problem to the backdrop_pm_get_from_github() function returning empty content:
/**
* Helper function for backdrop_command_pm_download().
*
* Gets the url for the github repo of the contrib module.
*/
function backdrop_pm_get_from_github($url) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1);
$content = curl_exec($ch);
curl_close($ch);
return $content;
}
This can be disregarded per https://github.com/backdrop-contrib/drush/pull/201#issuecomment-543120943
From #201
The issue turned out to be about our company VPN firewall, that @alanmels was using when trying to download modules.
Ya know, I thought to ask whether it could be some sort of connectivity issue; should have done so! Thanks for clearing things up, @AlexShapka,
Totally mea culpa. Should've checked the networks before putting so much efforts to this in vain.
No worries @alanmels, glad you've gotten that sorted!
On the other hand, I've run additional tests today and detected that even with our firewall completely taken off, the drush dl module
works only occasionally with Backdrop Drush 1.0.0 installed. However, the same command always succeeds with Backdrop Drush 1.x-1.x installed.
Not sure if we should re-open the issue, but decided to report just for future references if someone else hits the same problem.
all bugs should be reproducible on latest 1.x-1.x
if it works there than it works and no bug report is needed.
As https://github.com/backdrop-contrib/drush says the
drush dl
is supported, however running it gives:Is something wrong with my local Docksal environment or it doesn't work for everyone?