From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 282AA138010 for ; Sun, 24 Mar 2013 14:13:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 94BBFE082D; Sun, 24 Mar 2013 14:12:39 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B3AB3E0828 for ; Sun, 24 Mar 2013 14:12:38 +0000 (UTC) Received: from pomiocik.lan (unknown [83.238.59.230]) (using SSLv3 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 6F83933D3D7; Sun, 24 Mar 2013 14:12:36 +0000 (UTC) Date: Sun, 24 Mar 2013 15:13:24 +0100 From: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= To: gentoo-dev@lists.gentoo.org Cc: ulm@gentoo.org Subject: Re: [gentoo-dev] [PATCH 1/2] Introduce multibuild_merge_root() to merge interim installs. Message-ID: <20130324151324.2aa3cd6b@pomiocik.lan> In-Reply-To: <20815.618.456234.421581@a1i15.kph.uni-mainz.de> References: <20130323172532.1b1100e2@pomiocik.lan> <1364055998-23674-1-git-send-email-mgorny@gentoo.org> <20813.57273.945749.854552@a1i15.kph.uni-mainz.de> <20130323182858.1846ba8d@pomiocik.lan> <20814.44957.706923.881677@a1i15.kph.uni-mainz.de> <20130324110931.3ef46f45@pomiocik.lan> <20815.618.456234.421581@a1i15.kph.uni-mainz.de> Organization: Gentoo X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.17; x86_64-pc-linux-gnu) 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-Type: multipart/signed; micalg=PGP-SHA512; boundary="Sig_/ekKN3MN1b6FK7UFW9jOVwuw"; protocol="application/pgp-signature" X-Archives-Salt: dc56c472-2200-49be-8f6e-37f5afe09d9d X-Archives-Hash: 1fb3a1627a9c5557adb1b0036f03ff47 --Sig_/ekKN3MN1b6FK7UFW9jOVwuw Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sun, 24 Mar 2013 14:40:58 +0100 Ulrich Mueller wrote: > >>>>> On Sun, 24 Mar 2013, Micha=C5=82 G=C3=B3rny wrote: >=20 > >> >> > +multibuild_merge_root() { > >> >> > + [...] > >> >> > + if type -P lockf &>/dev/null; then > >> >> > + # On BSD, we have 'lockf' wrapper. > >> >> > + tar -C "${src}" -f - -c . \ > >> >> > + | lockf "${lockfile}" tar -x -f - -C "${dest}" > >> >> > + else > >> >> > + [...] > >> >> > + cp -a -l -n "${src}"/. "${dest}"/ >=20 > >> Maybe explicitly testing for USERLAND would be less fragile? Or use > >> tar everywhere? >=20 > > I prefer something that can boom into face and let us know that it > > is broken rather than silent, poor catch-all. >=20 > How about adding a couple of "assert" and "die" to tar and cp then? Oh, I now see that the 'die' following the block does no longer catch all cases properly. I will fix that. Can you think of more assertions I should have there? Oh, I didn't reply to use of userland. I thought about using that but that would mean that I'd have to check all the userlands we support. But that's probably better than assuming that a system having 'lockf' has broken 'cp', true. I will send an updated patch as soon as I clean up the mess Samuli made with udev/systemd. --=20 Best regards, Micha=C5=82 G=C3=B3rny --Sig_/ekKN3MN1b6FK7UFW9jOVwuw Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iQJ8BAEBCgBmBQJRTwoEXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ1RUJGMjBGOTk2RkIzQzIyQ0M2RkNBNDBC QUJGMUQ1RkY4QzgxMTBBAAoJELq/HV/4yBEKOrYQAIOMgbTaCQoVWaSJpSLTIIEK MNNRSrUuAGNexyA/zD5Lg+eMV3UIHCGIdA5RJf3mnBoUZJ/wMT60EOTxtB2o6+K4 zQjyzR6Rug58UMWDjEgfiA4cjuXJxekp0oRFwKaG2jepXyjv8y6ON1K3xtTXU4LR FjqniFI6fSZRhwnoa9ssKRZDxSb2/5FFevmgmmR6QTfpMd9qnXnrLGRBcLzzZ85o KiO6yb/V4EfFRmS+6Crz4kiSWpZmdA7YHFt76NUfnm7MiiqMfebl3VgrY4iDBh65 JvYizeCDdFvpythJ3iOZwlqPug98sWrGKXmGp02LDxUKTYOGP3E2usv8rnHtVv4/ /M1DEB/YV5UOdhxxZ8VTrdvQiBVL+4FD16HzdX37wME67NtcuJDPq+/dAjQdhpTz IPjvo39ksAvdt053qZUTBkCOH7F/BMNRqX6MRr7Eaht8fQalPb/sDgjkh+qBId7M NOPaDnGwq21MopD+vtjLtdziYcVFp8KnStIoa/BY314WoRKnnuLjxAzbwbEHjxoa Nyq63gQdVjREtdoB+2iW+cPeaRbrEeYrV9CLCwOvFF/Zr92iA2j6KHfnhkLuPU5U /Z2DBqnQPjhc9uSzyN0JCZobcXv8cPF7+VXXfz+9xTHQ2AK7koiEv2pzgVkfEExU 9wpiK4ASShZCF7Dhka4v =GWbv -----END PGP SIGNATURE----- --Sig_/ekKN3MN1b6FK7UFW9jOVwuw--