summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog1
-rw-r--r--dpkg-deb/info.c2
-rw-r--r--dselect/baselist.cc2
-rw-r--r--dselect/method.cc2
-rw-r--r--lib/dpkg/atomic-file.c2
-rw-r--r--lib/dpkg/db-ctrl-access.c2
-rw-r--r--lib/dpkg/db-ctrl-upgrade.c4
-rw-r--r--lib/dpkg/db-fsys-files.c2
-rw-r--r--lib/dpkg/ehandle.c32
-rw-r--r--lib/dpkg/ehandle.h6
-rw-r--r--lib/dpkg/file.c2
-rw-r--r--lib/dpkg/libdpkg.map1
-rw-r--r--lib/dpkg/parse.c2
-rw-r--r--lib/dpkg/subproc.c2
-rw-r--r--lib/dpkg/t/t-ehandle.c2
-rw-r--r--lib/dpkg/triglib.c4
-rw-r--r--src/archives.c4
-rw-r--r--src/configure.c2
-rw-r--r--src/divertcmd.c2
-rw-r--r--src/remove.c4
-rw-r--r--src/script.c2
-rw-r--r--src/unpack.c32
22 files changed, 72 insertions, 42 deletions
diff --git a/debian/changelog b/debian/changelog
index 227839fc8..38078b2d1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -190,6 +190,7 @@ dpkg (1.19.1) UNRELEASED; urgency=medium
- libdpkg: Switch to a new tiny struct to track file on-disk identity.
This should reduce the run-time memory used.
- libdpkg: Reset nfiles in files_db_reset().
+ - libdpkg: Split push_cleanup() into push_cleanup_fallback().
* Build system:
- Set distribution tarball format to ustar, instead of default v7 format.
- Mark PO4A and POD2MAN as precious variables.
diff --git a/dpkg-deb/info.c b/dpkg-deb/info.c
index 8169507c5..794eeb051 100644
--- a/dpkg-deb/info.c
+++ b/dpkg-deb/info.c
@@ -71,7 +71,7 @@ static void info_prepare(const char *const **argvp,
ohshite(_("unable to create temporary directory"));
*dirp = dbuf;
- push_cleanup(cu_info_prepare, -1, NULL, 0, 1, (void *)dbuf);
+ push_cleanup(cu_info_prepare, -1, 1, (void *)dbuf);
extracthalf(*debarp, dbuf, DPKG_TAR_EXTRACT | DPKG_TAR_NOMTIME, admininfo);
}
diff --git a/dselect/baselist.cc b/dselect/baselist.cc
index 80fee6935..05465fc92 100644
--- a/dselect/baselist.cc
+++ b/dselect/baselist.cc
@@ -101,7 +101,7 @@ baselist::setupsigwinch()
if (sigaction(SIGWINCH, nullptr, osigactp))
ohshite(_("failed to get old SIGWINCH sigact"));
- push_cleanup(cu_sigwinch, ~0, nullptr, 0, 2, osigactp, oblockedp);
+ push_cleanup(cu_sigwinch, ~0, 2, osigactp, oblockedp);
sigwinch_mask(SIG_BLOCK);
diff --git a/dselect/method.cc b/dselect/method.cc
index 76863bc34..0f17431b5 100644
--- a/dselect/method.cc
+++ b/dselect/method.cc
@@ -125,7 +125,7 @@ static enum urqresult lockmethod(void) {
sthfailed(_("cannot lock access method area"));
return urqr_fail;
}
- push_cleanup(cu_unlockmethod, ~0, nullptr, 0, 0);
+ push_cleanup(cu_unlockmethod, ~0, 0);
return urqr_normal;
}
diff --git a/lib/dpkg/atomic-file.c b/lib/dpkg/atomic-file.c
index b49a47b9b..20b1fb37e 100644
--- a/lib/dpkg/atomic-file.c
+++ b/lib/dpkg/atomic-file.c
@@ -58,7 +58,7 @@ atomic_file_open(struct atomic_file *file)
file->name_new);
fchmod(fileno(file->fp), 0644);
- push_cleanup(cu_closestream, ~ehflag_normaltidy, NULL, 0, 1, file->fp);
+ push_cleanup(cu_closestream, ~ehflag_normaltidy, 1, file->fp);
}
void
diff --git a/lib/dpkg/db-ctrl-access.c b/lib/dpkg/db-ctrl-access.c
index bd98d1409..d31f5466f 100644
--- a/lib/dpkg/db-ctrl-access.c
+++ b/lib/dpkg/db-ctrl-access.c
@@ -81,7 +81,7 @@ pkg_infodb_foreach(struct pkginfo *pkg, struct pkgbin *pkgbin,
if (!db_dir)
ohshite(_("cannot read info directory"));
- push_cleanup(cu_closedir, ~0, NULL, 0, 1, (void *)db_dir);
+ push_cleanup(cu_closedir, ~0, 1, (void *)db_dir);
while ((db_de = readdir(db_dir)) != NULL) {
const char *filename, *filetype, *dot;
diff --git a/lib/dpkg/db-ctrl-upgrade.c b/lib/dpkg/db-ctrl-upgrade.c
index fc88bd4d0..1770ecaeb 100644
--- a/lib/dpkg/db-ctrl-upgrade.c
+++ b/lib/dpkg/db-ctrl-upgrade.c
@@ -91,7 +91,7 @@ pkg_infodb_link_multiarch_files(void)
if (!db_dir)
ohshite(_("cannot read info directory"));
- push_cleanup(cu_closedir, ~0, NULL, 0, 1, (void *)db_dir);
+ push_cleanup(cu_closedir, ~0, 1, (void *)db_dir);
while ((db_de = readdir(db_dir)) != NULL) {
const char *filetype, *dot;
struct pkginfo *pkg;
@@ -213,7 +213,7 @@ pkg_infodb_upgrade_to_multiarch(void)
db_file = atomic_file_new(db_format_file, 0);
atomic_file_open(db_file);
- push_cleanup(cu_abort_db_upgrade, ehflag_bombout, NULL, 0, 1, db_file);
+ push_cleanup(cu_abort_db_upgrade, ehflag_bombout, 1, db_file);
pkg_infodb_link_multiarch_files();
pkg_infodb_write_format(db_file, 1);
diff --git a/lib/dpkg/db-fsys-files.c b/lib/dpkg/db-fsys-files.c
index bfc2ccbe6..ff2ee7063 100644
--- a/lib/dpkg/db-fsys-files.c
+++ b/lib/dpkg/db-fsys-files.c
@@ -117,7 +117,7 @@ ensure_packagefiles_available(struct pkginfo *pkg)
return;
}
- push_cleanup(cu_closefd, ehflag_bombout, NULL, 0, 1, &fd);
+ push_cleanup(cu_closefd, ehflag_bombout, 1, &fd);
if (fstat(fd, &stat_buf))
ohshite(_("unable to stat files list file for package '%.250s'"),
diff --git a/lib/dpkg/ehandle.c b/lib/dpkg/ehandle.c
index f21fb07e9..ae3b46aad 100644
--- a/lib/dpkg/ehandle.c
+++ b/lib/dpkg/ehandle.c
@@ -324,9 +324,11 @@ void push_checkpoint(int mask, int value) {
econtext->cleanups= cep;
}
-void push_cleanup(void (*call1)(int argc, void **argv), int mask1,
+static void
+cleanup_entry_new(void (*call1)(int argc, void **argv), int mask1,
void (*call2)(int argc, void **argv), int mask2,
- unsigned int nargs, ...) {
+ unsigned int nargs, va_list vargs)
+{
struct cleanup_entry *cep;
void **argv;
int e = 0;
@@ -343,7 +345,8 @@ void push_cleanup(void (*call1)(int argc, void **argv), int mask1,
cep->calls[0].call= call1; cep->calls[0].mask= mask1;
cep->calls[1].call= call2; cep->calls[1].mask= mask2;
cep->cpmask=~0; cep->cpvalue=0; cep->argc= nargs;
- va_start(args, nargs);
+
+ va_copy(args, vargs);
argv = cep->argv;
while (nargs-- > 0)
*argv++ = va_arg(args, void *);
@@ -359,6 +362,29 @@ void push_cleanup(void (*call1)(int argc, void **argv), int mask1,
onerr_abort--;
}
+void
+push_cleanup(void (*call)(int argc, void **argv), int mask,
+ unsigned int nargs, ...)
+{
+ va_list args;
+
+ va_start(args, nargs);
+ cleanup_entry_new(call, mask, NULL, 0, nargs, args);
+ va_end(args);
+}
+
+void
+push_cleanup_fallback(void (*call1)(int argc, void **argv), int mask1,
+ void (*call2)(int argc, void **argv), int mask2,
+ unsigned int nargs, ...)
+{
+ va_list args;
+
+ va_start(args, nargs);
+ cleanup_entry_new(call1, mask1, call2, mask2, nargs, args);
+ va_end(args);
+}
+
void pop_cleanup(int flagset) {
struct cleanup_entry *cep;
int i;
diff --git a/lib/dpkg/ehandle.h b/lib/dpkg/ehandle.h
index 370614812..36059048a 100644
--- a/lib/dpkg/ehandle.h
+++ b/lib/dpkg/ehandle.h
@@ -59,8 +59,10 @@ void push_error_context_func(error_handler_func *handler,
void push_error_context(void);
void pop_error_context(int flagset);
-void push_cleanup(void (*f1)(int argc, void **argv), int flagmask1,
- void (*f2)(int argc, void **argv), int flagmask2,
+void push_cleanup_fallback(void (*f1)(int argc, void **argv), int flagmask1,
+ void (*f2)(int argc, void **argv), int flagmask2,
+ unsigned int nargs, ...);
+void push_cleanup(void (*call)(int argc, void **argv), int flagmask,
unsigned int nargs, ...);
void push_checkpoint(int mask, int value);
void pop_cleanup(int flagset);
diff --git a/lib/dpkg/file.c b/lib/dpkg/file.c
index cd261222c..364f8aed6 100644
--- a/lib/dpkg/file.c
+++ b/lib/dpkg/file.c
@@ -150,7 +150,7 @@ file_lock(int *lockfd, enum file_lock_flags flags, const char *filename,
ohshite(_("unable to lock %s"), desc);
}
- push_cleanup(file_unlock_cleanup, ~0, NULL, 0, 2, lockfd, desc);
+ push_cleanup(file_unlock_cleanup, ~0, 2, lockfd, desc);
}
void
diff --git a/lib/dpkg/libdpkg.map b/lib/dpkg/libdpkg.map
index cf176d6c9..cd0bd255d 100644
--- a/lib/dpkg/libdpkg.map
+++ b/lib/dpkg/libdpkg.map
@@ -46,6 +46,7 @@ LIBDPKG_PRIVATE {
catch_fatal_error;
push_checkpoint;
push_cleanup;
+ push_cleanup_fallback;
pop_cleanup;
onerr_abort; # XXX variable, do not export
ohshitv;
diff --git a/lib/dpkg/parse.c b/lib/dpkg/parse.c
index d9daa112c..158e4d11e 100644
--- a/lib/dpkg/parse.c
+++ b/lib/dpkg/parse.c
@@ -557,7 +557,7 @@ parsedb_open(const char *filename, enum parsedbflags flags)
ps = parsedb_new(filename, fd, flags | pdb_close_fd);
- push_cleanup(cu_closefd, ~ehflag_normaltidy, NULL, 0, 1, &ps->fd);
+ push_cleanup(cu_closefd, ~ehflag_normaltidy, 1, &ps->fd);
return ps;
}
diff --git a/lib/dpkg/subproc.c b/lib/dpkg/subproc.c
index b2f36ec2e..7b3fb9906 100644
--- a/lib/dpkg/subproc.c
+++ b/lib/dpkg/subproc.c
@@ -73,7 +73,7 @@ subproc_signals_ignore(const char *name)
for (i = 0; i < array_count(signo_ignores); i++)
subproc_set_signal(signo_ignores[i], &sa, &sa_save[i], name);
- push_cleanup(subproc_signals_cleanup, ~0, NULL, 0, 0);
+ push_cleanup(subproc_signals_cleanup, ~0, 0);
onerr_abort--;
}
diff --git a/lib/dpkg/t/t-ehandle.c b/lib/dpkg/t/t-ehandle.c
index 5904bfae1..7a20887af 100644
--- a/lib/dpkg/t/t-ehandle.c
+++ b/lib/dpkg/t/t-ehandle.c
@@ -100,7 +100,7 @@ test_cleanup_error(void)
pass = false;
push_error_context_jump(&handler_jump, printer_empty, "test cleanup");
- push_cleanup(cleanup_error, ~ehflag_normaltidy, NULL, 0, 0);
+ push_cleanup(cleanup_error, ~ehflag_normaltidy, 0);
pop_error_context(ehflag_bombout);
/* We should have recovered from the cleanup handler failing,
diff --git a/lib/dpkg/triglib.c b/lib/dpkg/triglib.c
index 395601359..f7488ee61 100644
--- a/lib/dpkg/triglib.c
+++ b/lib/dpkg/triglib.c
@@ -507,7 +507,7 @@ trig_file_interests_ensure(void)
triggersfilefile);
}
- push_cleanup(cu_closestream, ~0, NULL, 0, 1, f);
+ push_cleanup(cu_closestream, ~0, 1, f);
while (fgets_checked(linebuf, sizeof(linebuf), f, triggersfilefile) >= 0) {
struct dpkg_error err;
char *slash;
@@ -694,7 +694,7 @@ trig_parse_ci(const char *file, trig_parse_cicb *interest,
return; /* No file is just like an empty one. */
ohshite(_("unable to open triggers ci file '%.250s'"), file);
}
- push_cleanup(cu_closestream, ~0, NULL, 0, 1, f);
+ push_cleanup(cu_closestream, ~0, 1, f);
while ((l = fgets_checked(linebuf, sizeof(linebuf), f, file)) >= 0) {
for (cmd = linebuf; c_iswhite(*cmd); cmd++) ;
diff --git a/src/archives.c b/src/archives.c
index 4c5fb8897..e802baaee 100644
--- a/src/archives.c
+++ b/src/archives.c
@@ -362,7 +362,7 @@ tarobject_extract(struct tarcontext *tc, struct tar_entry *te,
if (fd < 0)
ohshite(_("unable to create '%.255s' (while processing '%.255s')"),
path, te->name);
- push_cleanup(cu_closefd, ehflag_bombout, NULL, 0, 1, &fd);
+ push_cleanup(cu_closefd, ehflag_bombout, 1, &fd);
debug(dbg_eachfiledetail, "tarobject file open size=%jd",
(intmax_t)te->size);
@@ -965,7 +965,7 @@ tarobject(void *ctx, struct tar_entry *ti)
/* Now we start to do things that we need to be able to undo
* if something goes wrong. Watch out for the CLEANUP comments to
* keep an eye on what's installed on the disk at each point. */
- push_cleanup(cu_installnew, ~ehflag_normaltidy, NULL, 0, 1, nifd->namenode);
+ push_cleanup(cu_installnew, ~ehflag_normaltidy, 1, nifd->namenode);
/*
* CLEANUP: Now we either have the old file on the disk, or not, in
diff --git a/src/configure.c b/src/configure.c
index 2d9173eba..076abbd9d 100644
--- a/src/configure.c
+++ b/src/configure.c
@@ -831,7 +831,7 @@ md5hash(struct pkginfo *pkg, char *hashbuf, const char *fn)
fd = open(fn, O_RDONLY);
if (fd >= 0) {
- push_cleanup(cu_closefd, ehflag_bombout, NULL, 0, 1, &fd);
+ push_cleanup(cu_closefd, ehflag_bombout, 1, &fd);
if (fd_md5(fd, hashbuf, -1, &err) < 0)
ohshit(_("cannot compute MD5 hash for file '%s': %s"),
fn, err.str);
diff --git a/src/divertcmd.c b/src/divertcmd.c
index d50409d02..69d187c45 100644
--- a/src/divertcmd.c
+++ b/src/divertcmd.c
@@ -232,7 +232,7 @@ file_copy(const char *src, const char *dst)
if (dstfd < 0)
ohshite(_("unable to create file '%s'"), tmp);
- push_cleanup(cu_filename, ~ehflag_normaltidy, NULL, 0, 1, tmp);
+ push_cleanup(cu_filename, ~ehflag_normaltidy, 1, tmp);
if (fd_fd_copy(srcfd, dstfd, -1, &err) < 0)
ohshit(_("cannot copy '%s' to '%s': %s"), src, tmp, err.str);
diff --git a/src/remove.c b/src/remove.c
index 18d470aea..fb27341f6 100644
--- a/src/remove.c
+++ b/src/remove.c
@@ -189,7 +189,7 @@ void deferred_remove(struct pkginfo *pkg) {
oldpkgstatus= pkg->status;
pkg_set_status(pkg, PKG_STAT_HALFCONFIGURED);
modstatdb_note(pkg);
- push_cleanup(cu_prermremove, ~ehflag_normaltidy, NULL, 0, 2,
+ push_cleanup(cu_prermremove, ~ehflag_normaltidy, 2,
(void *)pkg, (void *)&oldpkgstatus);
maintscript_installed(pkg, PRERMFILE, "pre-removal", "remove", NULL);
@@ -564,7 +564,7 @@ static void removal_bulk_remove_configfiles(struct pkginfo *pkg) {
fnvb.buf, conff->name);
}
debug(dbg_conffdetail, "removal_bulk conffile cleaning dsd %s", fnvb.buf);
- push_cleanup(cu_closedir, ~0, NULL, 0, 1, (void *)dsd);
+ push_cleanup(cu_closedir, ~0, 1, (void *)dsd);
*p= '/';
conffbasenamelen= strlen(++p);
conffbasename= fnvb.buf+conffnameused-conffbasenamelen;
diff --git a/src/script.c b/src/script.c
index fc6f6117e..9c8585b64 100644
--- a/src/script.c
+++ b/src/script.c
@@ -171,7 +171,7 @@ maintscript_exec(struct pkginfo *pkg, struct pkgbin *pkgbin,
setexecute(cmd->filename, stab);
- push_cleanup(cu_post_script_tasks, ehflag_bombout, NULL, 0, 0);
+ push_cleanup(cu_post_script_tasks, ehflag_bombout, 0);
pid = subproc_fork();
if (pid == 0) {
diff --git a/src/unpack.c b/src/unpack.c
index cae756222..a42d0f7fa 100644
--- a/src/unpack.c
+++ b/src/unpack.c
@@ -94,7 +94,7 @@ deb_reassemble(const char **filename, const char **pfilename)
if (unlink(reasmbuf) && errno != ENOENT)
ohshite(_("error ensuring '%.250s' doesn't exist"), reasmbuf);
- push_cleanup(cu_pathname, ~0, NULL, 0, 1, (void *)reasmbuf);
+ push_cleanup(cu_pathname, ~0, 1, (void *)reasmbuf);
pid = subproc_fork();
if (!pid) {
@@ -291,9 +291,9 @@ pkg_deconfigure_others(struct pkginfo *pkg)
/* This means that we *either* go and run postinst abort-deconfigure,
* *or* queue the package for later configure processing, depending
* on which error cleanup route gets taken. */
- push_cleanup(cu_prermdeconfigure, ~ehflag_normaltidy,
- ok_prermdeconfigure, ehflag_normaltidy,
- 3, (void *)deconpil->pkg, (void *)removing, (void *)pkg);
+ push_cleanup_fallback(cu_prermdeconfigure, ~ehflag_normaltidy,
+ ok_prermdeconfigure, ehflag_normaltidy,
+ 3, (void *)deconpil->pkg, (void *)removing, (void *)pkg);
if (removing) {
maintscript_installed(deconpil->pkg, PRERMFILE, "pre-removal",
@@ -334,7 +334,7 @@ deb_parse_conffiles(struct pkginfo *pkg, const char *control_conffiles,
ohshite(_("error trying to open %.250s"), control_conffiles);
}
- push_cleanup(cu_closestream, ehflag_bombout, NULL, 0, 1, conff);
+ push_cleanup(cu_closestream, ehflag_bombout, 1, conff);
while (fgets(conffilenamebuf, MAXCONFFILENAME - 2, conff)) {
struct pkginfo *otherpkg;
@@ -495,7 +495,7 @@ pkg_infodb_update(struct pkginfo *pkg, char *cidir, char *cidirrest)
dsd = opendir(cidir);
if (!dsd)
ohshite(_("unable to open temp control directory"));
- push_cleanup(cu_closedir, ~0, NULL, 0, 1, (void *)dsd);
+ push_cleanup(cu_closedir, ~0, 1, (void *)dsd);
while ((de = readdir(dsd))) {
const char *newinfofilename;
@@ -1110,7 +1110,7 @@ void process_archive(const char *filename) {
/* Get the control information directory. */
cidir = get_control_dir(cidir);
cidirrest = cidir + strlen(cidir);
- push_cleanup(cu_cidir, ~0, NULL, 0, 2, (void *)cidir, (void *)cidirrest);
+ push_cleanup(cu_cidir, ~0, 2, (void *)cidir, (void *)cidirrest);
pid = subproc_fork();
if (pid == 0) {
@@ -1221,7 +1221,7 @@ void process_archive(const char *filename) {
/* Read the conffiles, and copy the hashes across. */
newconffiles.head = NULL;
newconffiles.tail = &newconffiles.head;
- push_cleanup(cu_fileslist, ~0, NULL, 0, 0);
+ push_cleanup(cu_fileslist, ~0, 0);
strcpy(cidirrest,CONFFILESFILE);
deb_parse_conffiles(pkg, cidir, &newconffiles);
@@ -1249,7 +1249,7 @@ void process_archive(const char *filename) {
pkg_set_eflags(pkg, PKG_EFLAG_REINSTREQ);
pkg_set_status(pkg, PKG_STAT_HALFCONFIGURED);
modstatdb_note(pkg);
- push_cleanup(cu_prermupgrade, ~ehflag_normaltidy, NULL, 0, 1, (void *)pkg);
+ push_cleanup(cu_prermupgrade, ~ehflag_normaltidy, 1, (void *)pkg);
if (dpkg_version_compare(&pkg->available.version,
&pkg->installed.version) >= 0)
/* Upgrade or reinstall. */
@@ -1282,7 +1282,7 @@ void process_archive(const char *filename) {
trig_activate_packageprocessing(conflictor);
pkg_set_status(conflictor, PKG_STAT_HALFCONFIGURED);
modstatdb_note(conflictor);
- push_cleanup(cu_prerminfavour, ~ehflag_normaltidy, NULL, 0,
+ push_cleanup(cu_prerminfavour, ~ehflag_normaltidy,
2, conflictor, pkg);
maintscript_installed(conflictor, PRERMFILE, "pre-removal",
"remove", "in-favour",
@@ -1302,12 +1302,12 @@ void process_archive(const char *filename) {
pkg_set_status(pkg, PKG_STAT_HALFINSTALLED);
modstatdb_note(pkg);
if (oldversionstatus == PKG_STAT_NOTINSTALLED) {
- push_cleanup(cu_preinstverynew, ~ehflag_normaltidy, NULL, 0,
+ push_cleanup(cu_preinstverynew, ~ehflag_normaltidy,
3,(void*)pkg,(void*)cidir,(void*)cidirrest);
maintscript_new(pkg, PREINSTFILE, "pre-installation", cidir, cidirrest,
"install", NULL);
} else if (oldversionstatus == PKG_STAT_CONFIGFILES) {
- push_cleanup(cu_preinstnew, ~ehflag_normaltidy, NULL, 0,
+ push_cleanup(cu_preinstnew, ~ehflag_normaltidy,
3,(void*)pkg,(void*)cidir,(void*)cidirrest);
maintscript_new(pkg, PREINSTFILE, "pre-installation", cidir, cidirrest,
"install",
@@ -1315,7 +1315,7 @@ void process_archive(const char *filename) {
versiondescribe(&pkg->available.version, vdew_nonambig),
NULL);
} else {
- push_cleanup(cu_preinstupgrade, ~ehflag_normaltidy, NULL, 0,
+ push_cleanup(cu_preinstupgrade, ~ehflag_normaltidy,
4,(void*)pkg,(void*)cidir,(void*)cidirrest,(void*)&oldversionstatus);
maintscript_new(pkg, PREINSTFILE, "pre-installation", cidir, cidirrest,
"upgrade",
@@ -1412,7 +1412,7 @@ void process_archive(const char *filename) {
*/
m_pipe(p1);
- push_cleanup(cu_closepipe, ehflag_bombout, NULL, 0, 1, (void *)&p1[0]);
+ push_cleanup(cu_closepipe, ehflag_bombout, 1, (void *)&p1[0]);
pid = subproc_fork();
if (pid == 0) {
m_dup2(p1[1],1); close(p1[0]); close(p1[1]);
@@ -1426,7 +1426,7 @@ void process_archive(const char *filename) {
newfiles_queue.head = NULL;
newfiles_queue.tail = &newfiles_queue.head;
tc.newfiles_queue = &newfiles_queue;
- push_cleanup(cu_fileslist, ~0, NULL, 0, 0);
+ push_cleanup(cu_fileslist, ~0, 0);
tc.pkg= pkg;
tc.backendpipe= p1[0];
tc.pkgset_getting_in_sync = pkgset_getting_in_sync(pkg);
@@ -1453,7 +1453,7 @@ void process_archive(const char *filename) {
* reduced to ‘unpacked’ by now, by the running of the prerm script. */
pkg_set_status(pkg, PKG_STAT_HALFINSTALLED);
modstatdb_note(pkg);
- push_cleanup(cu_postrmupgrade, ~ehflag_normaltidy, NULL, 0, 1, (void *)pkg);
+ push_cleanup(cu_postrmupgrade, ~ehflag_normaltidy, 1, (void *)pkg);
maintscript_fallback(pkg, POSTRMFILE, "post-removal", cidir, cidirrest,
"upgrade", "failed-upgrade");
}