ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: "Dmitry V. Levin" <ldv@altlinux.org>
To: Alexey Gladkov <legion@altlinux.org>
Cc: ALT Devel discussion list <devel@lists.altlinux.org>
Subject: Re: [devel] [SCM] packages/sisyphus_check: heads/master
Date: Thu, 15 Nov 2018 16:17:58 +0300
Message-ID: <20181115131758.GA1966@altlinux.org> (raw)
In-Reply-To: <20181108214121.348D084402E8@gitery.altlinux.org>

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

On Thu, Nov 08, 2018 at 09:41:21PM +0000, Alexey Gladkov wrote:
> Update of /people/legion/packages/sisyphus_check.git
> 
> Changes statistics since `0.8.30-alt1-39-g331a919' follows:
>  .../sisyphus_check.d/150-check-intersects          | 23 +++++++++++++++++++++-
>  1 file changed, 22 insertions(+), 1 deletion(-)
> 
> Changelog since `0.8.30-alt1-39-g331a919' follows:
> commit 8d6e61ac4ee0a31c1f25ba0e432193e1b83f155f
> Author: Alexey Gladkov <legion@altlinux.org>
> Date:   Fri Nov 9 00:40:47 2018 +0300
> 
>     Forbid intersections with common-licenses
>     
>     Signed-off-by: Alexey Gladkov <legion@altlinux.org>
> 
> Full diff since `0.8.30-alt1-39-g331a919' follows:
> diff --git a/sisyphus_check/sisyphus_check.d/150-check-intersects b/sisyphus_check/sisyphus_check.d/150-check-intersects
> index ea148e9..5d65217 100644
> --- a/sisyphus_check/sisyphus_check.d/150-check-intersects
> +++ b/sisyphus_check/sisyphus_check.d/150-check-intersects
> @@ -27,8 +27,29 @@ check_intersects()
>  	return $rc
>  }
>  
> +# check files intersections with common-licenses
> +check_intersects_common_licenses()
> +{
> +	local f="$1" && shift || return 1
> +
> +	# Do not check common-licenses package.
> +	[ "$rpm_name" != 'common-licenses' ] || return 0
> +
> +	local rc=0
> +	local text
> +
> +	text="$(printf %s\\n "$rpm_filenames" |LC_LANG=C grep -e '^/usr/share/license/' -e '^/usr/share/license-exception/')" ||:

Пересечения по самим каталогам тоже, наверное, надо выявлять;
например, так:

grep -Ex '/usr/share/license(-exception)?(/.*)?'

> +
> +	if [ -n "$text" ]; then
> +		FileError "common-license intersections: $(oneliner "$text")" "$f"
> +		rc=1
> +	fi
> +
> +	return $rc
> +}
> +
>  run_check() {
> -	if ! check_intersects "$1"; then
> +	if ! check_intersects "$1" || ! check_intersects_common_licenses "$1"; then
>  		CheckError 'intersections with system packages'
>  		return 1
>  	fi

-- 
ldv

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

       reply	other threads:[~2018-11-15 13:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-15 13:17 ` Dmitry V. Levin [this message]
2018-11-15 13:54   ` Alexey Gladkov

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=20181115131758.GA1966@altlinux.org \
    --to=ldv@altlinux.org \
    --cc=devel@lists.altlinux.org \
    --cc=legion@altlinux.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

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git