Improve binpkg priorities, dynamically allocate mem, etc.

--HG--
extra : convert_revision : 479011aba6e9da4e5662137381e04042e762d428
This commit is contained in:
Juan RP
2008-12-27 22:19:04 +01:00
parent 86cdb7dae6
commit 926b1dfa4a
7 changed files with 167 additions and 68 deletions

View File

@@ -72,7 +72,7 @@ main(int argc, char **argv)
{
prop_dictionary_t dbdict = NULL, pkgdict;
const char *version;
char dbfile[PATH_MAX], *in_chroot_env, *root = NULL;
char *dbfile, *in_chroot_env, *root = NULL;
bool in_chroot = false;
int c, rv = 0;
@@ -97,7 +97,8 @@ main(int argc, char **argv)
if (argc < 1)
usage();
if (!xbps_append_full_path(true, dbfile, NULL, XBPS_REGPKGDB)) {
dbfile = xbps_append_full_path(true, NULL, XBPS_REGPKGDB);
if (dbfile == NULL) {
printf("=> ERROR: couldn't find regpkdb file (%s)\n",
strerror(errno));
exit(EINVAL);