dpkg 1.21.11
Enumerations | Functions
configure.c File Reference

(73a0987a8)

#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"
Include dependency graph for configure.c:

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...
 

Enumeration Type Documentation

◆ conffopt

enum conffopt
Enumerator
CFOF_PROMPT 
CFOF_KEEP 
CFOF_INSTALL 
CFOF_BACKUP 
CFOF_NEW_CONFF 
CFOF_IS_NEW 
CFOF_IS_OLD 
CFOF_USER_DEL 
CFO_KEEP 
CFO_IDENTICAL 
CFO_INSTALL 
CFO_NEW_CONFF 
CFO_PROMPT 
CFO_PROMPT_KEEP 
CFO_PROMPT_INSTALL 

Function Documentation

◆ 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:

◆ deferred_configure()

void deferred_configure ( struct pkginfo pkg)

◆ 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: