dpkg 1.21.11
|
#include <config.h>
#include <compat.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <errno.h>
#include <string.h>
#include <time.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
#include <obstack.h>
#include <dpkg/i18n.h>
#include <dpkg/dpkg.h>
#include <dpkg/dpkg-db.h>
#include <dpkg/pkg.h>
#include <dpkg/path.h>
#include <dpkg/fdio.h>
#include <dpkg/buffer.h>
#include <dpkg/subproc.h>
#include <dpkg/command.h>
#include <dpkg/file.h>
#include <dpkg/treewalk.h>
#include <dpkg/tarfn.h>
#include <dpkg/options.h>
#include <dpkg/triglib.h>
#include <dpkg/db-ctrl.h>
#include <dpkg/db-fsys.h>
#include "main.h"
#include "archives.h"
#include "filters.h"
Macros | |
#define | obstack_chunk_alloc m_malloc |
#define | obstack_chunk_free free |
Functions | |
struct fsys_namenode_list * | tar_fsys_namenode_queue_push (struct fsys_namenode_queue *queue, struct fsys_namenode *namenode) |
bool | filesavespackage (struct fsys_namenode_list *file, struct pkginfo *pkgtobesaved, struct pkginfo *pkgbeinginstalled) |
Check if a file or directory will save a package from disappearance. More... | |
void | cu_pathname (int argc, void **argv) |
int | tarfileread (struct tar_archive *tar, char *buf, int len) |
void | setupfnamevbs (const char *filename) |
int | tarobject (struct tar_archive *tar, struct tar_entry *ti) |
void | tar_deferred_extract (struct fsys_namenode_list *files, struct pkginfo *pkg) |
void | enqueue_deconfigure (struct pkginfo *pkg, struct pkginfo *pkg_removal, enum pkgwant reason) |
void | clear_deconfigure_queue (void) |
void | check_breaks (struct dependency *dep, struct pkginfo *pkg, const char *pfilename) |
void | check_conflict (struct dependency *dep, struct pkginfo *pkg, const char *pfilename) |
void | cu_cidir (int argc, void **argv) |
void | cu_fileslist (int argc, void **argv) |
int | archivefiles (const char *const *argv) |
bool | wanttoinstall (struct pkginfo *pkg) |
Decide whether we want to install a new version of the package. More... | |
Variables | |
struct varbuf_state | fname_state |
struct varbuf_state | fnametmp_state |
struct varbuf_state | fnamenew_state |
struct varbuf | fnamevb |
struct varbuf | fnametmpvb |
struct varbuf | fnamenewvb |
struct pkg_deconf_list * | deconfigure = NULL |
#define obstack_chunk_alloc m_malloc |
#define obstack_chunk_free free |
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().
void check_breaks | ( | struct dependency * | dep, |
struct pkginfo * | pkg, | ||
const char * | pfilename | ||
) |
References _, pkginfo::available, pkginfo::clientdata, depisok(), ensure_package_clientdata(), f_autodeconf, internerr, perpackagestate::istobe, notice(), PKG_ISTOBE_NORMAL, pkg_name(), pkgbin_name(), pnaw_always, pnaw_nonambig, varbuf_destroy(), varbuf_end_str(), and VARBUF_INIT.
void check_conflict | ( | struct dependency * | dep, |
struct pkginfo * | pkg, | ||
const char * | pfilename | ||
) |
References pkginfo::available, pkginfo::clientdata, depisok(), ensure_package_clientdata(), pkgbin::essential, pkginfo::installed, pkgbin::is_protected, perpackagestate::istobe, PKG_ISTOBE_INSTALLNEW, PKG_WANT_HOLD, PKG_WANT_INSTALL, dependency::up, varbuf_destroy(), VARBUF_INIT, and pkginfo::want.
void clear_deconfigure_queue | ( | void | ) |
References deconfigure, and pkg_deconf_list::next.
void cu_cidir | ( | int | argc, |
void ** | argv | ||
) |
void cu_fileslist | ( | int | argc, |
void ** | argv | ||
) |
void cu_pathname | ( | int | argc, |
void ** | argv | ||
) |
void enqueue_deconfigure | ( | struct pkginfo * | pkg, |
struct pkginfo * | pkg_removal, | ||
enum pkgwant | reason | ||
) |
References pkginfo::clientdata, deconfigure, ensure_package_clientdata(), perpackagestate::istobe, m_malloc(), pkg_deconf_list::next, pkg_deconf_list::pkg, PKG_ISTOBE_DECONFIGURE, pkg_deconf_list::pkg_removal, and pkg_deconf_list::reason.
bool filesavespackage | ( | struct fsys_namenode_list * | file, |
struct pkginfo * | pkgtobesaved, | ||
struct pkginfo * | pkgbeinginstalled | ||
) |
Check if a file or directory will save a package from disappearance.
A package can only be saved by a file or directory which is part only of itself - it must be neither part of the new package being installed nor part of any 3rd package (this is important so that shared directories don't stop packages from disappearing).
References dbg_eachfiledetail, debug(), pkginfo::files_list_valid, FNNF_NEW_INARCHIVE, fsys_node_pkgs_iter_free(), fsys_node_pkgs_iter_new(), fsys_node_pkgs_iter_next(), pkginfo::installed, pkgbin::multiarch, file::name, PKG_MULTIARCH_SAME, pkg_name(), pnaw_always, and pkginfo::set.
void setupfnamevbs | ( | const char * | filename | ) |
References varbuf::buf, dbg_eachfiledetail, debug(), DPKGNEWEXT, DPKGTEMPEXT, fname_state, fnamenew_state, fnamenewvb, fnametmp_state, fnametmpvb, fnamevb, varbuf_add_str, varbuf_end_str(), and varbuf_rollback().
Referenced by cu_installnew(), and tarobject().
void tar_deferred_extract | ( | struct fsys_namenode_list * | files, |
struct pkginfo * | pkg | ||
) |
struct fsys_namenode_list * tar_fsys_namenode_queue_push | ( | struct fsys_namenode_queue * | queue, |
struct fsys_namenode * | namenode | ||
) |
int tarfileread | ( | struct tar_archive * | tar, |
char * | buf, | ||
int | len | ||
) |
References _, tarcontext::backendpipe, tar_archive::ctx, fd_read(), and ohshite().
Referenced by process_archive().
int tarobject | ( | struct tar_archive * | tar, |
struct tar_entry * | ti | ||
) |
References _, pkginfo::available, varbuf::buf, fsys_diversion::camefrom, conffderef(), tar_archive::ctx, dbg_conff, dbg_eachfile, dbg_eachfiledetail, debug(), fsys_namenode::divert, fsys_namenode::flags, fnametmpvb, fnamevb, FNNF_NEW_CONFF, FNNF_NEW_INARCHIVE, FNNF_RM_CONFF_ON_UPGRADE, FORCE_OVERWRITE_DIVERTED, forcibleerr(), fsys_hash_find_node(), file_stat::gid, tar_entry::linkname, MD5HASHLEN, file_stat::mode, pkgset::name, fsys_namenode::name, tar_entry::name, fsys_namenode_list::namenode, namenodetouse(), tarcontext::newfiles_queue, ohshit(), ohshite(), tarcontext::pkg, fsys_diversion::pkgset, setupfnamevbs(), tar_entry::stat, fsys_namenode::statoverride, fsys_namenode_queue::tail, tar_entry_update_from_system(), TAR_FILETYPE_SYMLINK, tar_fsys_namenode_queue_push(), trig_file_activate(), tar_entry::type, file_stat::uid, and fsys_diversion::useinstead.
Referenced by process_archive().
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().
struct pkg_deconf_list* deconfigure = NULL |
Referenced by clear_deconfigure_queue(), and enqueue_deconfigure().
struct varbuf_state fname_state |
Referenced by setupfnamevbs().
struct varbuf_state fnamenew_state |
Referenced by setupfnamevbs().
struct varbuf fnamenewvb |
Referenced by cu_installnew(), and setupfnamevbs().
struct varbuf_state fnametmp_state |
Referenced by setupfnamevbs().
struct varbuf fnametmpvb |
Referenced by cu_installnew(), setupfnamevbs(), and tarobject().
struct varbuf fnamevb |
Referenced by cu_installnew(), setupfnamevbs(), and tarobject().