diff options
author | Benjamin Denhartog | 2020-01-23 18:55:54 -0800 |
---|---|---|
committer | Benjamin Denhartog | 2020-01-23 20:41:30 -0800 |
commit | 8a9eff646c7a885158fde7e94da64e4ce3333763 (patch) | |
tree | 736674e9fb84f0bfb48d88ae210314d6100d7b1f | |
parent | 61792605df1402e970883ef1900a111d2e0c4155 (diff) | |
download | aur-8a9eff646c7a885158fde7e94da64e4ce3333763.tar.gz |
fix: add patch file to avoid SyntaxWarning when executing console_io.py
This patch adds a patch file to the package that fixes an erroneous
usage of the 'is' operator with a literal (string) in
lib/googlecloudsdk/core/console/console_io.py. This has been reported
upstream.
refs https://issuetracker.google.com/issues/147702239
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | 0001-fix-console-io-syntax-warning.patch | 11 | ||||
-rw-r--r-- | PKGBUILD | 15 |
3 files changed, 27 insertions, 3 deletions
@@ -1,7 +1,7 @@ pkgbase = google-cloud-sdk pkgdesc = A set of command-line tools for the Google Cloud Platform. Includes gcloud (with beta and alpha commands), gsutil, and bq. pkgver = 276.0.0 - pkgrel = 2 + pkgrel = 3 url = https://cloud.google.com/sdk/ arch = x86_64 license = Apache @@ -12,8 +12,10 @@ pkgbase = google-cloud-sdk options = staticlibs source = https://dl.google.com/dl/cloudsdk/release/downloads/for_packagers/linux/google-cloud-sdk_276.0.0.orig.tar.gz source = google-cloud-sdk.sh + source = 0001-fix-console-io-syntax-warning.patch sha256sums = ad3d711e372fdcef141106d33e150aee4922a88c76484798a40b48a2fc779c3c sha256sums = a54f88947a2593fae4aa8f65e42de4ad735583ae743735305c0f36710a794295 + sha256sums = b3faeb3af2922510048d12063fa215610f12879f5cc9f8b78786c7d9f2957c70 pkgname = google-cloud-sdk diff --git a/0001-fix-console-io-syntax-warning.patch b/0001-fix-console-io-syntax-warning.patch new file mode 100644 index 000000000000..17e29a38b7e7 --- /dev/null +++ b/0001-fix-console-io-syntax-warning.patch @@ -0,0 +1,11 @@ +--- a/lib/googlecloudsdk/core/console/console_io.py 2020-01-23 18:07:11.746083781 -0800 ++++ b/lib/googlecloudsdk/core/console/console_io.py 2020-01-23 18:06:51.028805396 -0800 +@@ -541,7 +541,7 @@ + + while True: + answer = _GetInput() +- if answer is None or (answer is '' and default is not None): ++ if answer is None or (answer == '' and default is not None): + # Return default if we failed to read from stdin. + # Return default if the user hit enter and there is a valid default, + # or raise OperationCancelledError if default is the cancel option. @@ -7,7 +7,7 @@ pkgname="google-cloud-sdk" pkgver=276.0.0 -pkgrel=2 +pkgrel=3 pkgdesc="A set of command-line tools for the Google Cloud Platform. Includes gcloud (with beta and alpha commands), gsutil, and bq." url="https://cloud.google.com/sdk/" license=("Apache") @@ -20,15 +20,26 @@ options=('!strip' 'staticlibs') source=( "https://dl.google.com/dl/cloudsdk/release/downloads/for_packagers/linux/${pkgname}_${pkgver}.orig.tar.gz" "google-cloud-sdk.sh" + "0001-fix-console-io-syntax-warning.patch" ) sha256sums=('ad3d711e372fdcef141106d33e150aee4922a88c76484798a40b48a2fc779c3c' - 'a54f88947a2593fae4aa8f65e42de4ad735583ae743735305c0f36710a794295') + 'a54f88947a2593fae4aa8f65e42de4ad735583ae743735305c0f36710a794295' + 'b3faeb3af2922510048d12063fa215610f12879f5cc9f8b78786c7d9f2957c70') + +prepare() { + cd "$pkgname" + + for f in ./../*.patch; do + patch -p1 -i $f > /dev/null 2>&1 || ( echo "failed to apply patch: $(basename $f)" && exit 1 ) + done +} package() { echo "Copying core SDK components" mkdir "${pkgdir}/opt" cp -r "${srcdir}/${pkgname}" "${pkgdir}/opt" + echo "Running bootstrapping script" # The Google code uses a _TraceAction() method which spams the screen even |