Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Merge remote branch 'pkgng/master'
Will Andrews committed 14 years ago
commit adddf5dd6368b470b1e10e7e39763b1fee5601b7
parent c712e84
3 files changed +2 -47
modified libpkg/packing.c
@@ -125,51 +125,6 @@ packing_append_file(struct packing *pack, const char *filepath, const char *newp
}

int
-
packing_append_tree(struct packing *pack, const char *treepath, const char *newroot)
-
{
-
	FTS *fts = NULL;
-
	FTSENT *fts_e = NULL;
-
	size_t treelen;
-
	struct sbuf *sb;
-
	char *paths[2] = { __DECONST(char *, treepath), NULL };
-

-
	treelen = strlen(treepath);
-
	fts = fts_open(paths, FTS_PHYSICAL | FTS_XDEV, NULL);
-
	if (fts == NULL)
-
		goto cleanup;
-

-
	sb = sbuf_new_auto();
-
	while ((fts_e = fts_read(fts)) != NULL) {
-
		switch(fts_e->fts_info) {
-
		case FTS_F:
-
			/* Skip entries that are shorter than the tree itself */
-
			if (fts_e->fts_pathlen <= treelen)
-
				break;
-
			sbuf_clear(sb);
-
			/* Strip the prefix to obtain the target path */
-
			if (newroot) /* Prepend a root if one is specified */
-
				sbuf_cat(sb, newroot);
-
			sbuf_cat(sb, fts_e->fts_path + treelen + 1 /* skip trailing slash */);
-
			sbuf_finish(sb);
-
			packing_append_file(pack, fts_e->fts_name, sbuf_get(sb));
-
			break;
-
		case FTS_DNR:
-
		case FTS_ERR:
-
		case FTS_NS:
-
			/* XXX error cases, check fts_e->fts_errno and
-
			 *     bubble up the call chain */
-
			break;
-
		default:
-
			break;
-
		}
-
	}
-
	sbuf_free(sb);
-
cleanup:
-
	fts_close(fts);
-
	return EPKG_OK;
-
}
-

-
int
packing_finish(struct packing *pack)
{
	archive_entry_free(pack->entry);
modified libpkg/pkg_create.c
@@ -120,7 +120,7 @@ pkg_create_fakeroot(const char *outdir, pkg_formats format, const char *rootdir,
	struct packing *pkg_archive = NULL;
	char *manifest = NULL, *manifest_path = NULL;
	int ret = ENOMEM;
-
	size_t sz;
+
	off_t sz;

	/* Load the manifest from the metadata directory */
	if (asprintf(&manifest_path, "%s/+MANIFEST", metadatadir) == -1)
modified libpkg/pkgdb.c
@@ -360,7 +360,7 @@ pkgdb_it_next(struct pkgdb_it *it, struct pkg **pkg_p, int flags)
			pkg_set(pkg, PKG_NEWVERSION, sqlite3_column_text(it->stmt, 13));
			pkg_setnewflatsize(pkg, sqlite3_column_int64(it->stmt, 14));
			pkg_setnewpkgsize(pkg, sqlite3_column_int64(it->stmt, 15));
-
			pkg_set(pkg, PKG_URL, sqlite3_column_text(it->stmt, 16));
+
			pkg_set(pkg, PKG_REPOPATH, sqlite3_column_text(it->stmt, 16));
		}

		if (flags & PKG_LOAD_DEPS)