* [gentoo-commits] repo/gentoo:master commit in: app-admin/drush/, app-admin/drush/files/
@ 2024-03-22 16:12 Michael Orlitzky
0 siblings, 0 replies; 2+ messages in thread
From: Michael Orlitzky @ 2024-03-22 16:12 UTC (permalink / raw
To: gentoo-commits
commit: 28ac4fb74f30b0f24b7de3b3727da20e7d5088aa
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 22 16:05:37 2024 +0000
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Fri Mar 22 16:09:42 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28ac4fb7
app-admin/drush: new revision to fix method signatures again
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>
app-admin/drush/drush-6.7.0-r7.ebuild | 68 ++++++++++++++++++++++
.../files/drush-6.7.0-batch-signature-fix-r1.patch | 46 +++++++++++++++
2 files changed, 114 insertions(+)
diff --git a/app-admin/drush/drush-6.7.0-r7.ebuild b/app-admin/drush/drush-6.7.0-r7.ebuild
new file mode 100644
index 000000000000..1329345e4dc0
--- /dev/null
+++ b/app-admin/drush/drush-6.7.0-r7.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit bash-completion-r1
+
+DESCRIPTION="Command line shell and scripting interface for Drupal"
+HOMEPAGE="https://github.com/drush-ops/drush"
+SRC_URI="https://github.com/drush-ops/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="dev-lang/php[cli,ctype,json(+),simplexml]
+ dev-php/PEAR-Console_Table"
+
+PATCHES=(
+ "${FILESDIR}/update-bash-completion-script-for-2.1.patch"
+ "${FILESDIR}/array-syntax.patch"
+ "${FILESDIR}/${P}-php8.0.patch"
+ "${FILESDIR}/${P}-gzip-mime.patch"
+ "${FILESDIR}/${P}-dont-pass-null-to-strtoupper.patch"
+ "${FILESDIR}/${P}-batch-signature-fix-r1.patch"
+)
+
+src_prepare() {
+ default
+
+ # dodoc compresses all of the documentation, so we fix the filenames
+ # in a few places.
+ #
+ # First, the README location in bootstrap.inc.
+ sed -i -e \
+ "s!/share/doc/drush!/share/doc/${PF}!" \
+ -e "s!README\.md!\0.bz2!g" \
+ includes/bootstrap.inc || die
+
+ # Next, the list of documentation in docs.drush.inc. Note that
+ # html files don't get compressed.
+ sed -i \
+ -e "s!\.bashrc'!.bashrc.bz2'!" \
+ -e "s!\.inc'!.inc.bz2'!" \
+ -e "s!\.ini'!.ini.bz2'!" \
+ -e "s!\.md'!.md.bz2'!" \
+ -e "s!\.php'!.php.bz2'!" \
+ -e "s!\.script'!.script.bz2'!" \
+ -e "s!\.txt'!.txt.bz2'!" \
+ commands/core/docs.drush.inc || die
+}
+
+src_install() {
+ # Always install the examples; they're referenced within the source
+ # code and too difficult to exorcise.
+ dodoc -r README.md docs examples
+
+ insinto /usr/share/drush
+ doins -r classes commands includes lib misc
+ doins drush_logo-black.png drush.info drush.php
+
+ exeinto /usr/share/drush
+ doexe drush
+ dosym ../share/drush/drush /usr/bin/drush
+
+ keepdir /etc/drush
+ newbashcomp drush.complete.sh drush
+}
diff --git a/app-admin/drush/files/drush-6.7.0-batch-signature-fix-r1.patch b/app-admin/drush/files/drush-6.7.0-batch-signature-fix-r1.patch
new file mode 100644
index 000000000000..14ee72b7dc4a
--- /dev/null
+++ b/app-admin/drush/files/drush-6.7.0-batch-signature-fix-r1.patch
@@ -0,0 +1,46 @@
+From 1acd52cff0d516ebfa7f177c38ed7f851c4f472a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 16 Aug 2023 21:21:39 -0400
+Subject: [PATCH] includes/batch.inc: synchronize sub and superclass signatures
+
+The DrushBatchContext class overrides the offsetSet() method of its
+superclass, ArrayObject, but changes its signature:
+
+ Error: Return type of DrushBatchContext::offsetSet($name, $value)
+ should either be compatible with ArrayObject::offsetSet(mixed $key,
+ mixed $value): void, or the #[\ReturnTypeWillChange] attribute should
+ be used to temporarily suppress the notice in .../batch.inc, line 37
+
+Renaming the parameter to $key and adding type hints fixes the issue.
+
+Signed-off-by: Michael Orlitzky <michael@orlitzky.com>
+---
+ includes/batch.inc | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/includes/batch.inc b/includes/batch.inc
+index dd4adc9..d26fabb 100644
+--- a/includes/batch.inc
++++ b/includes/batch.inc
+@@ -34,14 +34,14 @@
+ * @see _drush_batch_worker().
+ */
+ class DrushBatchContext extends ArrayObject {
+- function offsetSet($name, $value) {
+- if ($name == 'message') {
++ function offsetSet(mixed $key, mixed $value): void {
++ if ($key == 'message') {
+ drush_log(strip_tags($value), 'ok');
+ }
+- elseif ($name == 'error_message') {
++ elseif ($key == 'error_message') {
+ drush_set_error('DRUSH_BATCH_ERROR', strip_tags($value));
+ }
+- parent::offsetSet($name, $value);
++ parent::offsetSet($key, $value);
+ }
+ }
+
+--
+2.43.2
+
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-admin/drush/, app-admin/drush/files/
@ 2024-07-27 12:09 Michael Orlitzky
0 siblings, 0 replies; 2+ messages in thread
From: Michael Orlitzky @ 2024-07-27 12:09 UTC (permalink / raw
To: gentoo-commits
commit: a4f7145c4c1f2c2c9910a3fc847cbfd84362f42c
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 27 11:55:49 2024 +0000
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Sat Jul 27 12:09:15 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a4f7145c
app-admin/drush: add another compatibility patch
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>
...drush-6.7.0-r7.ebuild => drush-6.7.0-r8.ebuild} | 1 +
.../drush/files/drush-6.7.0-sql-dollar-sign.patch | 26 ++++++++++++++++++++++
2 files changed, 27 insertions(+)
diff --git a/app-admin/drush/drush-6.7.0-r7.ebuild b/app-admin/drush/drush-6.7.0-r8.ebuild
similarity index 97%
rename from app-admin/drush/drush-6.7.0-r7.ebuild
rename to app-admin/drush/drush-6.7.0-r8.ebuild
index 1329345e4dc0..2768a8302b65 100644
--- a/app-admin/drush/drush-6.7.0-r7.ebuild
+++ b/app-admin/drush/drush-6.7.0-r8.ebuild
@@ -23,6 +23,7 @@ PATCHES=(
"${FILESDIR}/${P}-gzip-mime.patch"
"${FILESDIR}/${P}-dont-pass-null-to-strtoupper.patch"
"${FILESDIR}/${P}-batch-signature-fix-r1.patch"
+ "${FILESDIR}/${P}-sql-dollar-sign.patch"
)
src_prepare() {
diff --git a/app-admin/drush/files/drush-6.7.0-sql-dollar-sign.patch b/app-admin/drush/files/drush-6.7.0-sql-dollar-sign.patch
new file mode 100644
index 000000000000..9d6b37274a75
--- /dev/null
+++ b/app-admin/drush/files/drush-6.7.0-sql-dollar-sign.patch
@@ -0,0 +1,26 @@
+From ed5365ba0e6021d2dfbfe9b31bfd641d718eb978 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 27 Jul 2024 07:52:15 -0400
+Subject: [PATCH 1/1] commands/sql/sql.drush.inc: ${var} -> {$var}
+
+This fixes a deprecation warning with newer PHPs.
+---
+ commands/sql/sql.drush.inc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/commands/sql/sql.drush.inc b/commands/sql/sql.drush.inc
+index 6d7a4aa..fcf2654 100644
+--- a/commands/sql/sql.drush.inc
++++ b/commands/sql/sql.drush.inc
+@@ -1414,7 +1414,7 @@ function drush_sql_format_oracle($query) {
+ $sqlp_settings = implode("\n", $settings)."\n";
+
+ // important for sqlplus to exit correctly
+- return "${sqlp_settings}${query};\nexit;\n";
++ return "{$sqlp_settings}{$query};\nexit;\n";
+ }
+
+
+--
+2.44.2
+
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-27 12:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-27 12:09 [gentoo-commits] repo/gentoo:master commit in: app-admin/drush/, app-admin/drush/files/ Michael Orlitzky
-- strict thread matches above, loose matches on Subject: below --
2024-03-22 16:12 Michael Orlitzky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox