dpkg 1.22.7-3-g89f48
|
Go to the source code of this file.
Data Structures | |
struct | tarcontext |
struct | pkg_deconf_list |
Functions | |
void | clear_deconfigure_queue (void) |
void | enqueue_deconfigure (struct pkginfo *pkg, struct pkginfo *pkg_removal, enum pkgwant reason) |
void | enqueue_conflictor (struct pkginfo *pkg) |
void | cu_pathname (int argc, void **argv) |
void | cu_cidir (int argc, void **argv) |
void | cu_fileslist (int argc, void **argv) |
void | cu_backendpipe (int argc, void **argv) |
void | cu_installnew (int argc, void **argv) |
Something went wrong and we're undoing. | |
void | cu_prermupgrade (int argc, void **argv) |
void | cu_prerminfavour (int argc, void **argv) |
void | cu_preinstverynew (int argc, void **argv) |
void | cu_preinstnew (int argc, void **argv) |
void | cu_preinstupgrade (int argc, void **argv) |
void | cu_postrmupgrade (int argc, void **argv) |
void | cu_prermdeconfigure (int argc, void **argv) |
void | ok_prermdeconfigure (int argc, void **argv) |
void | setupfnamevbs (const char *filename) |
int | tarobject (struct tar_archive *tar, struct tar_entry *ti) |
int | tarfileread (struct tar_archive *tar, char *buf, int len) |
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) |
bool | filesavespackage (struct fsys_namenode_list *, struct pkginfo *, struct pkginfo *pkgbeinginstalled) |
Check if a file or directory will save a package from disappearance. | |
void | check_conflict (struct dependency *dep, struct pkginfo *pkg, const char *pfilename) |
void | check_breaks (struct dependency *dep, struct pkginfo *pkg, const char *pfilename) |
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 |
int | cleanup_pkg_failed |
int | cleanup_conflictor_failed |
void check_breaks | ( | struct dependency * | dep, |
struct pkginfo * | pkg, | ||
const char * | pfilename | ||
) |
References _, pkginfo::available, pkginfo::clientdata, depisok(), ensure_package_clientdata(), f_autodeconf, force_breaks(), internerr, perpackagestate::istobe, dependency::list, notice(), ohshit(), PKG_ISTOBE_NORMAL, pkg_name(), pkgbin_name(), pnaw_always, pnaw_nonambig, varbuf_destroy(), VARBUF_INIT, varbuf_str(), and warning().
void check_conflict | ( | struct dependency * | dep, |
struct pkginfo * | pkg, | ||
const char * | pfilename | ||
) |
References _, pkginfo::available, dep_depends, dep_predepends, dep_provides, depisok(), enqueue_conflictor(), ensure_package_clientdata(), pkgbin::essential, force_conflicts(), FORCE_REMOVE_ESSENTIAL, FORCE_REMOVE_PROTECTED, FORCE_REMOVE_REINSTREQ, in_force(), internerr, pkgbin::is_protected, notice(), ohshit(), PKG_EFLAG_REINSTREQ, PKG_ISTOBE_DECONFIGURE, PKG_ISTOBE_INSTALLNEW, PKG_ISTOBE_NORMAL, PKG_ISTOBE_REMOVE, pkg_name(), PKG_STAT_INSTALLED, PKG_STAT_TRIGGERSAWAITED, PKG_STAT_TRIGGERSPENDING, PKG_WANT_HOLD, PKG_WANT_INSTALL, pkgbin_name(), pnaw_always, pnaw_nonambig, skip_due_to_hold(), dependency::type, varbuf_destroy(), VARBUF_INIT, varbuf_str(), and warning().
void clear_deconfigure_queue | ( | void | ) |
References deconfigure, and pkg_deconf_list::next.
Referenced by process_archive().
void cu_backendpipe | ( | int | argc, |
void ** | argv | ||
) |
void cu_cidir | ( | int | argc, |
void ** | argv | ||
) |
References path_remove_tree(), and dependency::type.
Referenced by process_archive().
void cu_fileslist | ( | int | argc, |
void ** | argv | ||
) |
void cu_installnew | ( | int | argc, |
void ** | argv | ||
) |
Something went wrong and we're undoing.
We have the following possible situations for non-conffiles: «pathname».dpkg-tmp exists - in this case we want to remove «pathname» if it exists and replace it with «pathname».dpkg-tmp. This undoes the backup operation. «pathname».dpkg-tmp does not exist - «pathname» may be on the disk, as a new file which didn't fail, remove it if it is.
In both cases, we also make sure we delete «pathname».dpkg-new in case that's still hanging around.
For conffiles, we simply delete «pathname».dpkg-new. For these, «pathname».dpkg-tmp shouldn't exist, as we don't make a backup at this stage. Just to be on the safe side, though, we don't look for it.
References _, varbuf::buf, cleanup_conflictor_failed, cleanup_pkg_failed, dbg_eachfile, dbg_eachfiledetail, debug(), fsys_namenode::flags, fnamenewvb, fnametmpvb, fnamevb, FNNF_NEW_CONFF, FNNF_NO_ATOMIC_OVERWRITE, FNNF_PLACED_ON_DISK, fsys_namenode::name, ohshite(), secure_remove(), and setupfnamevbs().
Referenced by tarobject().
void cu_pathname | ( | int | argc, |
void ** | argv | ||
) |
void cu_postrmupgrade | ( | int | argc, |
void ** | argv | ||
) |
References pkginfo::available, cleanup_pkg_failed, maintscript_installed(), PREINSTFILE, vdew_nonambig, pkgbin::version, and versiondescribe().
Referenced by process_archive().
void cu_preinstnew | ( | int | argc, |
void ** | argv | ||
) |
References pkginfo::available, cleanup_pkg_failed, pkginfo::installed, maintscript_new(), modstatdb_note(), pkg_clear_eflags(), PKG_EFLAG_REINSTREQ, pkg_set_status(), PKG_STAT_CONFIGFILES, POSTRMFILE, vdew_nonambig, pkgbin::version, and versiondescribe().
Referenced by process_archive().
void cu_preinstupgrade | ( | int | argc, |
void ** | argv | ||
) |
References pkginfo::available, cleanup_pkg_failed, pkginfo::installed, maintscript_new(), modstatdb_note(), pkg_clear_eflags(), PKG_EFLAG_REINSTREQ, pkg_set_status(), POSTRMFILE, vdew_nonambig, pkgbin::version, and versiondescribe().
Referenced by process_archive().
void cu_preinstverynew | ( | int | argc, |
void ** | argv | ||
) |
References cleanup_pkg_failed, pkginfo::installed, maintscript_new(), modstatdb_note(), pkg_clear_eflags(), PKG_EFLAG_REINSTREQ, pkg_set_status(), PKG_STAT_NOTINSTALLED, pkgbin_blank(), and POSTRMFILE.
Referenced by process_archive().
void cu_prermdeconfigure | ( | int | argc, |
void ** | argv | ||
) |
References pkginfo::available, pkginfo::installed, maintscript_postinst(), pkg_name(), PKG_STAT_INSTALLED, pkgbin_name(), pnaw_nonambig, post_postinst_tasks(), vdew_nonambig, pkgbin::version, and versiondescribe().
void cu_prerminfavour | ( | int | argc, |
void ** | argv | ||
) |
References pkginfo::available, cleanup_conflictor_failed, maintscript_postinst(), pkg_clear_eflags(), PKG_EFLAG_REINSTREQ, PKG_STAT_INSTALLED, pkgbin_name(), pnaw_nonambig, post_postinst_tasks(), vdew_nonambig, pkgbin::version, and versiondescribe().
Referenced by process_archive().
void cu_prermupgrade | ( | int | argc, |
void ** | argv | ||
) |
References pkginfo::available, cleanup_pkg_failed, maintscript_postinst(), pkg_clear_eflags(), PKG_EFLAG_REINSTREQ, PKG_STAT_INSTALLED, post_postinst_tasks(), vdew_nonambig, pkgbin::version, and versiondescribe().
Referenced by process_archive().
void enqueue_conflictor | ( | struct pkginfo * | pkg | ) |
References pkg_queue_push().
Referenced by check_conflict().
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.
Referenced by process_archive().
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 ok_prermdeconfigure | ( | int | argc, |
void ** | argv | ||
) |
References act_install, cmdinfo::arg_int, cipaction, and enqueue_package().
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, and varbuf_rollback().
Referenced by cu_installnew(), tar_deferred_extract(), and tarobject().
void tar_deferred_extract | ( | struct fsys_namenode_list * | files, |
struct pkginfo * | pkg | ||
) |
References _, pkginfo::available, varbuf::buf, dbg_eachfile, dbg_eachfiledetail, debug(), fsys_namenode::flags, fnamenewvb, fnamevb, FNNF_DEFERRED_FSYNC, FNNF_DEFERRED_RENAME, FNNF_ELIDE_OTHER_LISTS, FNNF_PLACED_ON_DISK, fsys_namenode::name, fsys_namenode_list::namenode, namenodetouse(), fsys_namenode_list::next, ohshite(), and setupfnamevbs().
Referenced by process_archive().
struct fsys_namenode_list * tar_fsys_namenode_queue_push | ( | struct fsys_namenode_queue * | queue, |
struct fsys_namenode * | namenode | ||
) |
References fsys_namenode_list::namenode, fsys_namenode_list::next, and fsys_namenode_queue::tail.
Referenced by tarobject().
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, pkginfo::clientdata, conffderef(), CONFFILE_OBSOLETE, pkgbin::conffiles, tar_archive::ctx, cu_installnew(), dbg_conff, dbg_conffdetail, dbg_eachfile, dbg_eachfiledetail, debug(), fsys_namenode::divert, ehflag_normaltidy, EMPTYHASHFLAG, ensure_package_clientdata(), FHFF_NONE, file_readlink(), filter_should_skip(), conffile::flags, fsys_namenode::flags, fnamenewvb, fnametmpvb, fnamevb, FNNF_DEFERRED_RENAME, FNNF_ELIDE_OTHER_LISTS, FNNF_FILTERED, FNNF_NEW_CONFF, FNNF_NEW_INARCHIVE, FNNF_NO_ATOMIC_OVERWRITE, FNNF_OBS_CONFF, FNNF_PLACED_ON_DISK, FNNF_RM_CONFF_ON_UPGRADE, FORCE_OVERWRITE, FORCE_OVERWRITE_DIR, FORCE_OVERWRITE_DIVERTED, forcible_nonroot_error(), forcibleerr(), fsys_hash_find_node(), fsys_node_pkgs_iter_free(), fsys_node_pkgs_iter_new(), fsys_node_pkgs_iter_next(), file_stat::gid, in_force(), pkginfo::installed, perpackagestate::istobe, tar_entry::linkname, md5hash(), MD5HASHLEN, file_stat::mode, pkgbin::multiarch, conffile::name, pkgset::name, fsys_namenode::name, tar_entry::name, fsys_namenode_list::namenode, namenodetouse(), tarcontext::newfiles_queue, conffile::next, ohshit(), ohshite(), path_remove_tree(), tarcontext::pkg, PKG_ISTOBE_REMOVE, PKG_MULTIARCH_SAME, pkg_name(), PKG_STAT_CONFIGFILES, fsys_diversion::pkgset, tarcontext::pkgset_getting_in_sync, pnaw_always, pnaw_nonambig, push_cleanup(), perpackagestate::replacingfilesandsaid, pkginfo::set, setupfnamevbs(), tar_entry::stat, fsys_namenode::statoverride, pkginfo::status, fsys_namenode_queue::tail, tar_entry_update_from_system(), TAR_FILETYPE_BLOCKDEV, TAR_FILETYPE_CHARDEV, TAR_FILETYPE_DIR, TAR_FILETYPE_FIFO, TAR_FILETYPE_FILE, TAR_FILETYPE_HARDLINK, TAR_FILETYPE_SYMLINK, tar_fsys_namenode_queue_push(), trig_file_activate(), tar_entry::type, file_stat::uid, fsys_diversion::useinstead, vdew_nonambig, pkgbin::version, versiondescribe(), versiondescribe_c(), and warning().
Referenced by process_archive().
int cleanup_conflictor_failed |
Referenced by process_archive().
|
extern |
|
extern |
Referenced by clear_deconfigure_queue(), and enqueue_deconfigure().
|
extern |
Referenced by archivefiles(), and setupfnamevbs().
|
extern |
Referenced by archivefiles(), and setupfnamevbs().
|
extern |
Referenced by archivefiles(), cu_installnew(), setupfnamevbs(), tar_deferred_extract(), and tarobject().
|
extern |
Referenced by archivefiles(), and setupfnamevbs().
|
extern |
Referenced by archivefiles(), cu_installnew(), setupfnamevbs(), and tarobject().
|
extern |
Referenced by archivefiles(), cu_installnew(), setupfnamevbs(), tar_deferred_extract(), and tarobject().