## DnfSack

DnfSack

## Functions

DnfSack * | dnf_sack_new ()
void | dnf_sack_set_cachedir ()
gboolean | dnf_sack_set_arch ()
void | dnf_sack_set_all_arch ()
gboolean | dnf_sack_get_all_arch ()
void | dnf_sack_set_allow_vendor_change ()
gboolean | dnf_sack_get_allow_vendor_change ()
void | dnf_sack_set_rootdir ()
gboolean | dnf_sack_setup ()
int | dnf_sack_evr_cmp ()
const char * | dnf_sack_get_cache_dir ()
DnfPackage * | dnf_sack_get_running_kernel ()
char * | dnf_sack_give_cache_fn ()
const char ** | dnf_sack_list_arches ()
void | dnf_sack_set_installonly ()
void | dnf_sack_set_installonly_limit ()
guint | dnf_sack_get_installonly_limit ()
DnfPackage * | dnf_sack_add_cmdline_package ()
DnfPackage * | dnf_sack_add_cmdline_package_nochecksum ()
int | dnf_sack_count ()
void | dnf_sack_add_excludes ()
void | dnf_sack_add_module_excludes ()
void | dnf_sack_add_includes ()
void | dnf_sack_remove_excludes ()
void | dnf_sack_remove_module_excludes ()
void | dnf_sack_remove_includes ()
void | dnf_sack_set_excludes ()
void | dnf_sack_set_module_excludes ()
void | dnf_sack_set_module_includes ()
void | dnf_sack_set_includes ()
void | dnf_sack_reset_excludes ()
void | dnf_sack_reset_module_excludes ()
void | dnf_sack_reset_includes ()
DnfPackageSet * | dnf_sack_get_includes ()
DnfPackageSet * | dnf_sack_get_excludes ()
DnfPackageSet * | dnf_sack_get_module_excludes ()
DnfPackageSet * | dnf_sack_get_module_includes ()
gboolean | dnf_sack_set_use_includes ()
gboolean | dnf_sack_get_use_includes ()
int | dnf_sack_repo_enabled ()
gboolean | dnf_sack_load_system_repo ()
gboolean | dnf_sack_load_repo ()
Pool * | dnf_sack_get_pool ()
void | dnf_sack_filter_modules ()
gboolean | dnf_sack_add_repo ()
gboolean | dnf_sack_add_repos ()

## Types and Values

#define | DNF_TYPE_SACK
struct | DnfSackClass
enum | DnfSackSetupFlags
enum | DnfSackLoadFlags
enum | DnfSackAddFlags
| DnfSack

## Description

## Functions

### dnf_sack_new ()

    DnfSack *
    dnf_sack_new (void);

### dnf_sack_set_cachedir ()

    void
    dnf_sack_set_cachedir (DnfSack *sack,
                           const gchar *value);

### dnf_sack_set_arch ()

    gboolean
    dnf_sack_set_arch (DnfSack *sack,
                       const gchar *value,
                       GError **error);

### dnf_sack_set_all_arch ()

    void
    dnf_sack_set_all_arch (DnfSack *sack,
                           gboolean all_arch);

### dnf_sack_get_all_arch ()

    gboolean
    dnf_sack_get_all_arch (DnfSack *sack);

### dnf_sack_set_allow_vendor_change ()

    void
    dnf_sack_set_allow_vendor_change (DnfSack *sack,
                                      gboolean allow_vendor_change);

### dnf_sack_get_allow_vendor_change ()

    gboolean
    dnf_sack_get_allow_vendor_change (DnfSack *sack);

### dnf_sack_set_rootdir ()

    void
    dnf_sack_set_rootdir (DnfSack *sack,
                          const gchar *value);

### dnf_sack_setup ()

    gboolean
    dnf_sack_setup (DnfSack *sack,
                    int flags,
                    GError **error);

### dnf_sack_evr_cmp ()

    int
    dnf_sack_evr_cmp (DnfSack *sack,
                      const char *evr1,
                      const char *evr2);

### dnf_sack_get_cache_dir ()

    const char *
    dnf_sack_get_cache_dir (DnfSack *sack);

### dnf_sack_get_running_kernel ()

    DnfPackage *
    dnf_sack_get_running_kernel (DnfSack *sack);

### dnf_sack_give_cache_fn ()

    char *
    dnf_sack_give_cache_fn (DnfSack *sack,
                            const char *reponame,
                            const char *ext);

### dnf_sack_list_arches ()

    const char **
    dnf_sack_list_arches (DnfSack *sack);

### dnf_sack_set_installonly ()

    void
    dnf_sack_set_installonly (DnfSack *sack,
                              const char **installonly);

### dnf_sack_set_installonly_limit ()

    void
    dnf_sack_set_installonly_limit (DnfSack *sack,
                                    guint limit);

### dnf_sack_get_installonly_limit ()

    guint
    dnf_sack_get_installonly_limit (DnfSack *sack);

### dnf_sack_add_cmdline_package ()

    DnfPackage *
    dnf_sack_add_cmdline_package (DnfSack *sack,
                                  const char *fn);

### dnf_sack_add_cmdline_package_nochecksum ()

    DnfPackage *
    dnf_sack_add_cmdline_package_nochecksum
                                   (DnfSack *sack,
                                    const char *fn);

### dnf_sack_count ()

    int
    dnf_sack_count (DnfSack *sack);

### dnf_sack_add_excludes ()

    void
    dnf_sack_add_excludes (DnfSack *sack,
                           const DnfPackageSet *pset);

### dnf_sack_add_module_excludes ()

    void
    dnf_sack_add_module_excludes (DnfSack *sack,
                                  const DnfPackageSet *pset);

### dnf_sack_add_includes ()

    void
    dnf_sack_add_includes (DnfSack *sack,
                           const DnfPackageSet *pset);

### dnf_sack_remove_excludes ()

    void
    dnf_sack_remove_excludes (DnfSack *sack,
                              const DnfPackageSet *pset);

### dnf_sack_remove_module_excludes ()

    void
    dnf_sack_remove_module_excludes (DnfSack *sack,
                                     const DnfPackageSet *pset);

### dnf_sack_remove_includes ()

    void
    dnf_sack_remove_includes (DnfSack *sack,
                              const DnfPackageSet *pset);

### dnf_sack_set_excludes ()

    void
    dnf_sack_set_excludes (DnfSack *sack,
                           const DnfPackageSet *pset);

### dnf_sack_set_module_excludes ()

    void
    dnf_sack_set_module_excludes (DnfSack *sack,
                                  const DnfPackageSet *pset);

### dnf_sack_set_module_includes ()

    void
    dnf_sack_set_module_includes (DnfSack *sack,
                                  const DnfPackageSet *pset);

### dnf_sack_set_includes ()

    void
    dnf_sack_set_includes (DnfSack *sack,
                           const DnfPackageSet *pset);

### dnf_sack_reset_excludes ()

    void
    dnf_sack_reset_excludes (DnfSack *sack);

### dnf_sack_reset_module_excludes ()

    void
    dnf_sack_reset_module_excludes (DnfSack *sack);

### dnf_sack_reset_includes ()

    void
    dnf_sack_reset_includes (DnfSack *sack);

### dnf_sack_get_includes ()

    DnfPackageSet *
    dnf_sack_get_includes (DnfSack *sack);

### dnf_sack_get_excludes ()

    DnfPackageSet *
    dnf_sack_get_excludes (DnfSack *sack);

### dnf_sack_get_module_excludes ()

    DnfPackageSet *
    dnf_sack_get_module_excludes (DnfSack *sack);

### dnf_sack_get_module_includes ()

    DnfPackageSet *
    dnf_sack_get_module_includes (DnfSack *sack);

### dnf_sack_set_use_includes ()

    gboolean
    dnf_sack_set_use_includes (DnfSack *sack,
                               const char *reponame,
                               gboolean enabled);

### dnf_sack_get_use_includes ()

    gboolean
    dnf_sack_get_use_includes (DnfSack *sack,
                               const char *reponame,
                               gboolean *enabled);

### dnf_sack_repo_enabled ()

    int
    dnf_sack_repo_enabled (DnfSack *sack,
                           const char *reponame,
                           int enabled);

### dnf_sack_load_system_repo ()

    gboolean
    dnf_sack_load_system_repo (DnfSack *sack,
                               HyRepo a_hrepo,
                               int flags,
                               GError **error);

### dnf_sack_load_repo ()

    gboolean
    dnf_sack_load_repo (DnfSack *sack,
                        HyRepo hrepo,
                        int flags,
                        GError **error);

### dnf_sack_get_pool ()

    Pool *
    dnf_sack_get_pool (DnfSack *sack);

### dnf_sack_filter_modules ()

    void
    dnf_sack_filter_modules (DnfSack *sack,
                             GPtrArray *repos,
                             const char *install_root,
                             const char *platformModule);

### dnf_sack_add_repo ()

    gboolean
    dnf_sack_add_repo (DnfSack *sack,
                       DnfRepo *repo,
                       guint permissible_cache_age,
                       DnfSackAddFlags flags,
                       DnfState *state,
                       GError **error);

### dnf_sack_add_repos ()

    gboolean
    dnf_sack_add_repos (DnfSack *sack,
                        GPtrArray *repos,
                        guint permissible_cache_age,
                        DnfSackAddFlags flags,
                        DnfState *state,
                        GError **error);

## Types and Values

### DNF_TYPE_SACK

    #define DNF_TYPE_SACK (dnf_sack_get_type ())

### struct DnfSackClass

    struct DnfSackClass {
            GObjectClass            parent_class;
    };

### enum DnfSackSetupFlags

Flags to use when setting up the sack.

#### Members

DNF_SACK_SETUP_FLAG_NONE | No flags set |
DNF_SACK_SETUP_FLAG_MAKE_CACHE_DIR | Create the cache dir if required |

### enum DnfSackLoadFlags

#### Members

DNF_SACK_LOAD_FLAG_NONE |  |
DNF_SACK_LOAD_FLAG_BUILD_CACHE |  |
DNF_SACK_LOAD_FLAG_USE_FILELISTS |  |
DNF_SACK_LOAD_FLAG_USE_PRESTO |  |
DNF_SACK_LOAD_FLAG_USE_UPDATEINFO |  |
DNF_SACK_LOAD_FLAG_USE_OTHER |  |

### enum DnfSackAddFlags

Flags to control repo loading into the sack.

#### Members

DNF_SACK_ADD_FLAG_NONE | Add the primary |
DNF_SACK_ADD_FLAG_FILELISTS | Add the filelists |
DNF_SACK_ADD_FLAG_UPDATEINFO | Add the updateinfo |
DNF_SACK_ADD_FLAG_REMOTE | Use remote repos |
DNF_SACK_ADD_FLAG_UNAVAILABLE | Add repos that are unavailable |
DNF_SACK_ADD_FLAG_OTHER | Add the other |

### DnfSack

    typedef struct _DnfSack DnfSack;