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/>.
26 #include <dpkg/dpkg.h>
27 #include <dpkg/dpkg-db.h>
32 ensure_package_clientdata(struct pkginfo
*pkg
)
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
;