[libcamera-devel] gitignore: Ignore all build directories

Message ID 20200604084908.3776979-1-kieran.bingham@ideasonboard.com
State Rejected
Delegated to: Kieran Bingham
Headers show
Series
  • [libcamera-devel] gitignore: Ignore all build directories
Related show

Commit Message

Kieran Bingham June 4, 2020, 8:49 a.m. UTC
It can be common to have multiple build directories with different
configurations. Ignore them all.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
 .gitignore | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Laurent Pinchart June 4, 2020, 9:07 a.m. UTC | #1
Hi Kieran,

Thank you for the patch.

On Thu, Jun 04, 2020 at 09:49:08AM +0100, Kieran Bingham wrote:
> It can be common to have multiple build directories with different
> configurations. Ignore them all.
> 
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> ---
>  .gitignore | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/.gitignore b/.gitignore
> index f989dee3bcb0..aecf971d30aa 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -1,5 +1,5 @@
>  __pycache__/
> -build/
> +*build*/

That's a bit of a too generic pattern, we could later have a directory
with build in its name.

I personally have a single build/ directory directly at the root of the
source tree, and create subdirectories there for different builds. All
it requires is 'meson setup ../..' instead of 'meson setup ..' (and it
works fine with the the run-from-build-dir support we have). Could that
be a solution you would consider instead of this patch ?

>  patches/
>  *.patch
>  *.pyc
Kieran Bingham June 4, 2020, 9:09 a.m. UTC | #2
On 04/06/2020 10:07, Laurent Pinchart wrote:
> Hi Kieran,
> 
> Thank you for the patch.
> 
> On Thu, Jun 04, 2020 at 09:49:08AM +0100, Kieran Bingham wrote:
>> It can be common to have multiple build directories with different
>> configurations. Ignore them all.
>>
>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
>> ---
>>  .gitignore | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/.gitignore b/.gitignore
>> index f989dee3bcb0..aecf971d30aa 100644
>> --- a/.gitignore
>> +++ b/.gitignore
>> @@ -1,5 +1,5 @@
>>  __pycache__/
>> -build/
>> +*build*/
> 
> That's a bit of a too generic pattern, we could later have a directory
> with build in its name.
> 
> I personally have a single build/ directory directly at the root of the
> source tree, and create subdirectories there for different builds. All
> it requires is 'meson setup ../..' instead of 'meson setup ..' (and it
> works fine with the the run-from-build-dir support we have). Could that
> be a solution you would consider instead of this patch ?


how about ./*build*/ to only match on the root then.


>>  patches/
>>  *.patch
>>  *.pyc
>
Laurent Pinchart June 4, 2020, 9:15 a.m. UTC | #3
On Thu, Jun 04, 2020 at 10:09:54AM +0100, Kieran Bingham wrote:
> On 04/06/2020 10:07, Laurent Pinchart wrote:
> > Hi Kieran,
> > 
> > Thank you for the patch.
> > 
> > On Thu, Jun 04, 2020 at 09:49:08AM +0100, Kieran Bingham wrote:
> >> It can be common to have multiple build directories with different
> >> configurations. Ignore them all.
> >>
> >> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> >> ---
> >>  .gitignore | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/.gitignore b/.gitignore
> >> index f989dee3bcb0..aecf971d30aa 100644
> >> --- a/.gitignore
> >> +++ b/.gitignore
> >> @@ -1,5 +1,5 @@
> >>  __pycache__/
> >> -build/
> >> +*build*/
> > 
> > That's a bit of a too generic pattern, we could later have a directory
> > with build in its name.
> > 
> > I personally have a single build/ directory directly at the root of the
> > source tree, and create subdirectories there for different builds. All
> > it requires is 'meson setup ../..' instead of 'meson setup ..' (and it
> > works fine with the the run-from-build-dir support we have). Could that
> > be a solution you would consider instead of this patch ?
> 
> how about ./*build*/ to only match on the root then.

I'm still cautious about patterns that could have unexpected matches :-)
And what if someone wants to name their build directories differently ?
I think .gitignore should include minimal policy, if we can restrict
ignoring the builds to a single directory, I'd prefer that (I'm even
tempted to say we shouldn't include build/ in .gitignore, but I agree
it's useful).

> >>  patches/
> >>  *.patch
> >>  *.pyc
Kieran Bingham June 4, 2020, 9:22 a.m. UTC | #4
On 04/06/2020 10:15, Laurent Pinchart wrote:
> On Thu, Jun 04, 2020 at 10:09:54AM +0100, Kieran Bingham wrote:
>> On 04/06/2020 10:07, Laurent Pinchart wrote:
>>> Hi Kieran,
>>>
>>> Thank you for the patch.
>>>
>>> On Thu, Jun 04, 2020 at 09:49:08AM +0100, Kieran Bingham wrote:
>>>> It can be common to have multiple build directories with different
>>>> configurations. Ignore them all.
>>>>
>>>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
>>>> ---
>>>>  .gitignore | 2 +-
>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/.gitignore b/.gitignore
>>>> index f989dee3bcb0..aecf971d30aa 100644
>>>> --- a/.gitignore
>>>> +++ b/.gitignore
>>>> @@ -1,5 +1,5 @@
>>>>  __pycache__/
>>>> -build/
>>>> +*build*/
>>>
>>> That's a bit of a too generic pattern, we could later have a directory
>>> with build in its name.
>>>
>>> I personally have a single build/ directory directly at the root of the
>>> source tree, and create subdirectories there for different builds. All
>>> it requires is 'meson setup ../..' instead of 'meson setup ..' (and it
>>> works fine with the the run-from-build-dir support we have). Could that
>>> be a solution you would consider instead of this patch ?
>>
>> how about ./*build*/ to only match on the root then.
> 
> I'm still cautious about patterns that could have unexpected matches :-)
> And what if someone wants to name their build directories differently ?

Does anyone else have multiple builds at the root?

> I think .gitignore should include minimal policy, if we can restrict
> ignoring the builds to a single directory, I'd prefer that (I'm even
> tempted to say we shouldn't include build/ in .gitignore, but I agree
> it's useful).

Never mind, I'll carry it locally.



> 
>>>>  patches/
>>>>  *.patch
>>>>  *.pyc
>
Umang Jain June 4, 2020, 9:22 a.m. UTC | #5
I think my mail client didn't sync up fully before me writing my last reply.

On 6/4/20 2:45 PM, Laurent Pinchart wrote:
> On Thu, Jun 04, 2020 at 10:09:54AM +0100, Kieran Bingham wrote:
>> On 04/06/2020 10:07, Laurent Pinchart wrote:
>>> Hi Kieran,
>>>
>>> Thank you for the patch.
>>>
>>> On Thu, Jun 04, 2020 at 09:49:08AM +0100, Kieran Bingham wrote:
>>>> It can be common to have multiple build directories with different
>>>> configurations. Ignore them all.
>>>>
>>>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
>>>> ---
>>>>   .gitignore | 2 +-
>>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/.gitignore b/.gitignore
>>>> index f989dee3bcb0..aecf971d30aa 100644
>>>> --- a/.gitignore
>>>> +++ b/.gitignore
>>>> @@ -1,5 +1,5 @@
>>>>   __pycache__/
>>>> -build/
>>>> +*build*/
>>> That's a bit of a too generic pattern, we could later have a directory
>>> with build in its name.
>>>
>>> I personally have a single build/ directory directly at the root of the
>>> source tree, and create subdirectories there for different builds. All
>>> it requires is 'meson setup ../..' instead of 'meson setup ..' (and it
>>> works fine with the the run-from-build-dir support we have). Could that
>>> be a solution you would consider instead of this patch ?
>> how about ./*build*/ to only match on the root then.
> I'm still cautious about patterns that could have unexpected matches :-)
> And what if someone wants to name their build directories differently ?
> I think .gitignore should include minimal policy, if we can restrict
> ignoring the builds to a single directory, I'd prefer that (I'm even
> tempted to say we shouldn't include build/ in .gitignore, but I agree

After reading this reasoning, I remembered that I have seen directories

like 'build-aux/' at many places(which is part of the git repo) and 
generally contains various

packaging specs for distros and their components. So maybe, we need to think

little bit more..

> it's useful).
>
>>>>   patches/
>>>>   *.patch
>>>>   *.pyc
Kieran Bingham June 4, 2020, 9:26 a.m. UTC | #6
Hi Umang,

