Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] tcl: rework logic for databases support
Date: Wed, 30 Mar 2016 16:39:24 +0100	[thread overview]
Message-ID: <56FBF32C.7070802@imgtec.com> (raw)
In-Reply-To: <20160330173503.2e710605@free-electrons.com>

Hi Thomas,

On 30/03/16 16:35, Thomas Petazzoni wrote:
> Hello,
> 
> On Wed, 30 Mar 2016 16:21:22 +0100, Vicente Olivert Riera wrote:
> 
>> @@ -32,7 +27,7 @@ HOST_TCL_CONF_OPTS = \
>>  # I haven't found a good way to force pkgs to not build
>>  # or configure without just removing the entire pkg directory.
>>  define HOST_TCL_REMOVE_PACKAGES
>> -	rm -fr $(@D)/pkgs/sqlite[0-9].[0-9].[0-9] \
>> +	rm -fr $(@D)/pkgs/sqlite[0-9].[0-9][0-9].[0-9] \
>>  		$(@D)/pkgs/tdbc[0-9].[0-9].[0-9] \
>>  		$(@D)/pkgs/tdbcmysql[0-9].[0-9].[0-9] \
>>  		$(@D)/pkgs/tdbcodbc[0-9].[0-9].[0-9] \
> 
> Could we switch to using * instead of this silly [0-9] thing? So:
> 
> 	rm -rf $(@D)/pkgs/sqlite* $(@D)/pkgs/tdbc* ...

No problem.

>> @@ -41,11 +36,10 @@ define HOST_TCL_REMOVE_PACKAGES
>>  endef
>>  HOST_TCL_PRE_CONFIGURE_HOOKS += HOST_TCL_REMOVE_PACKAGES
>>  define TCL_REMOVE_PACKAGES
>> -	rm -fr $(if $(BR2_PACKAGE_SQLITE),,$(@D)/pkgs/sqlite[0-9].[0-9].[0-9]) \
>> -		$(if $(BR2_PACKAGE_SQLITE),,$(@D)/pkgs/tdbc[0-9].[0-9].[0-9]) \
>> -		$(@D)/pkgs/tdbcmysql[0-9].[0-9].[0-9] \
>> +	rm -fr $(@D)/pkgs/sqlite[0-9].[0-9][0-9].[0-9] \
>> +		$(if $(BR2_PACKAGE_MYSQL),,$(@D)/pkgs/tdbcmysql[0-9].[0-9].[0-9]) \
>>  		$(@D)/pkgs/tdbcodbc[0-9].[0-9].[0-9] \
>> -		$(@D)/pkgs/tdbcpostgres[0-9].[0-9].[0-9] \
>> +		$(if $(BR2_PACKAGE_POSTGRESQL),,$(@D)/pkgs/tdbcpostgres[0-9].[0-9].[0-9]) \
>>  		$(if $(BR2_PACKAGE_SQLITE),,$(@D)/pkgs/tdbcsqlite3-[0-9].[0-9].[0-9])
> 
> OK, I think this would need a comment above to explain what's going on,
> it's not trivial to understand why you're removing sqlite and tdbcodbc
> unconditionally, and tdbcpostgresq/tdbcsqlite conditionally.

We remove sqlite unconditionally because we don't want to use the
bundled version.

For tdbcodbc I don't have any particular reason to remove it or keep it.
What do you prefer?

> 
>>  endef
>>  TCL_PRE_CONFIGURE_HOOKS += TCL_REMOVE_PACKAGES
>> @@ -82,6 +76,8 @@ endef
>>  TCL_POST_INSTALL_TARGET_HOOKS += TCL_REMOVE_EXTRA
>>  
>>  TCL_DEPENDENCIES = $(if $(BR2_PACKAGE_SQLITE),sqlite)
>> +TCL_DEPENDENCIES += $(if $(BR2_PACKAGE_MYSQL),mysql)
>> +TCL_DEPENDENCIES += $(if $(BR2_PACKAGE_POSTGRESQL),postgresql)
> 
> TCL_DEPENDENCIES = \
> 	$(if ...) \
> 	$(if ...)
> 
> Would be nicer.

That was my first approach and I didn't look nicer to me, so I changed
it :P Anyway, if you prefer that way, I'll do it that way, no problem.

> Maybe this calls for three patches:
> 
>  1/ Switch to * instead of [0-9]
>  2/ Fix the sqlite usage
>  3/ Enable postgresql/mysql usage

I agree. Please answer my question about tdbcodbc and I will write those
three patches.

Regards,

Vincent.

> Thanks!
> 
> Thomas
> 

  reply	other threads:[~2016-03-30 15:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-30 15:21 [Buildroot] [PATCH] tcl: rework logic for databases support Vicente Olivert Riera
2016-03-30 15:35 ` Thomas Petazzoni
2016-03-30 15:39   ` Vicente Olivert Riera [this message]
2016-03-30 15:41     ` Thomas Petazzoni
2016-03-30 15:43       ` Vicente Olivert Riera
2016-03-30 19:03     ` Arnout Vandecappelle
2016-03-30 19:06       ` Thomas Petazzoni
2016-03-30 19:49         ` Arnout Vandecappelle

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=56FBF32C.7070802@imgtec.com \
    --to=vincent.riera@imgtec.com \
    --cc=buildroot@busybox.net \
    /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