[devel] [SCM] packages/sisyphus_check: heads/master
Dmitry V. Levin
ldv на altlinux.org
Чт Ноя 15 16:17:58 MSK 2018
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
----------- следующая часть -----------
Было удалено вложение не в текстовом формате...
Имя : signature.asc
Тип : application/pgp-signature
Размер : 801 байтов
Описание: отсутствует
Url : <http://lists.altlinux.org/pipermail/devel/attachments/20181115/2c31ebdf/attachment-0001.bin>
Подробная информация о списке рассылки Devel