public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Sam James <sam@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: "Robin H. Johnson" <robbat2@gentoo.org>
Subject: Re: [gentoo-dev] [PATCH] check-reqs.eclass: more disk checks
Date: Tue, 20 Feb 2024 04:38:31 +0000	[thread overview]
Message-ID: <87msrvlpg2.fsf@gentoo.org> (raw)
In-Reply-To: <20240219220832.25919-1-robbat2@gentoo.org>

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


"Robin H. Johnson" <robbat2@gentoo.org> writes:

> Allow checking more disk space, for users with many split volumes and
> ever-larger packages.
>
> gentoo-kernel-bin:
> /     >=350MB/version (in /lib/modules)
> /boot >=40MB/version
>
> rust-bin:
> /opt  >=450MB/version
>

LGTM, but give a bit of time for other comments.

> Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
> ---
>  eclass/check-reqs.eclass | 44 +++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 43 insertions(+), 1 deletion(-)
>
> diff --git a/eclass/check-reqs.eclass b/eclass/check-reqs.eclass
> index fac2f4553d74..7b65f44e8c41 100644
> --- a/eclass/check-reqs.eclass
> +++ b/eclass/check-reqs.eclass
> @@ -24,12 +24,21 @@
>  # # need this much temporary build space
>  # CHECKREQS_DISK_BUILD="2G"
>  #
> +# # install will need this much space in /
> +# CHECKREQS_DISK_ROOT="1G"
> +#
> +# # install will need this much space in /boot
> +# CHECKREQS_DISK_BOOT="128M"
> +#
>  # # install will need this much space in /usr
>  # CHECKREQS_DISK_USR="1G"
>  #
>  # # install will need this much space in /var
>  # CHECKREQS_DISK_VAR="1024M"
>  #
> +# # install will need this much space in /opt
> +# CHECKREQS_DISK_OPT="1G"
> +#
>  # @CODE
>  #
>  # If you don't specify a value for, say, CHECKREQS_MEMORY, then the test is not
> @@ -56,6 +65,16 @@ _CHECK_REQS_ECLASS=1
>  # @DESCRIPTION:
>  # How much diskspace is needed to build the package? Eg.: CHECKREQS_DISK_BUILD=2T
>  
> +# @ECLASS_VARIABLE: CHECKREQS_DISK_ROOT
> +# @DEFAULT_UNSET
> +# @DESCRIPTION:
> +# How much space in / is needed to install the package? Eg.: CHECKREQS_DISK_ROOT=1G
> +
> +# @ECLASS_VARIABLE: CHECKREQS_DISK_BOOT
> +# @DEFAULT_UNSET
> +# @DESCRIPTION:
> +# How much space in /boot is needed to install the package? Eg.: CHECKREQS_DISK_BOOT=128M
> +
>  # @ECLASS_VARIABLE: CHECKREQS_DISK_USR
>  # @DEFAULT_UNSET
>  # @DESCRIPTION:
> @@ -66,6 +85,11 @@ _CHECK_REQS_ECLASS=1
>  # @DESCRIPTION:
>  # How much space is needed in /var? Eg.: CHECKREQS_DISK_VAR=3000M
>  
> +# @ECLASS_VARIABLE: CHECKREQS_DISK_OPT
> +# @DEFAULT_UNSET
> +# @DESCRIPTION:
> +# How much space is needed in /opt? Eg.: CHECKREQS_DISK_OPT=1G
> +
>  # @ECLASS_VARIABLE: CHECKREQS_DONOTHING
>  # @USER_VARIABLE
>  # @DEFAULT_UNSET
> @@ -121,8 +145,11 @@ _check-reqs_prepare() {
>  
>  	if [[ -z ${CHECKREQS_MEMORY} &&
>  			-z ${CHECKREQS_DISK_BUILD} &&
> +			-z ${CHECKREQS_DISK_ROOT} &&
> +			-z ${CHECKREQS_DISK_BOOT} &&
>  			-z ${CHECKREQS_DISK_USR} &&
> -			-z ${CHECKREQS_DISK_VAR} ]]; then
> +			-z ${CHECKREQS_DISK_VAR} &&
> +			-z ${CHECKREQS_DISK_OPT} ]]; then
>  		eerror "Set some check-reqs eclass variables if you want to use it."
>  		eerror "If you are user and see this message file a bug against the package."
>  		die "${FUNCNAME}: check-reqs eclass called but not actually used!"
> @@ -161,6 +188,16 @@ _check-reqs_run() {
>  	fi
>  
>  	if [[ ${MERGE_TYPE} != buildonly ]]; then
> +		[[ -n ${CHECKREQS_DISK_ROOT} ]] && \
> +			_check-reqs_disk \
> +				"${EROOT%/}/" \
> +				"${CHECKREQS_DISK_ROOT}"
> +
> +		[[ -n ${CHECKREQS_DISK_BOOT} ]] && \
> +			_check-reqs_disk \
> +				"${EROOT%/}/boot" \
> +				"${CHECKREQS_DISK_BOOT}"
> +
>  		[[ -n ${CHECKREQS_DISK_USR} ]] && \
>  			_check-reqs_disk \
>  				"${EROOT%/}/usr" \
> @@ -170,6 +207,11 @@ _check-reqs_run() {
>  			_check-reqs_disk \
>  				"${EROOT%/}/var" \
>  				"${CHECKREQS_DISK_VAR}"
> +
> +		[[ -n ${CHECKREQS_DISK_OPT} ]] && \
> +			_check-reqs_disk \
> +				"${EROOT%/}/opt" \
> +				"${CHECKREQS_DISK_OPT}"
>  	fi
>  }


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

  parent reply	other threads:[~2024-02-20  4:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-19 22:08 [gentoo-dev] [PATCH] check-reqs.eclass: more disk checks Robin H. Johnson
2024-02-19 22:14 ` [gentoo-dev] " Robin H. Johnson
2024-02-20  6:16   ` Michał Górny
2024-02-20  4:38 ` Sam James [this message]
2024-02-20  5:53 ` [gentoo-dev] " Andrew Ammerlaan
2024-02-26  6:31 ` [gentoo-dev] [PATCH v2 1/2] check-reqs.eclass: runtime disk checks for any path Robin H. Johnson
2024-02-26  7:01   ` zzam
2024-02-26  9:46     ` Robin H. Johnson
2024-02-26 13:50   ` Michał Górny
2024-02-26  6:31 ` [gentoo-dev] [PATCH v2 2/2] sys-firmware/intel-microcode: check-reqs for /boot space Robin H. Johnson

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=87msrvlpg2.fsf@gentoo.org \
    --to=sam@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=robbat2@gentoo.org \
    /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