From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58102) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7njP-0007zc-Qj for qemu-devel@nongnu.org; Tue, 31 May 2016 13:45:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b7njL-00055B-MH for qemu-devel@nongnu.org; Tue, 31 May 2016 13:45:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38200) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7njL-000556-Df for qemu-devel@nongnu.org; Tue, 31 May 2016 13:45:27 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A72E8C097271 for ; Tue, 31 May 2016 17:45:26 +0000 (UTC) References: <1464707044-10447-1-git-send-email-lersek@redhat.com> <20160531151418.GZ21628@redhat.com> <20160531154346.GB21628@redhat.com> <8d55914d-e57c-43e3-5319-28db331de5f8@redhat.com> From: Eric Blake Message-ID: <574DCDB5.5000208@redhat.com> Date: Tue, 31 May 2016 11:45:25 -0600 MIME-Version: 1.0 In-Reply-To: <8d55914d-e57c-43e3-5319-28db331de5f8@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="kHipXlH9PAkHLAr0wisrMNnIaV8iRn0O3" Subject: Re: [Qemu-devel] [PATCH] configure: save git working tree information in "pkgversion" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laszlo Ersek , "Daniel P. Berrange" Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --kHipXlH9PAkHLAr0wisrMNnIaV8iRn0O3 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/31/2016 11:01 AM, Laszlo Ersek wrote: >>> Grepping git's Documentation/RelNotes/ directory, I find: >>> - in "1.6.6.txt": the introduction of --dirty >>> - in "1.7.6.4.txt": an apparently important bugfix for --dirty >>> >>> Version 1.7.6.4 of git was tagged on Sep 23 2011. >>> >>> Does this information help in deciding if we can use --dirty? >> >> 5 years old sounds new enough for my liking :-) >> >> I guess we could use --dirty and catch the non-zero exit code and just= >> re-try without --dirty. >=20 > But, if we can't use --dirty, I should probably use the plus-sign > fallback (we need *something* to mark a dirty state). >=20 > In which case however, shouldn't we just go with the current patch, > which doesn't care about --dirty at all? Otherwise, some build hosts > will append "-dirty", and others will append "+". >=20 > IMO we should either require --dirty, or go with the current patch. Gnulib's build-aux/git-version-gen script doesn't yet use --dirty, but may be an inspiration for how to generate the same suffix: # Test whether to append the "-dirty" suffix only if the version # string we're using came from git. I.e., skip the test if it's "UNKNOWN= " # or if it came from .tarball-version. if test "x$v_from_git" !=3D x; then # Don't declare a version "dirty" merely because a time stamp has chang= ed. git update-index --refresh > /dev/null 2>&1 dirty=3D`exec 2>/dev/null;git diff-index --name-only HEAD` || dirty=3D case "$dirty" in '') ;; *) # Append the suffix only if there isn't one already. case $v in *-dirty) ;; *) v=3D"$v-dirty" ;; esac ;; esac fi --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --kHipXlH9PAkHLAr0wisrMNnIaV8iRn0O3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXTc21AAoJEKeha0olJ0Nq+m8H+gIwqKpnfllVs5W/WDkvn7oU j9SNvgciG/y7FvTwTNGFu5A2TdiP+rson04sqnW8BfAV/Oyo+9BgBiC9DDPU0Eap aM5ETG1aA1JDHVr00EtdztChEKbEw+TqrjwO3vc9ulm4oKgXTV8xB7aL9fXgLxxw L71c/WV2SZQtfPI760q7HHOkp5fgFAJ6mRvZl3GJcwDblzvnXKPL3kCiTfBw3f+n ruZKAS/FHqyw4H6A57s6wz2P7Isiq5nriDnyOsDW1IcEG2HCRf4UCec/dT+3cNbW XzC/o9chAYu9Cf4c+7UJGvvkQbZSDgVRGTb8Tx2qNIonLrE5L++FiVFwoApi6kA= =Zcmb -----END PGP SIGNATURE----- --kHipXlH9PAkHLAr0wisrMNnIaV8iRn0O3--