+2008-03-25 Guillem Jover <guillem@debian.org>
+
+ * src/main.h (ensure_package_clientdata): Move prototype to ...
+ * src/filesdb.h: ... here.
+ * src/help.c (ensure_package_clientdata): Move function to ...
+ * src/filesdb.c: ... here.
+ * src/query.c: Remove duplicate function.
+
2008-03-25 Guillem Jover <guillem@debian.org>
* lib/dpkg-db.h (unlockdatabase): Change prototype to not take any
static FILE *diversionsfile = NULL;
static FILE *statoverridefile = NULL;
+void
+ensure_package_clientdata(struct pkginfo *pkg)
+{
+ if (pkg->clientdata)
+ return;
+ pkg->clientdata = nfmalloc(sizeof(struct perpackagestate));
+ pkg->clientdata->istobe = itb_normal;
+ pkg->clientdata->fileslistvalid = 0;
+ pkg->clientdata->files = NULL;
+}
+
void note_must_reread_files_inpackage(struct pkginfo *pkg) {
allpackagesdone= 0;
ensure_package_clientdata(pkg);
struct filenamenode *iterfilenext(struct fileiterator *i);
void iterfileend(struct fileiterator *i);
+void ensure_package_clientdata(struct pkginfo *pkg);
+
void ensure_diversions(void);
void ensure_statoverrides(void);
warned);
}
-void ensure_package_clientdata(struct pkginfo *pkg) {
- if (pkg->clientdata) return;
- pkg->clientdata= nfmalloc(sizeof(struct perpackagestate));
- pkg->clientdata->istobe= itb_normal;
- pkg->clientdata->fileslistvalid= 0;
- pkg->clientdata->files = NULL;
-}
-
int ignore_depends(struct pkginfo *pkg) {
struct packageinlist *id;
for (id= ignoredependss; id; id= id->next)
int force_conff_new(struct deppossi *possi);
int force_conff_miss(struct deppossi *possi);
int force_conflicts(struct deppossi *possi);
-void ensure_package_clientdata(struct pkginfo *pkg);
void oldconffsetflags(const struct conffile *searchconff);
void ensure_pathname_nonexisting(const char *pathname);
int chmodsafe_unlink(const char *pathname, const char **failed);
static const char* showformat = "${Package}\t${Version}\n";
-void ensure_package_clientdata(struct pkginfo *pkg) {
- if (pkg->clientdata) return;
- pkg->clientdata= nfmalloc(sizeof(struct perpackagestate));
- pkg->clientdata->istobe= itb_normal;
- pkg->clientdata->fileslistvalid= 0;
- pkg->clientdata->files= 0;
-}
-
int pkglistqsortcmp(const void *a, const void *b) {
const struct pkginfo *pa= *(const struct pkginfo**)a;
const struct pkginfo *pb= *(const struct pkginfo**)b;