dpkg 1.21.11
|
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. More... | |
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. More... | |
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, 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_backendpipe | ( | int | argc, |
void ** | argv | ||
) |
void cu_cidir | ( | int | argc, |
void ** | argv | ||
) |
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().
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().
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().
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().
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.
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().
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().
void enqueue_conflictor | ( | struct pkginfo * | pkg | ) |
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 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, 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().
int cleanup_conflictor_failed |
Referenced by process_archive().
|
extern |
|
extern |
Referenced by clear_deconfigure_queue(), and enqueue_deconfigure().
|
extern |
Referenced by setupfnamevbs().
|
extern |
Referenced by setupfnamevbs().
|
extern |
Referenced by cu_installnew(), and setupfnamevbs().
|
extern |
Referenced by setupfnamevbs().
|
extern |
Referenced by cu_installnew(), setupfnamevbs(), and tarobject().
|
extern |
Referenced by cu_installnew(), setupfnamevbs(), and tarobject().