On 04/06/2020 10:22, Umang Jain wrote:
> I think my mail client didn't sync up fully before me writing my last
> reply.
> 
> On 6/4/20 2:45 PM, Laurent Pinchart wrote:
>> On Thu, Jun 04, 2020 at 10:09:54AM +0100, Kieran Bingham wrote:
>>> On 04/06/2020 10:07, Laurent Pinchart wrote:
>>>> Hi Kieran,
>>>>
>>>> Thank you for the patch.
>>>>
>>>> On Thu, Jun 04, 2020 at 09:49:08AM +0100, Kieran Bingham wrote:
>>>>> It can be common to have multiple build directories with different
>>>>> configurations. Ignore them all.
>>>>>
>>>>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
>>>>> ---
>>>>>   .gitignore | 2 +-
>>>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/.gitignore b/.gitignore
>>>>> index f989dee3bcb0..aecf971d30aa 100644
>>>>> --- a/.gitignore
>>>>> +++ b/.gitignore
>>>>> @@ -1,5 +1,5 @@
>>>>>   __pycache__/
>>>>> -build/
>>>>> +*build*/
>>>> That's a bit of a too generic pattern, we could later have a directory
>>>> with build in its name.
>>>>
>>>> I personally have a single build/ directory directly at the root of the
>>>> source tree, and create subdirectories there for different builds. All
>>>> it requires is 'meson setup ../..' instead of 'meson setup ..' (and it
>>>> works fine with the the run-from-build-dir support we have). Could that
>>>> be a solution you would consider instead of this patch ?
>>> how about ./*build*/ to only match on the root then.
>> I'm still cautious about patterns that could have unexpected matches :-)
>> And what if someone wants to name their build directories differently ?
>> I think .gitignore should include minimal policy, if we can restrict
>> ignoring the builds to a single directory, I'd prefer that (I'm even
>> tempted to say we shouldn't include build/ in .gitignore, but I agree
> 
> After reading this reasoning, I remembered that I have seen directories
> 
> like 'build-aux/' at many places(which is part of the git repo) and
> generally contains various

Isn't that an autotools generated directory ? (while we use meson)?

Anyway, if this issue doesn't affect anyone else I'll just keep the
change locally.


> packaging specs for distros and their components. So maybe, we need to
> think
> 
> little bit more..
> 
>> it's useful).
>>
>>>>>   patches/
>>>>>   *.patch
>>>>>   *.pyc
Umang Jain June 4, 2020, 9:33 a.m. UTC | #7
Hi Kieran,

On 6/4/20 2:56 PM, Kieran Bingham wrote:
> Hi Umang,
>
> On 04/06/2020 10:22, Umang Jain wrote:
>> I think my mail client didn't sync up fully before me writing my last
>> reply.
>>
>> On 6/4/20 2:45 PM, Laurent Pinchart wrote:
>>> On Thu, Jun 04, 2020 at 10:09:54AM +0100, Kieran Bingham wrote:
>>>> On 04/06/2020 10:07, Laurent Pinchart wrote:
>>>>> Hi Kieran,
>>>>>
>>>>> Thank you for the patch.
>>>>>
>>>>> On Thu, Jun 04, 2020 at 09:49:08AM +0100, Kieran Bingham wrote:
>>>>>> It can be common to have multiple build directories with different
>>>>>> configurations. Ignore them all.
>>>>>>
>>>>>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
>>>>>> ---
>>>>>>    .gitignore | 2 +-
>>>>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>>
>>>>>> diff --git a/.gitignore b/.gitignore
>>>>>> index f989dee3bcb0..aecf971d30aa 100644
>>>>>> --- a/.gitignore
>>>>>> +++ b/.gitignore
>>>>>> @@ -1,5 +1,5 @@
>>>>>>    __pycache__/
>>>>>> -build/
>>>>>> +*build*/
>>>>> That's a bit of a too generic pattern, we could later have a directory
>>>>> with build in its name.
>>>>>
>>>>> I personally have a single build/ directory directly at the root of the
>>>>> source tree, and create subdirectories there for different builds. All
>>>>> it requires is 'meson setup ../..' instead of 'meson setup ..' (and it
>>>>> works fine with the the run-from-build-dir support we have). Could that
>>>>> be a solution you would consider instead of this patch ?
>>>> how about ./*build*/ to only match on the root then.
>>> I'm still cautious about patterns that could have unexpected matches :-)
>>> And what if someone wants to name their build directories differently ?
>>> I think .gitignore should include minimal policy, if we can restrict
>>> ignoring the builds to a single directory, I'd prefer that (I'm even
>>> tempted to say we shouldn't include build/ in .gitignore, but I agree
>> After reading this reasoning, I remembered that I have seen directories
>>
>> like 'build-aux/' at many places(which is part of the git repo) and
>> generally contains various
> Isn't that an autotools generated directory ? (while we use meson)?

