dpkg 1.21.11
Typedefs | Enumerations | Functions
db-ctrl.h File Reference

(a4dfcc1ef)

#include <stdbool.h>
#include <dpkg/dpkg-db.h>
Include dependency graph for db-ctrl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef void pkg_infodb_file_func(const char *filename, const char *filetype)
 

Enumerations

enum  pkg_infodb_format { PKG_INFODB_FORMAT_UNKNOWN = -1 , PKG_INFODB_FORMAT_LEGACY = 0 , PKG_INFODB_FORMAT_MULTIARCH = 1 , PKG_INFODB_FORMAT_LAST }
 

Functions

enum pkg_infodb_format pkg_infodb_get_format (void)
 
void pkg_infodb_set_format (enum pkg_infodb_format format)
 
bool pkg_infodb_is_upgrading (void)
 
void pkg_infodb_upgrade (void)
 Upgrade the infodb if there's the need and possibility. More...
 
const char * pkg_infodb_get_dir (void)
 
const char * pkg_infodb_get_file (const struct pkginfo *pkg, const struct pkgbin *pkgbin, const char *filetype)
 
const char * pkg_infodb_reset_dir (void)
 
bool pkg_infodb_has_file (struct pkginfo *pkg, struct pkgbin *pkgbin, const char *name)
 
void pkg_infodb_foreach (struct pkginfo *pkg, struct pkgbin *pkgbin, pkg_infodb_file_func *func)
 

Typedef Documentation

◆ pkg_infodb_file_func

typedef void pkg_infodb_file_func(const char *filename, const char *filetype)

Enumeration Type Documentation

◆ pkg_infodb_format

Enumerator
PKG_INFODB_FORMAT_UNKNOWN 
PKG_INFODB_FORMAT_LEGACY 
PKG_INFODB_FORMAT_MULTIARCH 
PKG_INFODB_FORMAT_LAST 

Function Documentation

◆ pkg_infodb_foreach()

void pkg_infodb_foreach ( struct pkginfo pkg,
struct pkgbin pkgbin,
pkg_infodb_file_func func 
)

◆ pkg_infodb_get_dir()

const char * pkg_infodb_get_dir ( void  )

Referenced by pkg_infodb_get_file(), write_filehash_except(), and write_filelist_except().

Here is the caller graph for this function:

◆ pkg_infodb_get_file()

const char * pkg_infodb_get_file ( const struct pkginfo pkg,
const struct pkgbin pkgbin,
const char *  filetype 
)

References pkgbin::arch, varbuf::buf, pkgbin::multiarch, pkgset::name, PKG_INFODB_FORMAT_MULTIARCH, pkg_infodb_get_dir(), pkg_infodb_get_format(), PKG_MULTIARCH_SAME, pkginfo::set, varbuf_add_archqual(), varbuf_add_char(), varbuf_add_dir(), varbuf_add_str, varbuf_end_str(), and varbuf_reset().

Referenced by maintscript_fallback(), parse_filehash(), pkg_infodb_has_file(), trig_activate_packageprocessing(), write_filehash_except(), and write_filelist_except().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pkg_infodb_get_format()

enum pkg_infodb_format pkg_infodb_get_format ( void  )

Referenced by pkg_infodb_get_file().

Here is the caller graph for this function:

◆ pkg_infodb_has_file()

bool pkg_infodb_has_file ( struct pkginfo pkg,
struct pkgbin pkgbin,
const char *  name 
)

References _, ohshite(), and pkg_infodb_get_file().

Referenced by write_filehash_except().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pkg_infodb_is_upgrading()

bool pkg_infodb_is_upgrading ( void  )

◆ pkg_infodb_reset_dir()

const char * pkg_infodb_reset_dir ( void  )

◆ pkg_infodb_set_format()

void pkg_infodb_set_format ( enum pkg_infodb_format  format)

◆ pkg_infodb_upgrade()

void pkg_infodb_upgrade ( void  )

Upgrade the infodb if there's the need and possibility.

Currently this implies, that the modstatdb was opened for writing and:

  • previous upgrade has not been completed; or
  • current format is not the latest one.

Referenced by archivefiles(), clearselections(), packages(), and setselections().

Here is the caller graph for this function: