plover/plover.h
author J. Ali Harlow <ali@juiblex.co.uk>
Tue Feb 21 22:55:40 2012 +0000 (2012-02-21)
changeset 19 5cafc65a6183
parent 13 b0a35bae4961
child 24 2b9f54d14cc2
permissions -rw-r--r--
Port to razor 0.5.4
ali@0
     1
#ifndef __PLOVER_H__
ali@0
     2
#define __PLOVER_H__
ali@0
     3
ali@0
     4
#include <razor.h>
ali@0
     5
ali@0
     6
enum comps_requirement_type
ali@0
     7
{
ali@0
     8
    COMPS_REQUIREMENT_OPTIONAL,
ali@0
     9
    COMPS_REQUIREMENT_DEFAULT,
ali@0
    10
    COMPS_REQUIREMENT_MANDATORY,
ali@0
    11
    COMPS_REQUIREMENT_CONDITIONAL
ali@0
    12
};
ali@0
    13
ali@0
    14
struct comps_requirement
ali@0
    15
{
ali@0
    16
    struct comps_requirement *next;
ali@0
    17
    enum comps_requirement_type type;
ali@0
    18
    char *requires;             /* For type == COMPS_REQUIREMENT_CONDITIONAL */
ali@0
    19
    char *name;
ali@0
    20
};
ali@0
    21
ali@0
    22
struct comps_group
ali@0
    23
{
ali@0
    24
    struct comps_group *next;
ali@0
    25
    char *id,*name,*description;
ali@0
    26
    int bydefault,uservisible;
ali@0
    27
    struct comps_requirement *packages;
ali@0
    28
};
ali@0
    29
ali@0
    30
struct comps
ali@0
    31
{
ali@0
    32
    char *vendor;
ali@0
    33
    struct comps_group *groups;
ali@0
    34
};
ali@0
    35
ali@0
    36
char *plover_strconcat(const char *string,...);
ali@3
    37
char *plover_default_prefix_for_vendor(const char *vendor);
ali@3
    38
char *plover_get_program_directory(const char *argv0);
ali@0
    39
ali@0
    40
struct razor_set *plover_razor_set_create_from_yum(const char *base);
ali@0
    41
ali@0
    42
struct razor_set *plover_relocate_packages(struct razor_set *set,
ali@19
    43
  const char *base,struct razor_relocations *relocations,
ali@19
    44
  struct razor_error **error);
ali@13
    45
int plover_run_transaction(struct razor_transaction *trans,
ali@13
    46
  struct razor_install_iterator *ii,const char *base,const char *install_root,
ali@13
    47
  struct razor_set *system,struct razor_set *next,struct razor_atomic *atomic,
ali@13
    48
  struct razor_relocations *relocations,enum razor_stage_type stage);
ali@13
    49
int plover_commit_transaction(struct razor_transaction *trans,const char *base,
ali@19
    50
  const char *install_root,struct razor_root *root,
ali@0
    51
  struct razor_relocations *relocations);
ali@0
    52
int plover_install(const char *base,const char *prefix,char **pkgs);
ali@13
    53
int plover_update(const char *base,const char *prefix,char **pkgs);
ali@0
    54
int plover_remove(char **pkgs);
ali@13
    55
int plover_installed_files_match_prefix(const char *prefix);
ali@0
    56
ali@0
    57
struct comps *plover_comps_new(void);
ali@0
    58
struct comps *plover_comps_new_from_file(const char *filename);
ali@0
    59
void plover_comps_free(struct comps *comps);
ali@0
    60
struct comps_group *plover_comps_lookup_group(struct comps *comps,
ali@0
    61
  const char *id);
ali@0
    62
ali@0
    63
#endif /* __PLOVER_H__ */