|
dpkg 1.22.7-3-g89f48
|
#include <config.h>#include <compat.h>#include <sys/types.h>#include <sys/stat.h>#include <sys/wait.h>#include <errno.h>#include <ctype.h>#include <string.h>#include <time.h>#include <fcntl.h>#include <dirent.h>#include <termios.h>#include <unistd.h>#include <stdint.h>#include <stdlib.h>#include <stdio.h>#include <dpkg/macros.h>#include <dpkg/i18n.h>#include <dpkg/dpkg.h>#include <dpkg/dpkg-db.h>#include <dpkg/pkg.h>#include <dpkg/buffer.h>#include <dpkg/file.h>#include <dpkg/path.h>#include <dpkg/subproc.h>#include <dpkg/command.h>#include <dpkg/pager.h>#include <dpkg/triglib.h>#include <dpkg/db-fsys.h>#include "main.h"Functions | |
| void | deferred_configure (struct pkginfo *pkg) |
| Process the deferred configure package. | |
| int | conffderef (struct pkginfo *pkg, struct varbuf *result, const char *in) |
| Dereference a file by following all possibly used symlinks. | |
| void | md5hash (struct pkginfo *pkg, char *hashbuf, const char *fn) |
| Generate a file contents MD5 hash. | |
Variables | |
| enum DPKG_ATTR_ENUM_FLAGS | conffopt |
| CFOF_PROMPT = DPKG_BIT(0) | |
| CFOF_KEEP = DPKG_BIT(1) | |
| CFOF_INSTALL = DPKG_BIT(2) | |
| CFOF_BACKUP = DPKG_BIT(3) | |
| CFOF_NEW_CONFF = DPKG_BIT(4) | |
| CFOF_IS_NEW = DPKG_BIT(5) | |
| CFOF_IS_OLD = DPKG_BIT(6) | |
| CFOF_USER_DEL = DPKG_BIT(7) | |
| CFO_KEEP = CFOF_KEEP | |
| CFO_IDENTICAL = CFOF_KEEP | |
| CFO_INSTALL = CFOF_INSTALL | |
| CFO_NEW_CONFF = CFOF_NEW_CONFF | CFOF_INSTALL | |
| CFO_PROMPT = CFOF_PROMPT | |
| CFO_PROMPT_KEEP = CFOF_PROMPT | CFOF_KEEP | |
| CFO_PROMPT_INSTALL = CFOF_PROMPT | CFOF_INSTALL | |
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(), file_readlink(), pkg_name(), pnaw_nonambig, varbuf::used, varbuf_add_str, varbuf_add_varbuf(), VARBUF_INIT, varbuf_set_str, varbuf_str(), varbuf_trunc(), and warning().
Referenced by tarobject().
| void deferred_configure | ( | struct pkginfo * | pkg | ) |
Process the deferred configure package.
| pkg | The package to act on. |
References _, pkginfo::arch_next, breakses_ok(), pkginfo::clientdata, conffile_is_disappearing(), pkgbin::conffiles, pkginfo::configversion, dbg_general, debug(), DEP_CHECK_DEFER, DEP_CHECK_HALT, DEPEND_TRY_CYCLES, dependencies_ok(), dpkg_version_compare(), dpkg_version_is_informative(), pkginfo::eflag, enqueue_package(), ensure_package_clientdata(), f_noact, findbreakcycle(), FORCE_REMOVE_REINSTREQ, forcibleerr(), pkginfo::installed, internerr, perpackagestate::istobe, log_action(), maintscript_postinst(), modstatdb_note(), conffile::next, notice(), ohshit(), pkgset::pkg, PKG_EFLAG_REINSTREQ, PKG_ISTOBE_INSTALLNEW, PKG_ISTOBE_NORMAL, pkg_name(), pkg_reset_eflags(), 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, post_postinst_tasks(), pkginfo::set, sincenothing, pkginfo::status, trig_activate_packageprocessing(), pkginfo::trigpend_head, trigproc_reset_cycle(), varbuf::used, varbuf_destroy(), VARBUF_INIT, varbuf_str(), vdew_nonambig, pkgbin::version, and versiondescribe().
Referenced by process_queue().
| 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, dpkg_error::type, and warning().
Referenced by tarobject().
| CFO_IDENTICAL = CFOF_KEEP |
| CFO_INSTALL = CFOF_INSTALL |
| CFO_KEEP = CFOF_KEEP |
| CFO_NEW_CONFF = CFOF_NEW_CONFF | CFOF_INSTALL |
| CFO_PROMPT = CFOF_PROMPT |
| CFO_PROMPT_INSTALL = CFOF_PROMPT | CFOF_INSTALL |
| CFO_PROMPT_KEEP = CFOF_PROMPT | CFOF_KEEP |
| CFOF_BACKUP = DPKG_BIT(3) |
| CFOF_INSTALL = DPKG_BIT(2) |
| CFOF_IS_NEW = DPKG_BIT(5) |
| CFOF_IS_OLD = DPKG_BIT(6) |
| CFOF_KEEP = DPKG_BIT(1) |
| CFOF_NEW_CONFF = DPKG_BIT(4) |
| CFOF_PROMPT = DPKG_BIT(0) |
| CFOF_USER_DEL = DPKG_BIT(7) |
| enum DPKG_ATTR_ENUM_FLAGS conffopt |