dpkg 1.21.11
Data Structures | Enumerations | Functions | Variables
main.h File Reference

(73a0987a8)

#include <dpkg/debug.h>
#include <dpkg/pkg-list.h>
#include "force.h"
#include "actions.h"
#include "security-mac.h"
Include dependency graph for main.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  perpackagestate
 
struct  invoke_hook
 
struct  invoke_list
 

Enumerations

enum  pkg_istobe {
  PKG_ISTOBE_NORMAL , PKG_ISTOBE_REMOVE , PKG_ISTOBE_INSTALLNEW , PKG_ISTOBE_DECONFIGURE ,
  PKG_ISTOBE_PREINSTALL
}
 
enum  pkg_cycle_color { PKG_CYCLE_WHITE , PKG_CYCLE_GRAY , PKG_CYCLE_BLACK }
 
enum  dep_check { DEP_CHECK_HALT = 0 , DEP_CHECK_DEFER = 1 , DEP_CHECK_OK = 2 }
 
enum  dependtry {
  DEPEND_TRY_NORMAL = 1 , DEPEND_TRY_CYCLES = 2 , DEPEND_TRY_TRIGGERS = 3 , DEPEND_TRY_TRIGGERS_CYCLES = 4 ,
  DEPEND_TRY_FORCE_DEPENDS_VERSION = 5 , DEPEND_TRY_FORCE_DEPENDS = 6 , DEPEND_TRY_LAST
}
 
enum  trigproc_type { TRIGPROC_TRY_DEFERRED , TRIGPROC_TRY_QUEUED , TRIGPROC_REQUIRED }
 
enum  which_pkgbin { wpb_installed , wpb_available , wpb_by_istobe }
 

Functions

void ensure_package_clientdata (struct pkginfo *pkg)
 
int archivefiles (const char *const *argv)
 
void process_archive (const char *filename)
 
bool wanttoinstall (struct pkginfo *pkg)
 Decide whether we want to install a new version of the package. More...
 
int forgetold (const char *const *argv)
 
int updateavailable (const char *const *argv)
 
int audit (const char *const *argv)
 
int unpackchk (const char *const *argv)
 
int assert_feature (const char *const *argv)
 
int validate_pkgname (const char *const *argv)
 
int validate_trigname (const char *const *argv)
 
int validate_archname (const char *const *argv)
 
int validate_version (const char *const *argv)
 
int predeppackage (const char *const *argv)
 Print a single package which: (a) is the target of one or more relevant predependencies. More...
 
int printarch (const char *const *argv)
 
int printinstarch (const char *const *argv)
 
int print_foreign_arches (const char *const *argv)
 
int cmpversions (const char *const *argv)
 
bool verify_set_output (const char *name)
 
int verify (const char *const *argv)
 
int getselections (const char *const *argv)
 
int setselections (const char *const *argv)
 
int clearselections (const char *const *argv)
 
void md5hash (struct pkginfo *pkg, char *hashbuf, const char *fn)
 Generate a file contents MD5 hash. More...
 
void enqueue_package (struct pkginfo *pkg)
 
void enqueue_package_mark_seen (struct pkginfo *pkg)
 
void process_queue (void)
 
int packages (const char *const *argv)
 
void removal_bulk (struct pkginfo *pkg)
 
int conffderef (struct pkginfo *pkg, struct varbuf *result, const char *in)
 Dereference a file by following all possibly used symlinks. More...
 
enum dep_check dependencies_ok (struct pkginfo *pkg, struct pkginfo *removing, struct varbuf *aemsgs)
 
enum dep_check breakses_ok (struct pkginfo *pkg, struct varbuf *aemsgs)
 
void deferred_remove (struct pkginfo *pkg)
 
void deferred_configure (struct pkginfo *pkg)
 Process the deferred configure package. More...
 
void cu_prermremove (int argc, void **argv)
 
void print_error_perpackage (const char *emsg, const void *data)
 
void print_error_perarchive (const char *emsg, const void *data)
 
int reportbroken_retexitstatus (int ret)
 
bool skip_due_to_hold (struct pkginfo *pkg)
 
bool ignore_depends (const struct pkginfo *pkg)
 
bool force_breaks (struct deppossi *possi)
 
bool force_depends (struct deppossi *possi)
 
bool force_conflicts (struct deppossi *possi)
 
void conffile_mark_obsolete (struct pkginfo *pkg, struct fsys_namenode *namenode)
 Mark a conffile as obsolete. More...
 
void pkg_conffiles_mark_old (struct pkginfo *pkg)
 Mark all package conffiles as old. More...
 
bool find_command (const char *prog)
 
void checkpath (void)
 Verify that some programs can be found in the PATH. More...
 
struct fsys_namenodenamenodetouse (struct fsys_namenode *namenode, struct pkginfo *pkg, struct pkgbin *pkgbin)
 
int maintscript_installed (struct pkginfo *pkg, const char *scriptname, const char *desc,...) DPKG_ATTR_SENTINEL
 
int maintscript_new (struct pkginfo *pkg, const char *scriptname, const char *desc, const char *cidir, char *cidirrest,...) DPKG_ATTR_SENTINEL
 
int maintscript_fallback (struct pkginfo *pkg, const char *scriptname, const char *desc, const char *cidir, char *cidirrest, const char *ifok, const char *iffallback)
 
int maintscript_postinst (struct pkginfo *pkg,...) DPKG_ATTR_SENTINEL
 
void post_postinst_tasks (struct pkginfo *pkg, enum pkgstatus new_status)
 
void clear_istobes (void)
 
bool dir_is_used_by_others (struct fsys_namenode *namenode, struct pkginfo *pkg)
 
bool dir_is_used_by_pkg (struct fsys_namenode *namenode, struct pkginfo *pkg, struct fsys_namenode_list *list)
 
bool dir_has_conffiles (struct fsys_namenode *namenode, struct pkginfo *pkg)
 
void log_action (const char *action, struct pkginfo *pkg, struct pkgbin *pkgbin)
 
void trigproc_install_hooks (void)
 
void trigproc_populate_deferred (void)
 Populate the deferred trigger queue. More...
 
void trigproc_run_deferred (void)
 
void trigproc_reset_cycle (void)
 
void trigproc (struct pkginfo *pkg, enum trigproc_type type)
 
void trig_activate_packageprocessing (struct pkginfo *pkg)
 
struct deppossi_pkg_iteratordeppossi_pkg_iter_new (struct deppossi *possi, enum which_pkgbin wpb)
 
struct pkginfodeppossi_pkg_iter_next (struct deppossi_pkg_iterator *iter)
 
void deppossi_pkg_iter_free (struct deppossi_pkg_iterator *iter)
 
bool depisok (struct dependency *dep, struct varbuf *whynot, struct pkginfo **fixbyrm, struct pkginfo **fixbytrigaw, bool allowunconfigd)
 
bool findbreakcycle (struct pkginfo *pkg)
 
void describedepcon (struct varbuf *addto, struct dependency *dep)
 

Variables

const char *const statusstrings []
 
int f_robot
 
int f_pending
 
int f_recursive
 
int f_alsoselect
 
int f_skipsame
 
int f_noact
 
int f_autodeconf
 
int f_nodebsig
 
int f_triggers
 
bool abort_processing
 
int errabort
 
struct pkg_listignoredependss
 
const char * assert_feature_name
 
enum dependtry dependtry
 
int sincenothing
 

Enumeration Type Documentation

◆ dep_check

enum dep_check
Enumerator
DEP_CHECK_HALT 
DEP_CHECK_DEFER 
DEP_CHECK_OK 

◆ dependtry

enum dependtry
Enumerator
DEPEND_TRY_NORMAL 
DEPEND_TRY_CYCLES 
DEPEND_TRY_TRIGGERS 
DEPEND_TRY_TRIGGERS_CYCLES 
DEPEND_TRY_FORCE_DEPENDS_VERSION 
DEPEND_TRY_FORCE_DEPENDS 
DEPEND_TRY_LAST 

◆ pkg_cycle_color

Enumerator
PKG_CYCLE_WHITE 
PKG_CYCLE_GRAY 
PKG_CYCLE_BLACK 

◆ pkg_istobe

enum pkg_istobe
Enumerator
PKG_ISTOBE_NORMAL 

Package is to be left in a normal state.

PKG_ISTOBE_REMOVE 

Package is to be removed.

PKG_ISTOBE_INSTALLNEW 

Package is to be installed, configured or triggered.

PKG_ISTOBE_DECONFIGURE 

Package is to be deconfigured.

PKG_ISTOBE_PREINSTALL 

Package is to be checked for Pre-Depends satisfiability.

◆ trigproc_type

Enumerator
TRIGPROC_TRY_DEFERRED 

Opportunistic deferred trigger processing.

TRIGPROC_TRY_QUEUED 

Opportunistic queued trigger processing.

TRIGPROC_REQUIRED 

Required trigger processing.

◆ which_pkgbin

Enumerator
wpb_installed 
wpb_available 
wpb_by_istobe 

Function Documentation

◆ archivefiles()

int archivefiles ( const char *const *  argv)

References act_avail, cmdinfo::arg_int, checkpath(), cipaction, f_noact, f_recursive, FORCE_NON_ROOT, in_force(), log_message(), modstatdb_open(), msdbrw_available_write, msdbrw_needsuperuser, msdbrw_readonly, msdbrw_write, cmdinfo::olong, pkg_infodb_upgrade(), and trigproc_install_hooks().

Here is the call graph for this function:

◆ assert_feature()

int assert_feature ( const char *const *  argv)

References _, assert_feature(), assert_feature_name, and dpkg_get_progname().

Referenced by assert_feature().

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

◆ audit()

int audit ( const char *const *  argv)

References modstatdb_open(), msdbrw_readonly, pkg_array_init_from_hash(), and pkg_array_init_from_names().

Here is the call graph for this function:

◆ breakses_ok()

enum dep_check breakses_ok ( struct pkginfo pkg,
struct varbuf aemsgs 
)

References dbg_depcon, debug(), and DEP_CHECK_OK.

Referenced by deferred_configure().

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

◆ checkpath()

void checkpath ( void  )

Verify that some programs can be found in the PATH.

References _, BACKEND, DEFAULTSHELL, DIFF, find_command(), FORCE_BAD_PATH, forcibleerr(), P_, RM, and warning().

Referenced by archivefiles(), and packages().

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

◆ clear_istobes()

void clear_istobes ( void  )

References pkginfo::clientdata, ensure_package_clientdata(), perpackagestate::istobe, pkg_hash_iter_free(), pkg_hash_iter_new(), pkg_hash_iter_next_pkg(), PKG_ISTOBE_NORMAL, and perpackagestate::replacingfilesandsaid.

Referenced by predeppackage(), and process_queue().

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

◆ clearselections()

int clearselections ( const char *const *  argv)

◆ cmpversions()

int cmpversions ( const char *const *  argv)

References _, badusage(), cipaction, dbg_general, debug(), dpkg_error_destroy(), dpkg_error_print(), dpkg_version_blank(), dpkg_version_compare(), dpkg_version_is_informative(), cmdinfo::olong, parseversion(), vdew_always, versiondescribe_c(), and warning().

Here is the call graph for this function:

◆ conffderef()

int conffderef ( struct pkginfo pkg,
struct varbuf result,
const char *  in 
)

Dereference a file by following all possibly used symlinks.

Parameters
[in]pkgThe package to act on.
[out]resultThe dereference conffile path.
[in]inThe conffile path to dereference.
Returns
An error code for the operation.
Return values
0Everything went ok.
-1Otherwise.

References _, varbuf::buf, dbg_conff, dbg_conffdetail, debug(), dpkg_fsys_get_dir(), pkg_name(), pnaw_nonambig, varbuf::size, varbuf::used, varbuf_add_buf(), varbuf_add_str, varbuf_end_str(), varbuf_grow(), VARBUF_INIT, varbuf_reset(), varbuf_trunc(), and warning().

Referenced by tarobject().

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

◆ conffile_mark_obsolete()

void conffile_mark_obsolete ( struct pkginfo pkg,
struct fsys_namenode namenode 
)

Mark a conffile as obsolete.

Parameters
pkgThe package owning the conffile.
namenodeThe namenode for the obsolete conffile.

References pkgbin::conffiles, dbg_conff, debug(), pkginfo::installed, conffile::name, fsys_namenode::name, conffile::next, conffile::obsolete, pkg_name(), and pnaw_always.

Here is the call graph for this function:

◆ cu_prermremove()

void cu_prermremove ( int  argc,
void **  argv 
)

References cleanup_pkg_failed, maintscript_postinst(), pkg_clear_eflags(), PKG_EFLAG_REINSTREQ, and post_postinst_tasks().

Here is the call graph for this function:

◆ deferred_configure()

void deferred_configure ( struct pkginfo pkg)

◆ deferred_remove()

void deferred_remove ( struct pkginfo pkg)

◆ dependencies_ok()

enum dep_check dependencies_ok ( struct pkginfo pkg,
struct pkginfo removing,
struct varbuf aemsgs 
)

Referenced by deferred_configure(), and trigproc().

Here is the caller graph for this function:

◆ depisok()

bool depisok ( struct dependency dep,
struct varbuf whynot,
struct pkginfo **  fixbyrm,
struct pkginfo **  fixbytrigaw,
bool  allowunconfigd 
)

References _, pkginfo::available, pkgset::available, pkginfo::clientdata, pkginfo::configversion, dep_breaks, dep_conflicts, dep_depends, dep_enhances, dep_predepends, dep_provides, dep_recommends, dep_suggests, pkgset::depended, deppossi_pkg_iter_free(), deppossi_pkg_iter_new(), deppossi_pkg_iter_next(), describedepcon(), dpkg_version_is_informative(), dpkg_version_relate(), deppossi::ed, pkginfo::installed, pkgset::installed, internerr, perpackagestate::istobe, dependency::list, pkgset::name, deppossi::next, PKG_ISTOBE_DECONFIGURE, PKG_ISTOBE_INSTALLNEW, PKG_ISTOBE_NORMAL, PKG_ISTOBE_PREINSTALL, PKG_ISTOBE_REMOVE, pkg_name(), PKG_STAT_CONFIGFILES, PKG_STAT_HALFCONFIGURED, PKG_STAT_HALFINSTALLED, PKG_STAT_INSTALLED, PKG_STAT_NOTINSTALLED, PKG_STAT_TRIGGERSAWAITED, PKG_STAT_TRIGGERSPENDING, PKG_STAT_UNPACKED, pkg_virtual_deppossi_satisfied(), pkgbin_name(), pnaw_nonambig, deppossi_pkg_iterator::possi, deppossi::rev_next, pkginfo::set, pkginfo::status, statusstrings, dependency::type, dependency::up, deppossi::up, varbuf_add_char(), varbuf_add_str, varbuf_reset(), vdew_nonambig, deppossi::verrel, deppossi::version, pkgbin::version, versiondescribe(), versionsatisfied(), and wpb_by_istobe.

Referenced by check_breaks(), check_conflict(), and predeppackage().

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

◆ deppossi_pkg_iter_free()

void deppossi_pkg_iter_free ( struct deppossi_pkg_iterator iter)

Referenced by depisok(), and predeppackage().

Here is the caller graph for this function:

◆ deppossi_pkg_iter_new()

struct deppossi_pkg_iterator * deppossi_pkg_iter_new ( struct deppossi possi,
enum which_pkgbin  wpb 
)

References deppossi::ed, m_malloc(), pkgset::pkg, deppossi_pkg_iterator::pkg_next, deppossi_pkg_iterator::possi, and deppossi_pkg_iterator::which_pkgbin.

Referenced by depisok(), and predeppackage().

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

◆ deppossi_pkg_iter_next()

struct pkginfo * deppossi_pkg_iter_next ( struct deppossi_pkg_iterator iter)

References pkginfo::arch_next, archsatisfied(), pkginfo::available, pkginfo::clientdata, pkginfo::installed, internerr, perpackagestate::istobe, PKG_ISTOBE_INSTALLNEW, deppossi_pkg_iterator::pkg_next, deppossi_pkg_iterator::possi, deppossi_pkg_iterator::which_pkgbin, wpb_available, wpb_by_istobe, and wpb_installed.

Referenced by depisok(), and predeppackage().

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

◆ describedepcon()

void describedepcon ( struct varbuf addto,
struct dependency dep 
)

References _, varbuf::buf, dep_breaks, dep_conflicts, dep_depends, dep_enhances, dep_predepends, dep_recommends, dep_suggests, internerr, pkg_name(), pnaw_nonambig, dependency::type, dependency::up, varbuf_destroy(), varbuf_end_str(), VARBUF_INIT, varbuf_printf(), and varbufdependency().

Referenced by depisok(), and predeppackage().

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

◆ dir_has_conffiles()

bool dir_has_conffiles ( struct fsys_namenode namenode,
struct pkginfo pkg 
)

References pkgbin::conffiles, dbg_veryverbose, debug(), pkginfo::installed, conffile::name, file::name, conffile::next, conffile::obsolete, pkg_name(), pnaw_always, and conffile::remove_on_upgrade.

Here is the call graph for this function:

◆ dir_is_used_by_others()

bool dir_is_used_by_others ( struct fsys_namenode namenode,
struct pkginfo pkg 
)

References dbg_veryverbose, debug(), fsys_node_pkgs_iter_free(), fsys_node_pkgs_iter_new(), fsys_node_pkgs_iter_next(), file::name, pkg_name(), and pnaw_always.

Here is the call graph for this function:

◆ dir_is_used_by_pkg()

bool dir_is_used_by_pkg ( struct fsys_namenode namenode,
struct pkginfo pkg,
struct fsys_namenode_list list 
)

References dbg_veryverbose, debug(), fsys_namenode::name, file::name, fsys_namenode_list::namenode, fsys_namenode_list::next, pkg_name(), and pnaw_always.

Here is the call graph for this function:

◆ enqueue_package()

void enqueue_package ( struct pkginfo pkg)

References pkginfo::clientdata, perpackagestate::enqueued, ensure_package_clientdata(), and pkg_queue_push().

Referenced by deferred_configure(), enqueue_package_mark_seen(), ok_prermdeconfigure(), and trigproc().

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

◆ enqueue_package_mark_seen()

void enqueue_package_mark_seen ( struct pkginfo pkg)

References pkginfo::clientdata, perpackagestate::cmdline_seen, and enqueue_package().

Here is the call graph for this function:

◆ ensure_package_clientdata()

void ensure_package_clientdata ( struct pkginfo pkg)

References pkginfo::clientdata, perpackagestate::cmdline_seen, perpackagestate::color, perpackagestate::enqueued, perpackagestate::istobe, nfmalloc(), PKG_CYCLE_WHITE, PKG_ISTOBE_NORMAL, perpackagestate::replacingfilesandsaid, and perpackagestate::trigprocdeferred.

Referenced by check_breaks(), check_conflict(), clear_istobes(), deferred_configure(), deferred_remove(), enqueue_deconfigure(), enqueue_package(), findbreakcycle(), and trigproc().

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

◆ find_command()

bool find_command ( const char *  prog)

References _, varbuf::buf, file_is_exec(), ohshit(), varbuf_add_buf(), varbuf_add_char(), varbuf_add_str, varbuf_destroy(), varbuf_end_str(), VARBUF_INIT, and varbuf_reset().

Referenced by checkpath().

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

◆ findbreakcycle()

bool findbreakcycle ( struct pkginfo pkg)

References pkginfo::clientdata, perpackagestate::color, ensure_package_clientdata(), PKG_CYCLE_WHITE, pkg_hash_iter_free(), pkg_hash_iter_new(), and pkg_hash_iter_next_pkg().

Referenced by deferred_configure(), and trigproc().

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

◆ force_breaks()

bool force_breaks ( struct deppossi possi)

References FORCE_BREAKS, and in_force().

Here is the call graph for this function:

◆ force_conflicts()

bool force_conflicts ( struct deppossi possi)

References FORCE_CONFLICTS, and in_force().

Here is the call graph for this function:

◆ force_depends()

bool force_depends ( struct deppossi possi)

References FORCE_DEPENDS, and in_force().

Here is the call graph for this function:

◆ forgetold()

int forgetold ( const char *const *  argv)

References _, badusage(), cipaction, cmdinfo::olong, and warning().

Here is the call graph for this function:

◆ getselections()

int getselections ( const char *const *  argv)

◆ ignore_depends()

bool ignore_depends ( const struct pkginfo pkg)

◆ log_action()

void log_action ( const char *  action,
struct pkginfo pkg,
struct pkgbin pkgbin 
)

References pkginfo::available, pkginfo::installed, log_message(), pkgbin_name(), pnaw_always, pnaw_nonambig, statusfd_send(), vdew_nonambig, pkgbin::version, and versiondescribe_c().

Referenced by deferred_configure().

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

◆ maintscript_fallback()

int maintscript_fallback ( struct pkginfo pkg,
const char *  scriptname,
const char *  desc,
const char *  cidir,
char *  cidirrest,
const char *  ifok,
const char *  iffallback 
)

References _, pkginfo::available, command_add_args(), command_destroy(), command_init(), dbg_scripts, debug(), pkginfo::installed, m_asprintf(), command::name, pkg_infodb_get_file(), pkg_name(), pnaw_nonambig, vdew_nonambig, pkgbin::version, versiondescribe(), and warning().

Here is the call graph for this function:

◆ maintscript_installed()

int maintscript_installed ( struct pkginfo pkg,
const char *  scriptname,
const char *  desc,
  ... 
)

References args.

Referenced by cu_postrmupgrade().

Here is the caller graph for this function:

◆ maintscript_new()

int maintscript_new ( struct pkginfo pkg,
const char *  scriptname,
const char *  desc,
const char *  cidir,
char *  cidirrest,
  ... 
)

References _, args, command_add_arg(), command_add_argv(), command_destroy(), command_init(), dbg_scripts, debug(), m_asprintf(), ohshite(), pkg_name(), and pnaw_nonambig.

Referenced by cu_preinstnew(), cu_preinstupgrade(), and cu_preinstverynew().

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

◆ maintscript_postinst()

int maintscript_postinst ( struct pkginfo pkg,
  ... 
)

References args.

Referenced by cu_prermdeconfigure(), cu_prerminfavour(), cu_prermremove(), and cu_prermupgrade().

Here is the caller graph for this function:

◆ md5hash()

void md5hash ( struct pkginfo pkg,
char *  hashbuf,
const char *  fn 
)

Generate a file contents MD5 hash.

The caller is responsible for providing a buffer for the hash result at least MD5HASHLEN + 1 characters long.

Parameters
[in]pkgThe package to act on.
[out]hashbufThe buffer to store the generated hash.
[in]fnThe filename.

References _, cu_closefd(), ehflag_bombout, ehflag_normaltidy, EMPTYHASHFLAG, fd_md5, NONEXISTENTFLAG, ohshit(), pkg_name(), pnaw_nonambig, pop_cleanup(), push_cleanup(), dpkg_error::str, and warning().

Here is the call graph for this function:

◆ namenodetouse()

struct fsys_namenode * namenodetouse ( struct fsys_namenode namenode,
struct pkginfo pkg,
struct pkgbin pkgbin 
)

References fsys_diversion::camefrom, dbg_eachfile, debug(), fsys_namenode::divert, pkgset::name, fsys_namenode::name, pkgbin_name(), fsys_diversion::pkgset, pnaw_always, pkginfo::set, and fsys_diversion::useinstead.

Referenced by tarobject().

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

◆ packages()

int packages ( const char *const *  argv)

References _, badusage(), checkpath(), cipaction, f_noact, f_pending, FORCE_NON_ROOT, in_force(), log_message(), modstatdb_open(), msdbrw_needsuperuser, msdbrw_readonly, msdbrw_write, cmdinfo::olong, pkg_infodb_upgrade(), and trigproc_install_hooks().

Here is the call graph for this function:

◆ pkg_conffiles_mark_old()

void pkg_conffiles_mark_old ( struct pkginfo pkg)

Mark all package conffiles as old.

Parameters
pkgThe package owning the conffiles.

References pkgbin::conffiles, dbg_conffdetail, debug(), fsys_namenode::flags, FNNF_OLD_CONFF, fsys_hash_find_node(), conffile::hash, pkginfo::installed, conffile::name, fsys_namenode::name, conffile::next, and fsys_namenode::oldhash.

Here is the call graph for this function:

◆ post_postinst_tasks()

void post_postinst_tasks ( struct pkginfo pkg,
enum pkgstatus  new_status 
)

References dbg_triggersdetail, debug(), pkginfo::head, modstatdb_get_status(), modstatdb_note(), pkg_set_status(), PKG_STAT_INSTALLED, PKG_STAT_TRIGGERSAWAITED, PKG_STAT_TRIGGERSPENDING, trig_incorporate(), pkginfo::trigaw, and pkginfo::trigpend_head.

Referenced by cu_prermdeconfigure(), cu_prerminfavour(), cu_prermremove(), and cu_prermupgrade().

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

◆ predeppackage()

int predeppackage ( const char *const *  argv)

Print a single package which: (a) is the target of one or more relevant predependencies.

(b) has itself no unsatisfied pre-dependencies.

If such a package is present output is the Packages file entry, which can be massaged as appropriate.

Exit status: 0 = a package printed, OK 1 = no suitable package available 2 = error

References _, pkginfo::archives, pkginfo::available, pkgset::available, badusage(), varbuf::buf, cipaction, clear_istobes(), pkginfo::clientdata, dep_predepends, dep_provides, pkgset::depended, pkgbin::depends, depisok(), deppossi_pkg_iter_free(), deppossi_pkg_iter_new(), deppossi_pkg_iter_next(), describedepcon(), deppossi::ed, internerr, perpackagestate::istobe, dependency::list, m_output(), modstatdb_open(), msdbrw_available_readonly, msdbrw_readonly, dependency::next, deppossi::next, notice(), ohshit(), cmdinfo::olong, pkg_hash_iter_free(), pkg_hash_iter_new(), pkg_hash_iter_next_pkg(), PKG_ISTOBE_NORMAL, PKG_ISTOBE_PREINSTALL, pkg_virtual_deppossi_satisfied(), PKG_WANT_INSTALL, pkgbin_name(), pnaw_nonambig, deppossi_pkg_iterator::possi, dependency::type, dependency::up, deppossi::up, varbuf_end_str(), varbuf_reset(), versionsatisfied(), pkginfo::want, wpb_available, and writerecord().

Here is the call graph for this function:

◆ print_error_perarchive()

void print_error_perarchive ( const char *  emsg,
const void *  data 
)

References _, cipaction, notice(), cmdinfo::olong, and statusfd_send().

Here is the call graph for this function:

◆ print_error_perpackage()

void print_error_perpackage ( const char *  emsg,
const void *  data 
)

References _, cipaction, notice(), cmdinfo::olong, and statusfd_send().

Here is the call graph for this function:

◆ print_foreign_arches()

int print_foreign_arches ( const char *const *  argv)

References _, badusage(), cipaction, DPKG_ARCH_FOREIGN, dpkg_arch_get_list(), dpkg_arch_load_list(), m_output(), dpkg_arch::name, dpkg_arch::next, cmdinfo::olong, and dpkg_arch::type.

Here is the call graph for this function:

◆ printarch()

int printarch ( const char *const *  argv)

References _, badusage(), cipaction, dpkg_arch_get(), DPKG_ARCH_NATIVE, m_output(), and cmdinfo::olong.

Here is the call graph for this function:

◆ printinstarch()

int printinstarch ( const char *const *  argv)

◆ process_archive()

void process_archive ( const char *  filename)

References cleanup_conflictor_failed, cleanup_pkg_failed, tar_operations::read, tarfileread(), and tarobject().

Here is the call graph for this function:

◆ process_queue()

void process_queue ( void  )

References abort_processing, act_configure, act_install, act_purge, act_remove, act_triggers, cmdinfo::arg_int, cipaction, clear_istobes(), internerr, PKG_ISTOBE_INSTALLNEW, PKG_ISTOBE_NORMAL, and PKG_ISTOBE_REMOVE.

Here is the call graph for this function:

◆ removal_bulk()

void removal_bulk ( struct pkginfo pkg)

References dbg_general, debug(), pkg_name(), PKG_STAT_HALFINSTALLED, PKG_STAT_UNPACKED, pnaw_always, and pkginfo::status.

Here is the call graph for this function:

◆ reportbroken_retexitstatus()

int reportbroken_retexitstatus ( int  ret)

◆ setselections()

int setselections ( const char *const *  argv)

References _, badusage(), cipaction, f_noact, modstatdb_open(), msdbrw_available_readonly, msdbrw_readonly, msdbrw_write, cmdinfo::olong, pkg_infodb_upgrade(), and VARBUF_INIT.

Here is the call graph for this function:

◆ skip_due_to_hold()

bool skip_due_to_hold ( struct pkginfo pkg)

References _, FORCE_HOLD, in_force(), notice(), pkg_name(), PKG_WANT_HOLD, pnaw_nonambig, and pkginfo::want.

Here is the call graph for this function:

◆ trig_activate_packageprocessing()

void trig_activate_packageprocessing ( struct pkginfo pkg)

References dbg_triggersdetail, debug(), pkginfo::installed, pkg_infodb_get_file(), pkg_name(), pnaw_always, trig_cicb_statuschange_activate(), trig_parse_ci(), and TRIGGERSCIFILE.

Referenced by deferred_configure().

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

◆ trigproc()

void trigproc ( struct pkginfo pkg,
enum trigproc_type  type 
)

◆ trigproc_install_hooks()

void trigproc_install_hooks ( void  )

References trig_override_hooks().

Referenced by archivefiles(), and packages().

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

◆ trigproc_populate_deferred()

void trigproc_populate_deferred ( void  )

Populate the deferred trigger queue.

When dpkg is called with a specific set of packages to act on, we might have packages pending trigger processing. But because there are frontends that do not perform a final «dpkg –configure –pending» call (i.e. apt), the system is left in a state with packages not fully installed.

We have to populate the deferred trigger queue from the entire package database, so that we might try to do opportunistic trigger processing when going through the deferred trigger queue, because a fixed apt will not request the necessary processing anyway.

XXX: This can be removed once apt is fixed in the next stable release.

References pkg_hash_iter_new(), pkg_hash_iter_next_pkg(), PKG_STAT_TRIGGERSAWAITED, PKG_STAT_TRIGGERSPENDING, PKG_WANT_HOLD, PKG_WANT_INSTALL, pkginfo::status, pkginfo::trigpend_head, and pkginfo::want.

Here is the call graph for this function:

◆ trigproc_reset_cycle()

void trigproc_reset_cycle ( void  )

Referenced by deferred_configure().

Here is the caller graph for this function:

◆ trigproc_run_deferred()

void trigproc_run_deferred ( void  )

References dbg_triggers, debug(), and pkg_queue_is_empty().

Here is the call graph for this function:

◆ unpackchk()

int unpackchk ( const char *const *  argv)

References _, badusage(), cipaction, modstatdb_open(), msdbrw_readonly, cmdinfo::olong, pkg_hash_iter_new(), and pkg_hash_iter_next_pkg().

Here is the call graph for this function:

◆ updateavailable()

int updateavailable ( const char *const *  argv)

◆ validate_archname()

int validate_archname ( const char *const *  argv)

References _, badusage(), cipaction, dpkg_arch_name_is_illegal(), ohshit(), and cmdinfo::olong.

Here is the call graph for this function:

◆ validate_pkgname()

int validate_pkgname ( const char *const *  argv)

References _, badusage(), cipaction, ohshit(), cmdinfo::olong, and pkg_name_is_illegal().

Here is the call graph for this function:

◆ validate_trigname()

int validate_trigname ( const char *const *  argv)

References _, badusage(), cipaction, ohshit(), cmdinfo::olong, and trig_name_is_illegal().

Here is the call graph for this function:

◆ validate_version()

int validate_version ( const char *const *  argv)

◆ verify()

int verify ( const char *const *  argv)

References ensure_diversions(), modstatdb_open(), msdbrw_readonly, pkg_hash_iter::pkg, pkg_hash_iter_new(), and pkg_hash_iter_next_pkg().

Here is the call graph for this function:

◆ verify_set_output()

bool verify_set_output ( const char *  name)

◆ wanttoinstall()

bool wanttoinstall ( struct pkginfo pkg)

Decide whether we want to install a new version of the package.

Parameters
pkgThe package with the version we might want to install
Return values
trueIf the package should be skipped.
falseIf the package should be installed.

References _, pkgbin::arch, pkginfo::available, dpkg_version_compare(), pkginfo::eflag, f_alsoselect, f_skipsame, FORCE_DOWNGRADE, in_force(), pkginfo::installed, notice(), PKG_EFLAG_REINSTREQ, pkg_name(), PKG_STAT_UNPACKED, PKG_WANT_HOLD, PKG_WANT_INSTALL, pkgbin_name(), pnaw_nonambig, pkginfo::status, vdew_nonambig, pkgbin::version, versiondescribe(), pkginfo::want, and warning().

Here is the call graph for this function:

Variable Documentation

◆ abort_processing

bool abort_processing
extern

Referenced by process_queue().

◆ assert_feature_name

const char* assert_feature_name
extern

Referenced by assert_feature().

◆ dependtry

enum dependtry dependtry
extern

◆ errabort

int errabort
extern

◆ f_alsoselect

int f_alsoselect

◆ f_autodeconf

int f_autodeconf
extern

Referenced by check_breaks().

◆ f_noact

int f_noact

◆ f_nodebsig

int f_nodebsig

◆ f_pending

int f_pending
extern

Referenced by deferred_remove(), and packages().

◆ f_recursive

int f_recursive

◆ f_robot

int f_robot
extern

◆ f_skipsame

int f_skipsame

◆ f_triggers

int f_triggers
extern

◆ ignoredependss

struct pkg_list* ignoredependss
extern

Referenced by ignore_depends().

◆ sincenothing

int sincenothing
extern

◆ statusstrings

const char* const statusstrings[]
extern

Referenced by depisok().