+2008-03-20 Ian Jackson <ian@davenant.greenend.org.uk>
+
+ * src/main.h (pkgadminfile): Move prototype to ...
+ * lib/dpkg-db.h: ... here.
+ * src/help.c (pkgadminfile): Move function definition to ...
+ * lib/dbmodify.c: ... here.
+ * src/query.c (pkgadminfile): Remove duplicated functions.
+
2008-03-20 Ian Jackson <ian@davenant.greenend.org.uk>,
Guillem Jover <guillem@debian.org>
onerr_abort--;
}
+const char *pkgadminfile(struct pkginfo *pkg, const char *whichfile) {
+ static struct varbuf vb;
+ varbufreset(&vb);
+ varbufaddstr(&vb,admindir);
+ varbufaddstr(&vb,"/" INFODIR);
+ varbufaddstr(&vb,pkg->name);
+ varbufaddc(&vb,'.');
+ varbufaddstr(&vb,whichfile);
+ varbufaddc(&vb,0);
+ return vb.buf;
+}
+
const char *log_file= NULL;
void log_message(const char *fmt, ...) {
extern char *statusfile, *availablefile; /* initialised by modstatdb_init */
+const char *pkgadminfile(struct pkginfo *pkg, const char *whichfile);
+
extern const char *log_file;
void log_message(const char *fmt, ...) PRINTFFORMAT(1, 2);
return fc_conflicts;
}
-const char *pkgadminfile(struct pkginfo *pkg, const char *whichfile) {
- static struct varbuf vb;
- varbufreset(&vb);
- varbufaddstr(&vb,admindir);
- varbufaddstr(&vb,"/" INFODIR);
- varbufaddstr(&vb,pkg->name);
- varbufaddc(&vb,'.');
- varbufaddstr(&vb,whichfile);
- varbufaddc(&vb,0);
- return vb.buf;
-}
-
static const char* preexecscript(const char *path, char *const *argv) {
/* returns the path to the script inside the chroot
* none of the stuff here will work if admindir isn't inside instdir
int force_conff_miss(struct deppossi *possi);
int force_conflicts(struct deppossi *possi);
void ensure_package_clientdata(struct pkginfo *pkg);
-const char *pkgadminfile(struct pkginfo *pkg, const char *whichfile);
void oldconffsetflags(const struct conffile *searchconff);
void ensure_pathname_nonexisting(const char *pathname);
int chmodsafe_unlink(const char *pathname, const char **failed);
pkg->clientdata->files= 0;
}
-const char *pkgadminfile(struct pkginfo *pkg, const char *whichfile) {
- static struct varbuf vb;
- varbufreset(&vb);
- varbufaddstr(&vb,admindir);
- varbufaddstr(&vb,"/" INFODIR);
- varbufaddstr(&vb,pkg->name);
- varbufaddc(&vb,'.');
- varbufaddstr(&vb,whichfile);
- varbufaddc(&vb,0);
- return vb.buf;
-}
-
int pkglistqsortcmp(const void *a, const void *b) {
const struct pkginfo *pa= *(const struct pkginfo**)a;
const struct pkginfo *pb= *(const struct pkginfo**)b;