diff options
author | Guillem Jover <guillem@debian.org> | 2014-05-19 12:56:04 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2014-05-19 12:56:04 +0200 |
commit | f078b51a7d1a73716f322fcd3814fc025aa9d2cd (patch) | |
tree | 697672658a1ac75a335cc17ee1876a71f8a84fff /src | |
parent | 6f82877d87f7ef637b12cc8e2614bea58f3f081d (diff) | |
download | dpkg-f078b51a7d1a73716f322fcd3814fc025aa9d2cd.tar.gz |
libdpkg, dpkg: Use new status to names mapping functions
This gets rid of the need to export the statusinfos and wantinfos
variables from libdpkg.
Diffstat (limited to 'src')
-rw-r--r-- | src/archives.c | 4 | ||||
-rw-r--r-- | src/configure.c | 6 | ||||
-rw-r--r-- | src/packages.c | 3 | ||||
-rw-r--r-- | src/select.c | 4 | ||||
-rw-r--r-- | src/trigproc.c | 4 |
5 files changed, 11 insertions, 10 deletions
diff --git a/src/archives.c b/src/archives.c index 3a1714f84..e1b1e539d 100644 --- a/src/archives.c +++ b/src/archives.c @@ -4,7 +4,7 @@ * * Copyright © 1994,1995 Ian Jackson <ian@chiark.greenend.org.uk> * Copyright © 2000 Wichert Akkerman <wakkerma@debian.org> - * Copyright © 2007-2013 Guillem Jover <guillem@debian.org> + * Copyright © 2007-2014 Guillem Jover <guillem@debian.org> * Copyright © 2011 Linaro Limited * Copyright © 2011 Raphaël Hertzog <hertzog@debian.org> * @@ -216,7 +216,7 @@ md5hash_prev_conffile(struct pkginfo *pkg, char *oldhash, const char *oldname, debug(dbg_conffdetail, "tarobject found shared conffile, from pkg %s (%s); hash=%s", pkg_name(otherpkg, pnaw_always), - statusinfos[otherpkg->status].name, oldhash); + pkg_status_name(otherpkg), oldhash); break; } } diff --git a/src/configure.c b/src/configure.c index 1f852e6f4..ca7b32674 100644 --- a/src/configure.c +++ b/src/configure.c @@ -4,7 +4,7 @@ * * Copyright © 1995 Ian Jackson <ian@chiark.greenend.org.uk> * Copyright © 1999, 2002 Wichert Akkerman <wichert@deephackmode.org> - * Copyright © 2007-2012 Guillem Jover <guillem@debian.org> + * Copyright © 2007-2014 Guillem Jover <guillem@debian.org> * Copyright © 2011 Linaro Limited * Copyright © 2011 Raphaël Hertzog <hertzog@debian.org> * @@ -570,7 +570,7 @@ deferred_configure(struct pkginfo *pkg) ohshit(_("package %.250s is not ready for configuration\n" " cannot configure (current status `%.250s')"), pkg_name(pkg, pnaw_nonambig), - statusinfos[pkg->status].name); + pkg_status_name(pkg)); for (otherpkg = &pkg->set->pkg; otherpkg; otherpkg = otherpkg->arch_next) { if (otherpkg == pkg) @@ -583,7 +583,7 @@ deferred_configure(struct pkginfo *pkg) "%s is not ready (current status '%s')"), pkg_name(pkg, pnaw_always), pkg_name(otherpkg, pnaw_always), - statusinfos[otherpkg->status].name); + pkg_status_name(otherpkg)); if (dpkg_version_compare(&pkg->installed.version, &otherpkg->installed.version)) diff --git a/src/packages.c b/src/packages.c index de26cdba8..1485dae7c 100644 --- a/src/packages.c +++ b/src/packages.c @@ -3,6 +3,7 @@ * packages.c - common to actions that process packages * * Copyright © 1994,1995 Ian Jackson <ian@chiark.greenend.org.uk> + * Copyright © 2006-2014 Guillem Jover <guillem@debian.org> * Copyright © 2011 Linaro Limited * Copyright © 2011 Raphaël Hertzog <hertzog@debian.org> * @@ -242,7 +243,7 @@ void process_queue(void) { if (!pkg->trigpend_head) ohshit(_("package %.250s is not ready for trigger processing\n" " (current status `%.250s' with no pending triggers)"), - pkg_name(pkg, pnaw_nonambig), statusinfos[pkg->status].name); + pkg_name(pkg, pnaw_nonambig), pkg_status_name(pkg)); /* Fall through. */ case act_install: /* Don't try to configure pkgs that we've just disappeared. */ diff --git a/src/select.c b/src/select.c index 9a351cb77..be0edf452 100644 --- a/src/select.c +++ b/src/select.c @@ -3,7 +3,7 @@ * select.c - by-hand (rather than dselect-based) package selection * * Copyright © 1995,1996 Ian Jackson <ian@chiark.greenend.org.uk> - * Copyright © 2006,2008-2012 Guillem Jover <guillem@debian.org> + * Copyright © 2006,2008-2014 Guillem Jover <guillem@debian.org> * Copyright © 2011 Linaro Limited * Copyright © 2011 Raphaël Hertzog <hertzog@debian.org> * @@ -53,7 +53,7 @@ static void getsel1package(struct pkginfo *pkg) { l = 6 - l; if (l < 1) l = 1; - printf("%s%.*s%s\n", pkgname, l, "\t\t\t\t\t\t", wantinfos[pkg->want].name); + printf("%s%.*s%s\n", pkgname, l, "\t\t\t\t\t\t", pkg_want_name(pkg)); } int diff --git a/src/trigproc.c b/src/trigproc.c index f9484ec76..74f72c08e 100644 --- a/src/trigproc.c +++ b/src/trigproc.c @@ -4,7 +4,7 @@ * * Copyright © 2007 Canonical Ltd * written by Ian Jackson <ian@chiark.greenend.org.uk> - * Copyright © 2008-2013 Guillem Jover <guillem@debian.org> + * Copyright © 2008-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 @@ -408,7 +408,7 @@ trig_transitional_activate(enum modstatdb_rw cstatus) continue; debug(dbg_triggersdetail, "trig_transitional_activate %s %s", pkg_name(pkg, pnaw_always), - statusinfos[pkg->status].name); + pkg_status_name(pkg)); pkg->trigpend_head = NULL; trig_parse_ci(pkg_infodb_get_file(pkg, &pkg->installed, TRIGGERSCIFILE), |