Gentoo Archives: gentoo-portage-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-portage-dev@l.g.o
Cc: SebastianLuther@×××.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 07:57:21
Message-Id: 201312110257.22262.vapier@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH] QA warning for files in /var/{cache,lib,lock,run}/ or /run/ (bug 493154) by SebastianLuther@gmx.de
1 On Thursday 05 December 2013 15:57:17 SebastianLuther@×××.de wrote:
2 > --- a/bin/misc-functions.sh
3 > +++ b/bin/misc-functions.sh
4 > @@ -242,6 +242,11 @@ install_qa_check() {
5 > [[ -d ${ED}/$x ]] && f+=" $x\n"
6 > done
7 >
8 > + # It's ok create these directories, but not to install into them. (bug
9 > 493154)
10
11 our style uses #12345 rather than (bug 12345)
12 # It's ok create these directories, but not to install into them. #493154
13
14 > + for x in var/cache var/lib var/lock var/run run ; do
15 > + [[ -d ${ED}/$x ]] && [[ $(find "${ED}/${x}" -prune -empty) = "" ]] &&
16 > f+=" $x\n"
17
18 the -d check doesn't handle symlinks correctly ... baselayout would install
19 /var/run -> /run, and the -d would deref that to the real symlink. however,
20 `find` will not descend into the symlink, so we end up being saved by that.
21
22 we have -z for detecting empty output rather than comparing to an empty string
23
24 non-builtin vars should use braces, so that'd be ${x}. i know some of the
25 code in here doesn't follow that, but we should be marching in that direction
26 with new code.
27
28 > if [[ -n $f ]] ; then
29 > eqawarn "QA Notice: This ebuild installs into the following
30 deprecated directories:"
31
32 this warning is incorrect for these paths. we need to create a new warning
33 that clearly explains what is going on.
34
35 i'll send out a new version.
36 -mike

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies