ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ltib] Inter-package dependencies


From: Stuart Hughes
Subject: Re: [Ltib] Inter-package dependencies
Date: Sun, 18 Sep 2011 11:40:08 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Lightning/1.0b2 Thunderbird/3.1.7

Hi Peter,

There are currently only 2 mechanisms for inter-package dependencies
right now. You probably know already, but for others' benefit:

1. The static .lkc stuff where in the packages.lkc you say for example:

config PKG_BLUEZ_HCIDUMP
    depends CAP_HAS_MMU
    bool "bluez-hcidump"
    select PKG_BLUEZ_LIBS

This means if you select bluez-hcidump during configuration, it will
also turn-on (select)  PKG_BLUEZ_LIBS.

2. Inside of the ltib script, there are also data-structures:

# package config dependencies
# re-build the key (lhs) if any of the dependents (rhs) in the list have
changed
$config_deps = {

# package build dependencies
# rebuild all packages in the list (rhs) if the key (lhs) has been installed
$build_deps = { PKG_KERNEL => [ qw/PKG_MODEPS/ ],

# packages install dependencies
# re-install all the pkgs in the list (rhs) if the key (lhs) has been
installed
$install_deps = { PKG_SKELL => [ qw/PKG_SYSCONFIG/ ],
                  PKG_BUSYBOX => [ qw/PKG_INETUTILS PKG_SYSKLOGD

I think  you're referring to 2.

It would be better to somehow bring those out to an external file and
also be able to specify per-platform overrides/additions.

I don't think it would be that hard, but it would take some time if you
include all the testing etc that needs to be done.

If you fancy trying to implement this, that would be good.  To start you
could do something simple/hacky like including a file (perl data
structure) as a string (if it exists) and then merging the data into the
relevant global structures.

So, for example you could have:

config/platform/_target_/package_deps.pl, with something like:

$config_deps = { };
$build_deps = { };
$install_deps = {};

Of course, fill out your data structure with some content.  Then in the
perl script say:

if ( my $res = do "config/platform/_target_/package.pl@ ) {
  _merge_results_into_globals_
}

I wish I had more time to try this out, but too busy right now.  A good
idea though and be great if you could add this.

Regards, Stuart





On 16/09/11 19:41, Peter Barada wrote:
> Stuart,
>
> Is there an easy way to add a dependency between packages into LTIB? 
> Currently its hard-coded into the ltib perl script and I was wondering
> if there's a way to have the ltib script include an optional script
> from the platform directory (before it goes off building packages) to
> allow a platform to specify inter-package dependencies?
>
> In my world I have modules/packages that depend on the kernel (and
> each other) and figure its a lot easier to have those dependencies be
> corralled into the platform directory as opposed to being in the ltib
> script itself.
>
> I'll be glad to try out stuff, but as my perl fu is pretty weak some
> guidance/suggestions are appreciated.
>
> Thanks in advance!
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]