public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Cc: SebastianLuther@gmx.de
Subject: Re: [gentoo-portage-dev] [PATCH] QA warning for files in /var/{cache,lib,lock,run}/ or /run/ (bug 493154)
Date: Wed, 11 Dec 2013 02:57:21 -0500	[thread overview]
Message-ID: <201312110257.22262.vapier@gentoo.org> (raw)
In-Reply-To: <1386277037-9492-1-git-send-email-SebastianLuther@gmx.de>

[-- Attachment #1: Type: Text/Plain, Size: 1366 bytes --]

On Thursday 05 December 2013 15:57:17 SebastianLuther@gmx.de wrote:
> --- a/bin/misc-functions.sh
> +++ b/bin/misc-functions.sh
> @@ -242,6 +242,11 @@ install_qa_check() {
>  		[[ -d ${ED}/$x ]] && f+="  $x\n"
>  	done
> 
> +	# It's ok create these directories, but not to install into them. (bug
> 493154)

our style uses #12345 rather than (bug 12345)
# It's ok create these directories, but not to install into them. #493154

> +	for x in var/cache var/lib var/lock var/run run ; do
> +		[[ -d ${ED}/$x ]] && [[ $(find "${ED}/${x}" -prune -empty) = "" ]] &&
> f+="  $x\n"

the -d check doesn't handle symlinks correctly ... baselayout would install 
/var/run -> /run, and the -d would deref that to the real symlink.  however, 
`find` will not descend into the symlink, so we end up being saved by that.

we have -z for detecting empty output rather than comparing to an empty string

non-builtin vars should use braces, so that'd be ${x}.  i know some of the 
code in here doesn't follow that, but we should be marching in that direction 
with new code.

>  	if [[ -n $f ]] ; then
>  		eqawarn "QA Notice: This ebuild installs into the following 
deprecated directories:"

this warning is incorrect for these paths.  we need to create a new warning 
that clearly explains what is going on.

i'll send out a new version.
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2013-12-11  7:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-05 20:57 [gentoo-portage-dev] [PATCH] QA warning for files in /var/{cache,lib,lock,run}/ or /run/ (bug 493154) SebastianLuther
2013-12-11  7:57 ` Mike Frysinger [this message]
2013-12-11  8:43   ` Sebastian Luther
2013-12-16  5:18     ` Mike Frysinger
2013-12-11  7:58 ` [gentoo-portage-dev] [PATCH v2] QA warning for files in /var/{cache,lock,run}/ or /run/ Mike Frysinger

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=201312110257.22262.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=SebastianLuther@gmx.de \
    --cc=gentoo-portage-dev@lists.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