dpkg 1.21.11
|
#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"
Enumerations | |
enum | 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 } |
Functions | |
void | deferred_configure (struct pkginfo *pkg) |
Process the deferred configure package. More... | |
int | conffderef (struct pkginfo *pkg, struct varbuf *result, const char *in) |
Dereference a file by following all possibly used symlinks. More... | |
void | md5hash (struct pkginfo *pkg, char *hashbuf, const char *fn) |
Generate a file contents MD5 hash. More... | |
enum conffopt |
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 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 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().