Ejemplo n.º 1
0
def create(builder,
           name,
           role,
           pkgs_and_roles,
           custom_depmod=None,
           subdir="/lib/modules"):
    """
    Create a depmod_merge . It will depend on each of the mentioned packages.

    pkgs is a list of (pkg, role) pairs.

    We return the depmod_merge we've created.
    """

    action = MergeDepModBuilder(name, role, custom_depmod)

    pkg.add_package_rules(builder.ruleset, name, role, action)
    pkg.do_depend(builder, name, [role], pkgs_and_roles)

    for (pname, role) in pkgs_and_roles:
        lbl = depend.Label(utils.LabelType.Package, pname, role,
                           utils.LabelTag.PostInstalled)
        action.add_label(lbl, subdir)

    return action
Ejemplo n.º 2
0
def create(builder, name, role,
           pkgs_and_roles,
           custom_depmod = None,
           subdir = "/lib/modules"):
    """
    Create a depmod_merge . It will depend on each of the mentioned packages.

    pkgs is a list of (pkg, role) pairs.

    We return the depmod_merge we've created.
    """

    action = MergeDepModBuilder(name, role, custom_depmod)

    pkg.add_package_rules(builder.ruleset, name, role, action)
    pkg.do_depend(builder, name, [role], pkgs_and_roles)

    for (pname, role) in pkgs_and_roles:
        lbl = depend.Label(utils.LabelType.Package,
                           pname,
                           role,
                           utils.LabelTag.PostInstalled)
        action.add_label(lbl, subdir)

    return action
Ejemplo n.º 3
0
def expanding_package(builder, name, archive_dir,
                      role, co_name, co_dir,
                      makefile=DEFAULT_MAKEFILE_NAME, deps=None,
                      archive_file=None, archive_ext='.tar.bz2',):
    """Specify how to expand and build an archive file.

    As normal, 'name' is the package name, 'role' is the role to build it in,
    'co_name' is the name of the checkout, and 'co_dir' is the directory in
    which that lives.

    We expect to unpack an archive

        <co_dir>/<co_name>/<archive_dir><archive_ext>

    into $(MUDDLE_OBJ)/<archive_dir>. (NB: if the archive file does not expand into
    a directory of the obvious name, you can specify the archive file name separately,
    using 'archive_file').

    So, for instance, all of our X11 "stuff" lives in checkout "X11R7.5" which is
    put into directory "x11" -- i.e., "src/X11/X11R7.5".

    That lets us keep stuff together in the repository, without leading to
    a great many packages that are of no direct interest to anyone else.

    Within that we then have various muddle makefiles, and a set of .tar.bz
    archive files.

    1. The archive file expands into a directory called 'archive_dir'
    2. It is assumed that the archive file is named 'archive_dir' + 'archive_ext'.
       If this is not so, then specify 'archive_file' (and/or 'archive_ext')
       appropriately.

    This function is used to say: take the named archive file, use package name
    'name', unpack the archive file into $(MUDDLE_OBJ_OBJ), and build it using
    the named muddle makefile.

    This allows various things to be build with the same makefile, which is useful
    for (for instance) X11 proto[type] archives.

    Note that in $(MUDDLE_OBJ), 'obj' (i.e., $(MUDDLE_OBJ_OBJ)) will be a soft link
    to the expanded archive directory.
    """
    if archive_file is None:
        archive_file = archive_dir + archive_ext

    # Define how to build our package
    dep = ExpandingMakeBuilder(name, role, co_name, archive_file, archive_dir, makefile)
    pkg.add_package_rules(builder.ruleset, name, role, dep)

    # It depends on the checkout
    pkg.package_depends_on_checkout(builder.ruleset, name, role, co_name)

    # And maybe on other packages
    if deps:
        pkg.do_depend(builder, name, [role], deps)
Ejemplo n.º 4
0
def add_deps(builder, merger, deps, subdir="/lib/modules"):
    """
    Add a set of packages and roles to this merger as packages which create
    linux kernel modules. deps is a list of (pkg,role)
    """
    pkg.do_depend(builder, merger.name, [merger.role], deps)

    for (pname, role) in deps:
        lbl = depend.Label(utils.LabelType.Package, pname, role,
                           utils.LabelTag.PostInstalled)
        merger.add_label(lbl, subdir)
Ejemplo n.º 5
0
def add_deps(builder, merger, deps, subdir = "/lib/modules"):
    """
    Add a set of packages and roles to this merger as packages which create
    linux kernel modules. deps is a list of (pkg,role)
    """
    pkg.do_depend(builder, merger.name, [ merger.role ],
                  deps)

    for (pname, role) in deps:
        lbl = depend.Label(utils.LabelType.Package,
                           pname,
                           role,
                           utils.LabelTag.PostInstalled)
        merger.add_label(lbl, subdir)
Ejemplo n.º 6
0
def expanding_package(
    builder,
    name,
    archive_dir,
    role,
    co_name,
    co_dir,
    makefile=DEFAULT_MAKEFILE_NAME,
    deps=None,
    archive_file=None,
    archive_ext='.tar.bz2',
):
    """Specify how to expand and build an archive file.

    As normal, 'name' is the package name, 'role' is the role to build it in,
    'co_name' is the name of the checkout, and 'co_dir' is the directory in
    which that lives.

    We expect to unpack an archive

        <co_dir>/<co_name>/<archive_dir><archive_ext>

    into $(MUDDLE_OBJ)/<archive_dir>. (NB: if the archive file does not expand into
    a directory of the obvious name, you can specify the archive file name separately,
    using 'archive_file').

    So, for instance, all of our X11 "stuff" lives in checkout "X11R7.5" which is
    put into directory "x11" -- i.e., "src/X11/X11R7.5".

    That lets us keep stuff together in the repository, without leading to
    a great many packages that are of no direct interest to anyone else.

    Within that we then have various muddle makefiles, and a set of .tar.bz
    archive files.

    1. The archive file expands into a directory called 'archive_dir'
    2. It is assumed that the archive file is named 'archive_dir' + 'archive_ext'.
       If this is not so, then specify 'archive_file' (and/or 'archive_ext')
       appropriately.

    This function is used to say: take the named archive file, use package name
    'name', unpack the archive file into $(MUDDLE_OBJ_OBJ), and build it using
    the named muddle makefile.

    This allows various things to be build with the same makefile, which is useful
    for (for instance) X11 proto[type] archives.

    Note that in $(MUDDLE_OBJ), 'obj' (i.e., $(MUDDLE_OBJ_OBJ)) will be a soft link
    to the expanded archive directory.
    """
    if archive_file is None:
        archive_file = archive_dir + archive_ext

    # Define how to build our package
    dep = ExpandingMakeBuilder(name, role, co_name, archive_file, archive_dir,
                               makefile)
    pkg.add_package_rules(builder.ruleset, name, role, dep)

    # It depends on the checkout
    pkg.package_depends_on_checkout(builder.ruleset, name, role, co_name)

    # And maybe on other packages
    if deps:
        pkg.do_depend(builder, name, [role], deps)