qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@gmail.com>,
	"Thomas Huth" <thuth@redhat.com>,
	qemu-devel@nongnu.org
Cc: famz@redhat.com
Subject: Re: [Qemu-devel] [PATCH] build-sys: generate tests/.gitignore
Date: Tue, 5 Sep 2017 15:49:08 -0500	[thread overview]
Message-ID: <49cae611-f2fc-e6ef-d122-b498f20c05d8@redhat.com> (raw)
In-Reply-To: <CAJ+F1CLaz9KsPWG+_h1H=dwmY0EgAfcq6r2dAJvfvJz8JB5cBA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2496 bytes --]

On 09/05/2017 05:42 AM, Marc-André Lureau wrote:
> 
> I understand the feeling, I do also mostly out of tree build. However, I
> don't think it makes much sense to generate .gitignore in the build dir.
> It's git related, and in the git source dir, you have .git that is writable
> already: it'd be odd that the git wortree/srcdir is read-only, and the
> point is to generate .gitignore. Not so true with tarballs though.
> 
> I wrote this patch inspired by how the
> https://github.com/behdad/git.mk/blob/master/git.mk rules does it (it is
> uses by many GNOME projects and others with autoconf). The way it gets away
> with not touching the srcdir in non-git tree, is that the git.mk file is
> not shipped in distributed tarball. We could have a similar approach if
> necessary.

Shipping .gitignore in the tarball is not necessary; it's main benefit
is for in-tree development.

> 
> Another alternative, which I find much less appealing, is that qemu tree
> keeps shipping .gitignore, and we just add a manual rule to maintain it.

Keeping .gitignore in git, if it is generated, is a pain, because then
we have to manually resync it every time it gets out of date (and we're
already demonstrating that we forget to update .gitignore with new
tests).  This patch is only worthwhile if it reduces maintainer
overhead, but not if it trades one task for another.

> 
> You suggested using more test* *test etc wildcards. I think this is bad, I
> would rather have a precise .gitignore, and not ignore extra files that are
> not part of the build-system. I couldn't find a simple way to generate
> precise rules for intermediary files (like .o etc), but for end targets,
> this patch demonstrates it can be done quite easily.
> 
> Finally, there is this trend these days with meson to not even allow
> in-tree build, and thus no need for .gitignore..

Please don't go the direction of forbidding in-tree builds.  While I am
a BIG fan of VPATH builds, I'm also a big fan of in-tree builds (it's
slightly faster to do a one-off in-tree build of a fresh git checkout
than it is to set up yet another VPATH build directory).  Projects that
force one way or the other are annoying.  I see no reason why we should
not keep both approaches working, particularly if we have patchew or
other automation that covers both styles.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]

  reply	other threads:[~2017-09-05 20:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-04  9:03 [Qemu-devel] [PATCH] build-sys: generate tests/.gitignore Marc-André Lureau
2017-09-04 10:20 ` Thomas Huth
2017-09-05 10:42   ` Marc-André Lureau
2017-09-05 20:49     ` Eric Blake [this message]
2017-09-06  6:27       ` Markus Armbruster
2017-09-06  5:05     ` Thomas Huth
2017-09-05 20:43 ` Eric Blake

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=49cae611-f2fc-e6ef-d122-b498f20c05d8@redhat.com \
    --to=eblake@redhat.com \
    --cc=famz@redhat.com \
    --cc=marcandre.lureau@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).