dpkg 1.22.7-3-g89f48
|
#include <config.h>
#include <compat.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <string.h>
#include <time.h>
#include <utime.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <dpkg/i18n.h>
#include <dpkg/dpkg.h>
#include <dpkg/dpkg-db.h>
#include <dpkg/pkg.h>
#include <dpkg/path.h>
#include <dpkg/options.h>
#include <dpkg/db-fsys.h>
#include "main.h"
#include "archives.h"
Functions | |
void | cu_installnew (int argc, void **argv) |
Something went wrong and we're undoing. | |
void | cu_prermupgrade (int argc, void **argv) |
void | ok_prermdeconfigure (int argc, void **argv) |
void | cu_prermdeconfigure (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_prermremove (int argc, void **argv) |
Variables | |
int | cleanup_pkg_failed =0 |
int | cleanup_conflictor_failed =0 |
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_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_prermremove | ( | int | argc, |
void ** | argv | ||
) |
References cleanup_pkg_failed, maintscript_postinst(), pkg_clear_eflags(), PKG_EFLAG_REINSTREQ, and post_postinst_tasks().
Referenced by deferred_remove().
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 ok_prermdeconfigure | ( | int | argc, |
void ** | argv | ||
) |
References act_install, cmdinfo::arg_int, cipaction, and enqueue_package().
int cleanup_conflictor_failed =0 |
Referenced by cu_installnew(), and cu_prerminfavour().
int cleanup_pkg_failed =0 |