public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Ulrich Mueller <ulm@gentoo.org>
To: wuyy <xgreenlandforwyy@gmail.com>
Cc: Ulrich Mueller <ulm@gentoo.org>,
	 "gentoo-dev@lists.gentoo.org" <gentoo-dev@lists.gentoo.org>,
	 Benda Xu <heroxbd@gentoo.org>
Subject: Re: [gentoo-dev] [PATCH v2 1/2] rocm.eclass: new eclass
Date: Wed, 17 Aug 2022 09:14:45 +0200	[thread overview]
Message-ID: <uzgg3pcii@gentoo.org> (raw)
In-Reply-To: <YvxdH7ujD77lsbfX@HEPwuyy> (wuyy's message of "Wed, 17 Aug 2022 11:14:39 +0800")

[-- Attachment #1: Type: text/plain, Size: 1429 bytes --]

>>>>> On Wed, 17 Aug 2022, wuyy  wrote:

> Also, I have some long sentences in code, for throwing information. How
> do I nicely wrap such long strings in bash? By incremental assigning it
> to variables I guess?

It's not an absolute rule. Avoid long lines where possible, but don't
jump through hoops to e.g. break long strings in assignments.

>> No double empty lines please. (Pkgcheck should have complained about
>> this.)

> OK. But `pkgcheck scan rocm.eclass` (version 0.10.12) does not
> complains. A missing feature maybe?

Hm, it warns about it in ebuilds but not in eclasses. This looks like a
bug in pkgcheck to me.

>> Please don't use internal Portage variables.
> OK, although I can't find such warnings on
> https://devmanual.gentoo.org/eclass-writing. Maybe an entry should be
> added?

This is in PMS section 12.3.17 "Reserved commands and variables":
https://dev.gentoo.org/~ulm/pms/head/pms.html#x1-13700012.3.17

Let's add it to the devmanual as well:
https://github.com/gentoo/devmanual/pull/301/commits/616323bd33f6aee5b579c24e31a4605c36e08b53

>> > +	elif [[ -d "${BUILD_DIR}"/clients/staging ]]; then
>> 
>> Quotation marks aren't necessary here.

> What if BUILD_DIR contains spaces?

That's not a problem because word splitting isn't performed inside [[ ]]:
https://www.gnu.org/software/bash/manual/html_node/Conditional-Constructs.html#index-_005b_005b

Ulrich

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 507 bytes --]

  reply	other threads:[~2022-08-17  7:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-15 14:43 [gentoo-dev] [PATCH v2 0/2] rocm.eclass: new eclass for ROCm packages Yiyang Wu
2022-08-15 14:43 ` [gentoo-dev] [PATCH v2 1/2] rocm.eclass: new eclass Yiyang Wu
2022-08-15 22:41   ` Ulrich Mueller
2022-08-15 22:49     ` Ulrich Mueller
2022-08-17  3:14     ` wuyy
2022-08-17  7:14       ` Ulrich Mueller [this message]
2022-08-15 23:00   ` Ulrich Mueller
2022-08-15 14:43 ` [gentoo-dev] [PATCH v2 2/2] profiles/desc: add amdgpu_targets.desc for USE_EXPAND Yiyang Wu
2022-08-15 14:47 ` [gentoo-dev] [PATCH v2 0/2] rocm.eclass: new eclass for ROCm packages Sam James
2022-08-15 14:47   ` Sam James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=uzgg3pcii@gentoo.org \
    --to=ulm@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=heroxbd@gentoo.org \
    --cc=xgreenlandforwyy@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox