dpkg 1.22.7-3-g89f48
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Enumerations | Functions
Trigger handling
Collaboration diagram for Trigger handling:

Data Structures

struct  trigfileint
 
struct  trig_hooks
 The first two hooks are normally NULL. More...
 

Macros

#define TRIGHOOKS_DEFINE_NAMENODE_ACCESSORS
 

Typedefs

typedef void trig_awaited_pend_foreach_func(struct pkginfo *pkg)
 
typedef void trig_parse_cicb(const char *trig, struct pkginfo *pkg, struct pkgbin *pkgbin, enum trig_options to)
 

Enumerations

enum  trig_options { TRIG_AWAIT , TRIG_NOAWAIT }
 

Functions

const char * trig_name_is_illegal (const char *p)
 
void trig_override_hooks (const struct trig_hooks *hooks)
 
void trig_file_activate_byname (const char *trig, struct pkginfo *aw)
 
void trig_file_activate (struct fsys_namenode *trig, struct pkginfo *aw)
 
void trig_path_activate (struct fsys_namenode *trig, struct pkginfo *aw)
 
bool trig_note_pend_core (struct pkginfo *pend, const char *trig)
 
bool trig_note_pend (struct pkginfo *pend, const char *trig)
 
bool trig_note_aw (struct pkginfo *pend, struct pkginfo *aw)
 
void trig_clear_awaiters (struct pkginfo *notpend)
 
void trig_awaited_pend_enqueue (struct pkginfo *pend)
 
void trig_awaited_pend_foreach (trig_awaited_pend_foreach_func *func)
 
void trig_awaited_pend_free (void)
 
void trig_fixup_awaiters (enum modstatdb_rw cstatus)
 
void trig_file_interests_ensure (void)
 
void trig_file_interests_save (void)
 
void trig_cicb_interest_delete (const char *trig, struct pkginfo *pkg, struct pkgbin *pkgbin, enum trig_options to)
 
void trig_cicb_interest_add (const char *trig, struct pkginfo *pkg, struct pkgbin *pkgbin, enum trig_options to)
 
void trig_cicb_statuschange_activate (const char *trig, struct pkginfo *pkg, struct pkgbin *pkgbin, enum trig_options to)
 
void trig_parse_ci (const char *file, trig_parse_cicb *interest, trig_parse_cicb *activate, struct pkginfo *pkg, struct pkgbin *pkgbin)
 
void trig_incorporate (enum modstatdb_rw cstatus)
 

Detailed Description

Macro Definition Documentation

◆ TRIGHOOKS_DEFINE_NAMENODE_ACCESSORS

#define TRIGHOOKS_DEFINE_NAMENODE_ACCESSORS
Value:
static struct fsys_namenode *th_nn_find(const char *name, bool nonew) \
{ return fsys_hash_find_node(name, nonew ? FHFF_NO_NEW : FHFF_NONE); } \
static struct trigfileint **th_nn_interested(struct fsys_namenode *fnn) \
{ return &fnn->trig_interested; } \
static const char *th_nn_name(struct fsys_namenode *fnn) \
{ return fnn->name; }
struct fsys_namenode * fsys_hash_find_node(const char *name, enum fsys_hash_find_flags flags)
Definition fsys-hash.c:73
FHFF_NO_NEW
Do not insert the item if it is not found, and return NULL.
Definition fsys.h:62
FHFF_NONE
No flags.
Definition fsys.h:58
Definition fsys.h:98
const char * name
Definition fsys.h:100
struct trigfileint * trig_interested
Definition fsys.h:111
Definition triglib.h:56
struct fsys_namenode * fnn
Definition triglib.h:59

Typedef Documentation

◆ trig_awaited_pend_foreach_func

typedef void trig_awaited_pend_foreach_func(struct pkginfo *pkg)

◆ trig_parse_cicb

typedef void trig_parse_cicb(const char *trig, struct pkginfo *pkg, struct pkgbin *pkgbin, enum trig_options to)

Enumeration Type Documentation

◆ trig_options

Enumerator
TRIG_AWAIT 
TRIG_NOAWAIT 

Function Documentation

◆ trig_awaited_pend_enqueue()

void trig_awaited_pend_enqueue ( struct pkginfo pend)

References pkg_list::next, pkg_list::pkg, and pkg_list_prepend().

Referenced by f_trigaw().

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

◆ trig_awaited_pend_foreach()

void trig_awaited_pend_foreach ( trig_awaited_pend_foreach_func func)

References pkg_list::next, pkg_list::pkg, and pkginfo::trigpend_head.

Referenced by trig_fixup_awaiters().

Here is the caller graph for this function:

◆ trig_awaited_pend_free()

void trig_awaited_pend_free ( void  )

References pkg_list_free().

Referenced by trig_fixup_awaiters().

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

◆ trig_cicb_interest_add()

void trig_cicb_interest_add ( const char *  trig,
struct pkginfo pkg,
struct pkgbin pkgbin,
enum trig_options  to 
)

Referenced by process_archive().

Here is the caller graph for this function:

◆ trig_cicb_interest_delete()

void trig_cicb_interest_delete ( const char *  trig,
struct pkginfo pkg,
struct pkgbin pkgbin,
enum trig_options  to 
)

Referenced by process_archive().

Here is the caller graph for this function:

◆ trig_cicb_statuschange_activate()

void trig_cicb_statuschange_activate ( const char *  trig,
struct pkginfo pkg,
struct pkgbin pkgbin,
enum trig_options  to 
)

References trigkindinfo::activate_awaiter, trigkindinfo::activate_done, and TRIG_NOAWAIT.

Referenced by process_archive(), and trig_activate_packageprocessing().

Here is the caller graph for this function:

◆ trig_clear_awaiters()

void trig_clear_awaiters ( struct pkginfo notpend)

References trigaw::aw, pkginfo::head, internerr, LIST_UNLINK_PART, modstatdb_note(), pkginfo::othertrigaw_head, pkg_name(), pkg_set_status(), PKG_STAT_INSTALLED, PKG_STAT_TRIGGERSAWAITED, PKG_STAT_TRIGGERSPENDING, pnaw_always, trigaw::samepend_next, pkginfo::status, pkginfo::trigaw, and pkginfo::trigpend_head.

Referenced by modstatdb_note(), trig_fixup_awaiters(), and trigproc().

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

◆ trig_file_activate()

void trig_file_activate ( struct fsys_namenode trig,
struct pkginfo aw 
)

References trig_hooks::namenode_interested, trig_hooks::namenode_name, trigfileint::options, trigfileint::pkg, trigfileint::samefile_next, and TRIG_NOAWAIT.

Referenced by tarobject(), trig_file_activate_byname(), and trig_path_activate().

Here is the caller graph for this function:

◆ trig_file_activate_byname()

void trig_file_activate_byname ( const char *  trig,
struct pkginfo aw 
)

References trig_hooks::namenode_find, and trig_file_activate().

Here is the call graph for this function:

◆ trig_file_interests_ensure()

void trig_file_interests_ensure ( void  )

References _, cu_closestream(), ehflag_normaltidy, fgets_checked(), pkginfo::installed, ohshit(), ohshite(), pkg_spec_parse_pkg(), pop_cleanup(), push_cleanup(), dpkg_error::str, and dpkg_error::type.

Referenced by process_archive(), and trig_incorporate().

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

◆ trig_file_interests_save()

void trig_file_interests_save ( void  )

References dir_sync_path().

Referenced by process_archive().

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

◆ trig_fixup_awaiters()

void trig_fixup_awaiters ( enum modstatdb_rw  cstatus)

References msdbrw_write, trig_awaited_pend_foreach(), trig_awaited_pend_free(), and trig_clear_awaiters().

Referenced by modstatdb_open().

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

◆ trig_incorporate()

void trig_incorporate ( enum modstatdb_rw  cstatus)

References _, dpkg_db_get_path(), internerr, msdbrw_write, ohshite(), TDUF_NO_LOCK_OK, TDUF_WRITE, TDUF_WRITE_IF_ENOENT, TDUS_ERROR_EMPTY_DEFERRED, TDUS_ERROR_NO_DEFERRED, TDUS_ERROR_NO_DIR, TDUS_NO_DEFERRED, TDUS_OK, trig_hooks::transitional_activate, trig_file_interests_ensure(), trigdef_parse(), trigdef_process_done(), trigdef_set_methods(), trigdef_update_flags, trigdef_update_start(), TRIGGERSDIR, and TRIGGERSFILEFILE.

Referenced by modstatdb_open(), and post_postinst_tasks().

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

◆ trig_name_is_illegal()

const char * trig_name_is_illegal ( const char *  p)

References _.

Referenced by f_trigpend(), and validate_trigname().

Here is the caller graph for this function:

◆ trig_note_aw()

bool trig_note_aw ( struct pkginfo pend,
struct pkginfo aw 
)

References trigaw::aw, pkginfo::head, LIST_LINK_TAIL_PART, trigaw::next, nfmalloc(), pkginfo::othertrigaw_head, trigaw::pend, trigaw::sameaw, trigaw::samepend_next, and pkginfo::trigaw.

Referenced by f_trigaw().

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

◆ trig_note_pend()

bool trig_note_pend ( struct pkginfo pend,
const char *  trig 
)

References pkginfo::head, pkg_set_status(), PKG_STAT_TRIGGERSAWAITED, PKG_STAT_TRIGGERSPENDING, trig_note_pend_core(), and pkginfo::trigaw.

Here is the call graph for this function:

◆ trig_note_pend_core()

bool trig_note_pend_core ( struct pkginfo pend,
const char *  trig 
)

References trigpend::name, trigpend::next, nfmalloc(), and pkginfo::trigpend_head.

Referenced by f_trigpend(), and trig_note_pend().

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

◆ trig_override_hooks()

void trig_override_hooks ( const struct trig_hooks hooks)

Referenced by trigproc_install_hooks().

Here is the caller graph for this function:

◆ trig_parse_ci()

void trig_parse_ci ( const char *  file,
trig_parse_cicb interest,
trig_parse_cicb activate,
struct pkginfo pkg,
struct pkgbin pkgbin 
)

References _, cu_closestream(), ehflag_normaltidy, fgets_checked(), MAXTRIGDIRECTIVE, ohshit(), ohshite(), pop_cleanup(), push_cleanup(), TRIG_AWAIT, and TRIG_NOAWAIT.

Referenced by process_archive(), and trig_activate_packageprocessing().

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

◆ trig_path_activate()

void trig_path_activate ( struct fsys_namenode trig,
struct pkginfo aw 
)

References trig_hooks::namenode_name, and trig_file_activate().

Here is the call graph for this function: