dpkg 1.21.11
|
#include <dpkg/debug.h>
#include <dpkg/pkg-list.h>
#include "force.h"
#include "actions.h"
#include "security-mac.h"
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_namenode * | namenodetouse (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_iterator * | deppossi_pkg_iter_new (struct deppossi *possi, enum which_pkgbin wpb) |
struct pkginfo * | deppossi_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_list * | ignoredependss |
const char * | assert_feature_name |
enum dependtry | dependtry |
int | sincenothing |
enum dep_check |
enum dependtry |
enum pkg_cycle_color |
enum pkg_istobe |
enum trigproc_type |
enum which_pkgbin |
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().
int assert_feature | ( | const char *const * | argv | ) |
References _, assert_feature(), assert_feature_name, and dpkg_get_progname().
Referenced by assert_feature().
int audit | ( | const char *const * | argv | ) |
References modstatdb_open(), msdbrw_readonly, pkg_array_init_from_hash(), and pkg_array_init_from_names().
References dbg_depcon, debug(), and DEP_CHECK_OK.
Referenced by deferred_configure().
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().
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().
int clearselections | ( | const char *const * | argv | ) |
References _, badusage(), cipaction, pkgbin::essential, f_noact, pkginfo::installed, pkgbin::is_protected, modstatdb_open(), modstatdb_shutdown(), msdbrw_readonly, msdbrw_write, cmdinfo::olong, pkg_hash_iter_free(), pkg_hash_iter_new(), pkg_hash_iter_next_pkg(), pkg_infodb_upgrade(), pkg_set_want(), PKG_WANT_DEINSTALL, PKG_WANT_UNKNOWN, and pkginfo::want.
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().
Dereference a file by following all possibly used symlinks.
[in] | pkg | The package to act on. |
[out] | result | The dereference conffile path. |
[in] | in | The conffile path to dereference. |
0 | Everything went ok. |
-1 | Otherwise. |
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().
void conffile_mark_obsolete | ( | struct pkginfo * | pkg, |
struct fsys_namenode * | namenode | ||
) |
Mark a conffile as obsolete.
pkg | The package owning the conffile. |
namenode | The 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.
void cu_prermremove | ( | int | argc, |
void ** | argv | ||
) |
References cleanup_pkg_failed, maintscript_postinst(), pkg_clear_eflags(), PKG_EFLAG_REINSTREQ, and post_postinst_tasks().
void deferred_configure | ( | struct pkginfo * | pkg | ) |
Process the deferred configure package.
pkg | The package to act on. |
References _, pkginfo::arch_next, breakses_ok(), varbuf::buf, pkginfo::clientdata, pkgbin::conffiles, dbg_general, debug(), DEP_CHECK_DEFER, DEP_CHECK_HALT, DEPEND_TRY_CYCLES, dependencies_ok(), dpkg_version_compare(), pkginfo::eflag, enqueue_package(), ensure_package_clientdata(), f_noact, findbreakcycle(), FORCE_REMOVE_REINSTREQ, forcibleerr(), pkginfo::installed, perpackagestate::istobe, log_action(), modstatdb_note(), conffile::next, notice(), conffile::obsolete, ohshit(), pkgset::pkg, PKG_EFLAG_REINSTREQ, PKG_ISTOBE_INSTALLNEW, PKG_ISTOBE_NORMAL, pkg_name(), pkg_set_status(), PKG_STAT_CONFIGFILES, PKG_STAT_HALFCONFIGURED, PKG_STAT_INSTALLED, PKG_STAT_NOTINSTALLED, PKG_STAT_UNPACKED, pkg_status_name(), pnaw_always, pnaw_nonambig, conffile::remove_on_upgrade, pkginfo::set, sincenothing, pkginfo::status, trig_activate_packageprocessing(), trigproc_reset_cycle(), varbuf::used, varbuf_destroy(), varbuf_end_str(), VARBUF_INIT, vdew_nonambig, pkgbin::version, and versiondescribe().
void deferred_remove | ( | struct pkginfo * | pkg | ) |
References _, act_purge, cmdinfo::arg_int, cipaction, pkginfo::clientdata, dbg_general, debug(), DEP_CHECK_OK, ensure_package_clientdata(), pkgbin::essential, f_noact, f_pending, FORCE_REMOVE_ESSENTIAL, FORCE_REMOVE_PROTECTED, forcibleerr(), pkginfo::installed, pkgbin::is_protected, perpackagestate::istobe, modstatdb_note(), PKG_ISTOBE_NORMAL, pkg_name(), pkg_set_want(), PKG_STAT_CONFIGFILES, PKG_STAT_NOTINSTALLED, PKG_WANT_DEINSTALL, PKG_WANT_PURGE, PKG_WANT_UNKNOWN, pnaw_always, pnaw_nonambig, sincenothing, pkginfo::status, VARBUF_INIT, pkginfo::want, and warning().
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().
void deppossi_pkg_iter_free | ( | struct deppossi_pkg_iterator * | iter | ) |
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().
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().
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().
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.
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.
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.
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().
void enqueue_package_mark_seen | ( | struct pkginfo * | pkg | ) |
References pkginfo::clientdata, perpackagestate::cmdline_seen, and enqueue_package().
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().
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().
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().
bool force_breaks | ( | struct deppossi * | possi | ) |
bool force_conflicts | ( | struct deppossi * | possi | ) |
bool force_depends | ( | struct deppossi * | possi | ) |
int forgetold | ( | const char *const * | argv | ) |
References _, badusage(), cipaction, cmdinfo::olong, and warning().
int getselections | ( | const char *const * | argv | ) |
bool ignore_depends | ( | const struct pkginfo * | pkg | ) |
References ignoredependss, pkg_list::next, and pkg_list::pkg.
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().
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().
int maintscript_installed | ( | struct pkginfo * | pkg, |
const char * | scriptname, | ||
const char * | desc, | ||
... | |||
) |
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().
int maintscript_postinst | ( | struct pkginfo * | pkg, |
... | |||
) |
References args.
Referenced by cu_prermdeconfigure(), cu_prerminfavour(), cu_prermremove(), and cu_prermupgrade().
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.
[in] | pkg | The package to act on. |
[out] | hashbuf | The buffer to store the generated hash. |
[in] | fn | The 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().
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().
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().
void pkg_conffiles_mark_old | ( | struct pkginfo * | pkg | ) |
Mark all package conffiles as old.
pkg | The 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.
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().
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().
void print_error_perarchive | ( | const char * | emsg, |
const void * | data | ||
) |
References _, cipaction, notice(), cmdinfo::olong, and statusfd_send().
void print_error_perpackage | ( | const char * | emsg, |
const void * | data | ||
) |
References _, cipaction, notice(), cmdinfo::olong, and statusfd_send().
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.
int printarch | ( | const char *const * | argv | ) |
References _, badusage(), cipaction, dpkg_arch_get(), DPKG_ARCH_NATIVE, m_output(), and cmdinfo::olong.
int printinstarch | ( | const char *const * | argv | ) |
void process_archive | ( | const char * | filename | ) |
References cleanup_conflictor_failed, cleanup_pkg_failed, tar_operations::read, tarfileread(), and tarobject().
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.
void removal_bulk | ( | struct pkginfo * | pkg | ) |
References dbg_general, debug(), pkg_name(), PKG_STAT_HALFINSTALLED, PKG_STAT_UNPACKED, pnaw_always, and pkginfo::status.
int reportbroken_retexitstatus | ( | int | ret | ) |
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.
bool skip_due_to_hold | ( | struct pkginfo * | pkg | ) |
References _, FORCE_HOLD, in_force(), notice(), pkg_name(), PKG_WANT_HOLD, pnaw_nonambig, and pkginfo::want.
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().
void trigproc | ( | struct pkginfo * | pkg, |
enum trigproc_type | type | ||
) |
References pkginfo::clientdata, dbg_triggers, debug(), DEP_CHECK_DEFER, DEPEND_TRY_CYCLES, DEPEND_TRY_TRIGGERS, DEPEND_TRY_TRIGGERS_CYCLES, dependencies_ok(), enqueue_package(), ensure_package_clientdata(), findbreakcycle(), internerr, pkg_list::pkg, pkg_name(), PKG_STAT_TRIGGERSAWAITED, PKG_STAT_TRIGGERSPENDING, pkg_status_name(), pnaw_always, sincenothing, pkginfo::status, pkginfo::trigpend_head, TRIGPROC_TRY_QUEUED, perpackagestate::trigprocdeferred, and VARBUF_INIT.
void trigproc_install_hooks | ( | void | ) |
References trig_override_hooks().
Referenced by archivefiles(), and packages().
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.
void trigproc_reset_cycle | ( | void | ) |
void trigproc_run_deferred | ( | void | ) |
References dbg_triggers, debug(), and pkg_queue_is_empty().
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().
int updateavailable | ( | const char *const * | argv | ) |
References _, act_avclear, act_avmerge, act_avreplace, cmdinfo::arg_int, AVAILFILE, badusage(), cipaction, dpkg_db_get_dir(), dpkg_db_get_path(), f_noact, internerr, modstatdb_done(), modstatdb_init(), modstatdb_lock(), modstatdb_unlock(), ohshit(), ohshite(), cmdinfo::olong, P_, parsedb(), pdb_dash_is_stdin, pdb_ignoreolder, pdb_parse_available, wdb_dump_available, and writedb().
int validate_archname | ( | const char *const * | argv | ) |
References _, badusage(), cipaction, dpkg_arch_name_is_illegal(), ohshit(), and cmdinfo::olong.
int validate_pkgname | ( | const char *const * | argv | ) |
References _, badusage(), cipaction, ohshit(), cmdinfo::olong, and pkg_name_is_illegal().
int validate_trigname | ( | const char *const * | argv | ) |
References _, badusage(), cipaction, ohshit(), cmdinfo::olong, and trig_name_is_illegal().
int validate_version | ( | const char *const * | argv | ) |
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().
bool verify_set_output | ( | const char * | name | ) |
bool wanttoinstall | ( | struct pkginfo * | pkg | ) |
Decide whether we want to install a new version of the package.
pkg | The package with the version we might want to install |
true | If the package should be skipped. |
false | If 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().
|
extern |
Referenced by process_queue().
|
extern |
Referenced by assert_feature().
|
extern |
int f_alsoselect |
|
extern |
Referenced by check_breaks().
int f_noact |
int f_nodebsig |
|
extern |
Referenced by deferred_remove(), and packages().
int f_recursive |
|
extern |
int f_skipsame |
|
extern |
|
extern |
Referenced by ignore_depends().
|
extern |
Referenced by deferred_configure(), deferred_remove(), and trigproc().
|
extern |
Referenced by depisok().