From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 38ECD1396D9 for ; Sat, 11 Nov 2017 07:58:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 03B42E1013; Sat, 11 Nov 2017 07:58:32 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A4C93E0EB5 for ; Sat, 11 Nov 2017 07:58:31 +0000 (UTC) Received: from pomiot (d202-252.icpnet.pl [109.173.202.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 321A033C27B; Sat, 11 Nov 2017 07:58:29 +0000 (UTC) Message-ID: <1510387105.1210.2.camel@gentoo.org> Subject: Re: [gentoo-dev] Help testing ebuilds? golang/Fabio load balancer From: =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Date: Sat, 11 Nov 2017 08:58:25 +0100 In-Reply-To: <05c08f65-3cf6-67f4-621e-cf210fe2a82c@gentoo.org> References: <05c08f65-3cf6-67f4-621e-cf210fe2a82c@gentoo.org> Organization: Gentoo Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.24.5 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: dfe1db94-a725-4890-9282-91ddade0d2f7 X-Archives-Hash: 5bec4408963321daeb36d1c64d224ac6 W dniu pią, 10.11.2017 o godzinie 19∶21 -0500, użytkownik Michael Orlitzky napisał: > On 11/10/2017 04:36 PM, Damo Brisbane wrote: > > > > Re for...keepdir, I found removing it then the /var/log/fabio folders > > were not getting created, so keeping it in there. > > You need to tell the ebuild to create that directory one way or another. > The "dodir" function will create the directory, but without the ".keep" > file inside of it. However that may be "illegal" in this case; see below. > > > > http://www.calculate-linux.org/main/en/using_ebuild, says this of *keepdir*: > > > > *Creates (if necessary) a |.keep| file in the given directory so that it > > isn't auto-cleaned. Never create a |.keep| file yourself. If Portage > > changes how |keepdir| works, then creating the file yourself will break > > the package.* > > To my knowledge, no package manager will remove a non-empty directory, > nor will it remove anything that the package manager did not itself > create. To me that raises a question: why would I ever want to keep > around an (otherwise empty) directory that was created by the package > manager? > > I found this, > > https://dev.gentoo.org/~ulm/pms/head/pms.html#x1-15100013.2.2 > > which states > > Behaviour upon encountering an empty directory is undefined. Ebuilds > must not attempt to install an empty directory. > > Certainly "keepdir" will make the directory non-empty, but with the > additional (unwanted) side-effect that the directory won't be removed > when the package is uninstalled. Thus "keepdir" doesn't seem like it was > intended to address that technicality. So, I have two questions now... Wrong. It creates a dotfile inside it, and removes it along with it. > > a) When would you want to use keepdir? Because it works. > > b) What's the right way to prevent a directory from being empty? Touch > a dummy file? Use keepdir. > > and a meta-question, > > c) Seriously, empty directories are undefined behavior? ...and how could they be defined if a directory can be installed by multiple packages and has no explicit ownership? -- Best regards, Michał Górny