I have seen these directory structures for consolidating various

packaging build formats under one directory - `build-aux/` : 
https://u15657259.ct.sendgrid.net/ls/click?upn=8H1KCc2bev8KdIveckpOEHWT1OrCdEOC9SiouJ35asUHkBzk4ylLE8WdFL-2Bscv2-2B620Dh4UC8H7psejRuWZa16XCh72Ct5Wbg9CRc8ChITw-3D-UAD_C3wFy2Q4UgRsRLDAYieRZ5Z3EhAWyy0-2FkOzyYc6FPc1dn6ROcAJqKXb9hjP566uP3uePquZjnTP33pt2nVf90BOSXVYWUKO1C2kiYnS9g0sA8hs0EtM0MAr-2FFcDqxncAiWaS6o3jhifJT9iVqRmA7LSkV87foigsz3qKIMQxf6dxqc14NA3thZavRTEaQe4ZQ-2FgYtFOIS1TqwX9p-2Blgaa8-2FhUO7KmjmAuPUcBuC3Z-2BYCH-2F3Le5Ul86QxZ8Fpoqof

It might have *also* been autotools generated dir, though I think I haven't

came across that.

>
> Anyway, if this issue doesn't affect anyone else I'll just keep the
> change locally.
>
>
>> packaging specs for distros and their components. So maybe, we need to
>> think
>>
>> little bit more..
>>
>>> it's useful).
>>>
>>>>>>    patches/
>>>>>>    *.patch
>>>>>>    *.pyc
Jacopo Mondi June 4, 2020, 1:43 p.m. UTC | #8
Hi Kieran,

On Thu, Jun 04, 2020 at 10:22:11AM +0100, Kieran Bingham wrote:
>
>
> On 04/06/2020 10:15, Laurent Pinchart wrote:
> > On Thu, Jun 04, 2020 at 10:09:54AM +0100, Kieran Bingham wrote:
> >> On 04/06/2020 10:07, Laurent Pinchart wrote:
> >>> Hi Kieran,
> >>>
> >>> Thank you for the patch.
> >>>
> >>> On Thu, Jun 04, 2020 at 09:49:08AM +0100, Kieran Bingham wrote:
> >>>> It can be common to have multiple build directories with different
> >>>> configurations. Ignore them all.
> >>>>
> >>>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> >>>> ---
> >>>>  .gitignore | 2 +-
> >>>>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>>>
> >>>> diff --git a/.gitignore b/.gitignore
> >>>> index f989dee3bcb0..aecf971d30aa 100644
> >>>> --- a/.gitignore
> >>>> +++ b/.gitignore
> >>>> @@ -1,5 +1,5 @@
> >>>>  __pycache__/
> >>>> -build/
> >>>> +*build*/
> >>>
> >>> That's a bit of a too generic pattern, we could later have a directory
> >>> with build in its name.
> >>>
> >>> I personally have a single build/ directory directly at the root of the
> >>> source tree, and create subdirectories there for different builds. All
> >>> it requires is 'meson setup ../..' instead of 'meson setup ..' (and it
> >>> works fine with the the run-from-build-dir support we have). Could that
> >>> be a solution you would consider instead of this patch ?
> >>
> >> how about ./*build*/ to only match on the root then.
> >
> > I'm still cautious about patterns that could have unexpected matches :-)
> > And what if someone wants to name their build directories differently ?
>
> Does anyone else have multiple builds at the root?
>
Currently 4
I the past I had more...

build-aarch64
build-armv7
build-clang
build-gcc

> > I think .gitignore should include minimal policy, if we can restrict
> > ignoring the builds to a single directory, I'd prefer that (I'm even
> > tempted to say we shouldn't include build/ in .gitignore, but I agree
> > it's useful).
>
> Never mind, I'll carry it locally.
>
>
>
> >
> >>>>  patches/
> >>>>  *.patch
> >>>>  *.pyc
> >
>
> --
> Regards
> --
> Kieran
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

Patch

diff --git a/.gitignore b/.gitignore
index f989dee3bcb0..aecf971d30aa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@ 
 __pycache__/
-build/
+*build*/
 patches/
 *.patch
 *.pyc