dpkg 1.21.11
Data Structures | Functions | Variables
archives.h File Reference

(c192844eb)

#include <stdbool.h>
#include <dpkg/tarfn.h>
Include dependency graph for archives.h:
This graph shows which files directly or indirectly include this file:

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_listtar_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_listdeconfigure
 
int cleanup_pkg_failed
 
int cleanup_conflictor_failed
 

Function Documentation

◆ check_breaks()

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.

Here is the call graph for this function:

◆ check_conflict()

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.

Here is the call graph for this function:

◆ clear_deconfigure_queue()

void clear_deconfigure_queue ( void  )

◆ cu_backendpipe()

void cu_backendpipe ( int  argc,
void **  argv 
)

◆ cu_cidir()

void cu_cidir ( int  argc,
void **  argv 
)

References path_remove_tree().

Here is the call graph for this function:

◆ cu_fileslist()

void cu_fileslist ( int  argc,
void **  argv 
)

◆ cu_installnew()

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

Here is the call graph for this function:

◆ cu_pathname()

void cu_pathname ( int  argc,
void **  argv 
)

References path_remove_tree().

Here is the call graph for this function:

◆ cu_postrmupgrade()

void cu_postrmupgrade ( int  argc,
void **  argv 
)

References pkginfo::available, cleanup_pkg_failed, maintscript_installed(), PREINSTFILE, vdew_nonambig, pkgbin::version, and versiondescribe().

Here is the call graph for this function:

◆ cu_preinstnew()

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

Here is the call graph for this function:

◆ cu_preinstupgrade()

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

Here is the call graph for this function:

◆ cu_preinstverynew()

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.

Here is the call graph for this function:

◆ cu_prermdeconfigure()

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

Here is the call graph for this function:

◆ cu_prerminfavour()

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

Here is the call graph for this function:

◆ cu_prermupgrade()

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

Here is the call graph for this function:

◆ enqueue_conflictor()

void enqueue_conflictor ( struct pkginfo pkg)

References pkg_queue_push().

Here is the call graph for this function:

◆ enqueue_deconfigure()

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.

Here is the call graph for this function:

◆ filesavespackage()

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.

Here is the call graph for this function:

◆ ok_prermdeconfigure()

void ok_prermdeconfigure ( int  argc,
void **  argv 
)

References act_install, cmdinfo::arg_int, cipaction, and enqueue_package().

Here is the call graph for this function:

◆ setupfnamevbs()

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tar_deferred_extract()

void tar_deferred_extract ( struct fsys_namenode_list files,
struct pkginfo pkg 
)

◆ tar_fsys_namenode_queue_push()

struct fsys_namenode_list * tar_fsys_namenode_queue_push ( struct fsys_namenode_queue queue,
struct fsys_namenode namenode 
)

Referenced by tarobject().

Here is the caller graph for this function:

◆ tarfileread()

int tarfileread ( struct tar_archive tar,
char *  buf,
int  len 
)

References _, tarcontext::backendpipe, tar_archive::ctx, fd_read(), and ohshite().

Referenced by process_archive().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tarobject()

int tarobject ( struct tar_archive tar,
struct tar_entry ti 
)

Variable Documentation

◆ cleanup_conflictor_failed

int cleanup_conflictor_failed

Referenced by process_archive().

◆ cleanup_pkg_failed

int cleanup_pkg_failed
extern

◆ deconfigure

struct pkg_deconf_list* deconfigure
extern

◆ fname_state

struct varbuf_state fname_state
extern

Referenced by setupfnamevbs().

◆ fnamenew_state

struct varbuf_state fnamenew_state
extern

Referenced by setupfnamevbs().

◆ fnamenewvb

struct varbuf fnamenewvb
extern

Referenced by cu_installnew(), and setupfnamevbs().

◆ fnametmp_state

struct varbuf_state fnametmp_state
extern

Referenced by setupfnamevbs().

◆ fnametmpvb

struct varbuf fnametmpvb
extern

◆ fnamevb

struct varbuf fnamevb
extern