diff options
author | Guillem Jover <guillem@debian.org> | 2014-05-28 00:56:09 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2014-05-28 00:56:09 +0200 |
commit | b9bb0fa75fceafbba983dfdc221274c9f0991abf (patch) | |
tree | 3b9601250546c8f2f23b17237138c6f0baca2d09 | |
parent | 72ba255678a0f4b940a7cc9d3f71d716077e9758 (diff) | |
download | dpkg-b9bb0fa75fceafbba983dfdc221274c9f0991abf.tar.gz |
dpkg: Uppercase dep_check enum values
-rw-r--r-- | src/configure.c | 6 | ||||
-rw-r--r-- | src/main.h | 6 | ||||
-rw-r--r-- | src/packages.c | 16 | ||||
-rw-r--r-- | src/remove.c | 14 |
4 files changed, 21 insertions, 21 deletions
diff --git a/src/configure.c b/src/configure.c index ca7b32674..e66bba6a6 100644 --- a/src/configure.c +++ b/src/configure.c @@ -602,7 +602,7 @@ deferred_configure(struct pkginfo *pkg) sincenothing = 0; ok = dependencies_ok(pkg, NULL, &aemsgs); - if (ok == dep_check_defer) { + if (ok == DEP_CHECK_DEFER) { varbuf_destroy(&aemsgs); pkg->clientdata->istobe = itb_installnew; enqueue_package(pkg); @@ -619,8 +619,8 @@ deferred_configure(struct pkginfo *pkg) * processing new packages can't enter into unpacked. */ - ok = breakses_ok(pkg, &aemsgs) ? ok : dep_check_halt; - if (ok == dep_check_halt) { + ok = breakses_ok(pkg, &aemsgs) ? ok : DEP_CHECK_HALT; + if (ok == DEP_CHECK_HALT) { sincenothing = 0; varbuf_end_str(&aemsgs); notice(_("dependency problems prevent configuration of %s:\n%s"), diff --git a/src/main.h b/src/main.h index 735af9e55..8d50a059c 100644 --- a/src/main.h +++ b/src/main.h @@ -192,9 +192,9 @@ void removal_bulk(struct pkginfo *pkg); int conffderef(struct pkginfo *pkg, struct varbuf *result, const char *in); enum dep_check { - dep_check_halt = 0, - dep_check_defer = 1, - dep_check_ok = 2, + DEP_CHECK_HALT = 0, + DEP_CHECK_DEFER = 1, + DEP_CHECK_OK = 2, }; enum dep_check dependencies_ok(struct pkginfo *pkg, struct pkginfo *removing, diff --git a/src/packages.c b/src/packages.c index 47d8cdd60..70d1df03b 100644 --- a/src/packages.c +++ b/src/packages.c @@ -494,7 +494,7 @@ breaks_check_one(struct varbuf *aemsgs, enum dep_check *ok, if (fc_dependsversion) return; } if (force_breaks(breaks)) return; - *ok = dep_check_halt; + *ok = DEP_CHECK_HALT; } static void @@ -517,7 +517,7 @@ breakses_ok(struct pkginfo *pkg, struct varbuf *aemsgs) { struct dependency *dep; struct pkgset *virtbroken; - enum dep_check ok = dep_check_ok; + enum dep_check ok = DEP_CHECK_OK; debug(dbg_depcon, " checking Breaks"); @@ -551,7 +551,7 @@ dependencies_ok(struct pkginfo *pkg, struct pkginfo *removing, struct pkginfo *possfixbytrig, *canfixbytrig; interestingwarnings= 0; - ok = dep_check_ok; + ok = DEP_CHECK_OK; debug(dbg_depcon,"checking dependencies of %s (- %s)", pkg_name(pkg, pnaw_always), removing ? pkg_name(removing, pnaw_always) : "<none>"); @@ -627,7 +627,7 @@ dependencies_ok(struct pkginfo *pkg, struct pkginfo *removing, switch (found) { case found_none: anycannotfixbytrig = true; - ok = dep_check_halt; + ok = DEP_CHECK_HALT; /* Fall through. */ case found_forced: varbuf_add_str(aemsgs, " "); @@ -649,8 +649,8 @@ dependencies_ok(struct pkginfo *pkg, struct pkginfo *removing, canfixbytrig = possfixbytrig; else anycannotfixbytrig = true; - if (ok > dep_check_defer) - ok = dep_check_defer; + if (ok > DEP_CHECK_DEFER) + ok = DEP_CHECK_DEFER; break; case found_ok: break; @@ -658,9 +658,9 @@ dependencies_ok(struct pkginfo *pkg, struct pkginfo *removing, internerr("unknown value for found '%d'", found); } } - if (ok == dep_check_halt && + if (ok == DEP_CHECK_HALT && (pkg->clientdata && pkg->clientdata->istobe == itb_remove)) - ok = dep_check_defer; + ok = DEP_CHECK_DEFER; if (!anycannotfixbytrig && canfixbytrig) progress_bytrigproc = canfixbytrig; diff --git a/src/remove.c b/src/remove.c index 18c93dd18..4eecda6be 100644 --- a/src/remove.c +++ b/src/remove.c @@ -3,7 +3,7 @@ * remove.c - functionality for removing packages * * Copyright © 1995 Ian Jackson <ian@chiark.greenend.org.uk> - * Copyright © 2007-2013 Guillem Jover <guillem@debian.org> + * Copyright © 2007-2014 Guillem Jover <guillem@debian.org> * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -75,9 +75,9 @@ static void checkforremoval(struct pkginfo *pkgtoremove, if (dependtry > 1) { if (findbreakcycle(pkgtoremove)) sincenothing= 0; } before= raemsgs->used; ok= dependencies_ok(depender,pkgtoremove,raemsgs); - if (ok == dep_check_halt && depender->clientdata->istobe == itb_remove) - ok = dep_check_defer; - if (ok == dep_check_defer) + if (ok == DEP_CHECK_HALT && depender->clientdata->istobe == itb_remove) + ok = DEP_CHECK_DEFER; + if (ok == DEP_CHECK_DEFER) /* Don't burble about reasons for deferral. */ varbuf_trunc(raemsgs, before); if (ok < *rokp) *rokp= ok; @@ -125,7 +125,7 @@ void deferred_remove(struct pkginfo *pkg) { debug(dbg_general, "checking dependencies for remove '%s'", pkg_name(pkg, pnaw_always)); - rok = dep_check_ok; + rok = DEP_CHECK_OK; checkforremoval(pkg, pkg->set, &rok, &raemsgs); for (dep= pkg->installed.depends; dep; dep= dep->next) { if (dep->type != dep_provides) continue; @@ -133,12 +133,12 @@ void deferred_remove(struct pkginfo *pkg) { checkforremoval(pkg, dep->list->ed, &rok, &raemsgs); } - if (rok == dep_check_defer) { + if (rok == DEP_CHECK_DEFER) { varbuf_destroy(&raemsgs); pkg->clientdata->istobe= itb_remove; enqueue_package(pkg); return; - } else if (rok == dep_check_halt) { + } else if (rok == DEP_CHECK_HALT) { sincenothing= 0; varbuf_end_str(&raemsgs); notice(_("dependency problems prevent removal of %s:\n%s"), |