Dpkg::OpenPGP::Backend::GnuPG: Fallback to use «gpg dearmor» if present
[dpkg.git] / src / main / perpkgstate.c
blob75421122a518b0012e4c94a40adb83fd72f57892
1 /*
2 * dpkg - main program for package management
3 * perpkgstate.c - struct perpackagestate and function handling
5 * Copyright © 1995 Ian Jackson <ijackson@chiark.greenend.org.uk>
6 * Copyright © 2000,2001 Wichert Akkerman <wakkerma@debian.org>
7 * Copyright © 2008-2014 Guillem Jover <guillem@debian.org>
9 * This is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <https://www.gnu.org/licenses/>.
23 #include <config.h>
24 #include <compat.h>
26 #include <dpkg/dpkg.h>
27 #include <dpkg/dpkg-db.h>
29 #include "main.h"
31 void
32 ensure_package_clientdata(struct pkginfo *pkg)
34 if (pkg->clientdata)
35 return;
36 pkg->clientdata = nfmalloc(sizeof(*pkg->clientdata));
37 pkg->clientdata->istobe = PKG_ISTOBE_NORMAL;
38 pkg->clientdata->color = PKG_CYCLE_WHITE;
39 pkg->clientdata->enqueued = false;
40 pkg->clientdata->replacingfilesandsaid = 0;
41 pkg->clientdata->cmdline_seen = 0;
42 pkg->clientdata->trigprocdeferred = NULL;