Example #1
0
void cu_prermremove(int argc, void **argv) {
  struct pkginfo *pkg= (struct pkginfo*)argv[0];
  enum pkgstatus *oldpkgstatus= (enum pkgstatus*)argv[1];

  if (cleanup_pkg_failed++) return;
  maintainer_script_postinst(pkg, "abort-remove", NULL);
  pkg_clear_eflags(pkg, eflag_reinstreq);
  post_postinst_tasks(pkg, *oldpkgstatus);
  cleanup_pkg_failed--;
}
Example #2
0
void cu_prermupgrade(int argc, void **argv) {
  struct pkginfo *pkg= (struct pkginfo*)argv[0];

  if (cleanup_pkg_failed++) return;
  maintscript_postinst(pkg, "abort-upgrade",
                       versiondescribe(&pkg->available.version, vdew_nonambig),
                       NULL);
  pkg_clear_eflags(pkg, PKG_EFLAG_REINSTREQ);
  post_postinst_tasks(pkg, PKG_STAT_INSTALLED);
  cleanup_pkg_failed--;
}
Example #3
0
void cu_prermupgrade(int argc, void **argv) {
  struct pkginfo *pkg= (struct pkginfo*)argv[0];

  if (cleanup_pkg_failed++) return;
  maintainer_script_postinst(pkg, "abort-upgrade",
                             versiondescribe(&pkg->available.version,
                                             vdew_nonambig),
                             NULL);
  pkg_clear_eflags(pkg, eflag_reinstreq);
  post_postinst_tasks(pkg, stat_installed);
  cleanup_pkg_failed--;
}
Example #4
0
void cu_preinstverynew(int argc, void **argv) {
  struct pkginfo *pkg= (struct pkginfo*)argv[0];
  char *cidir= (char*)argv[1];
  char *cidirrest= (char*)argv[2];

  if (cleanup_pkg_failed++) return;
  maintainer_script_new(pkg, POSTRMFILE, "post-removal", cidir, cidirrest,
                        "abort-install", NULL);
  pkg_set_status(pkg, stat_notinstalled);
  pkg_clear_eflags(pkg, eflag_reinstreq);
  pkgbin_blank(&pkg->installed);
  modstatdb_note(pkg);
  cleanup_pkg_failed--;
}
Example #5
0
void cu_prerminfavour(int argc, void **argv) {
  struct pkginfo *conflictor= (struct pkginfo*)argv[0];
  struct pkginfo *infavour= (struct pkginfo*)argv[1];

  if (cleanup_conflictor_failed++) return;
  maintainer_script_postinst(conflictor, "abort-remove",
                             "in-favour", infavour->set->name,
                             versiondescribe(&infavour->available.version,
                                             vdew_nonambig),
                             NULL);
  pkg_clear_eflags(conflictor, eflag_reinstreq);
  post_postinst_tasks(conflictor, stat_installed);
  cleanup_conflictor_failed--;
}
Example #6
0
void cu_preinstnew(int argc, void **argv) {
  struct pkginfo *pkg= (struct pkginfo*)argv[0];
  char *cidir= (char*)argv[1];
  char *cidirrest= (char*)argv[2];

  if (cleanup_pkg_failed++) return;
  maintainer_script_new(pkg, POSTRMFILE, "post-removal", cidir, cidirrest,
                        "abort-install", versiondescribe(&pkg->installed.version,
                                                         vdew_nonambig),
                        NULL);
  pkg_set_status(pkg, stat_configfiles);
  pkg_clear_eflags(pkg, eflag_reinstreq);
  modstatdb_note(pkg);
  cleanup_pkg_failed--;
}
Example #7
0
void cu_preinstnew(int argc, void **argv) {
  struct pkginfo *pkg= (struct pkginfo*)argv[0];
  char *cidir= (char*)argv[1];
  char *cidirrest= (char*)argv[2];

  if (cleanup_pkg_failed++) return;
  maintscript_new(pkg, POSTRMFILE, "post-removal", cidir, cidirrest,
                  "abort-install",
                  versiondescribe(&pkg->installed.version, vdew_nonambig),
                  versiondescribe(&pkg->available.version, vdew_nonambig),
                  NULL);
  pkg_set_status(pkg, PKG_STAT_CONFIGFILES);
  pkg_clear_eflags(pkg, PKG_EFLAG_REINSTREQ);
  modstatdb_note(pkg);
  cleanup_pkg_failed--;
}
Example #8
0
void cu_prerminfavour(int argc, void **argv) {
  struct pkginfo *conflictor= (struct pkginfo*)argv[0];
  struct pkginfo *infavour= (struct pkginfo*)argv[1];

  if (cleanup_conflictor_failed++) return;
  maintscript_postinst(conflictor, "abort-remove",
                       "in-favour",
                       pkgbin_name(infavour, &infavour->available,
                                   pnaw_nonambig),
                       versiondescribe(&infavour->available.version,
                                       vdew_nonambig),
                       NULL);
  pkg_clear_eflags(conflictor, PKG_EFLAG_REINSTREQ);
  post_postinst_tasks(conflictor, PKG_STAT_INSTALLED);
  cleanup_conflictor_failed--;
}