Repository package index format 1.2.
The pkg index now stores all package objects from props.plist, so that xbps-repo(8) doesn't have to access the target binpkg anymore.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2009-2010 Juan Romero Pardines.
|
||||
* Copyright (c) 2009-2011 Juan Romero Pardines.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -217,17 +217,6 @@ xbps_repo_addpkg_index(prop_dictionary_t idxdict, const char *filedir,
|
||||
rv = errno;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/*
|
||||
* Remove some unneeded and large objects.
|
||||
*/
|
||||
prop_dictionary_remove(newpkgd, "long_desc");
|
||||
prop_dictionary_remove(newpkgd, "maintainer");
|
||||
prop_dictionary_remove(newpkgd, "conf_files");
|
||||
prop_dictionary_remove(newpkgd, "homepage");
|
||||
prop_dictionary_remove(newpkgd, "build_date");
|
||||
prop_dictionary_remove(newpkgd, "license");
|
||||
|
||||
/*
|
||||
* Add dictionary into the index and update package count.
|
||||
*/
|
||||
|
@@ -240,32 +240,13 @@ out:
|
||||
int
|
||||
show_pkg_info_from_repolist(const char *pkgname)
|
||||
{
|
||||
prop_dictionary_t pkgd, pkg_propsd;
|
||||
const char *repoloc;
|
||||
char *url = NULL;
|
||||
prop_dictionary_t pkgd;
|
||||
|
||||
pkgd = xbps_repository_pool_find_pkg(pkgname, false, false);
|
||||
if (pkgd == NULL)
|
||||
return errno;
|
||||
|
||||
prop_dictionary_get_cstring_nocopy(pkgd, "repository", &repoloc);
|
||||
url = xbps_get_binpkg_repo_uri(pkgd, repoloc);
|
||||
if (url == NULL) {
|
||||
prop_object_release(pkgd);
|
||||
return errno;
|
||||
}
|
||||
printf("Fetching info from: %s\n", repoloc);
|
||||
pkg_propsd =
|
||||
xbps_repository_plist_find_pkg_dict_from_url(url, XBPS_PKGPROPS);
|
||||
if (pkg_propsd == NULL) {
|
||||
free(url);
|
||||
prop_object_release(pkgd);
|
||||
return errno;
|
||||
}
|
||||
free(url);
|
||||
show_pkg_info(pkgd, true);
|
||||
show_pkg_info(pkg_propsd, false);
|
||||
prop_object_release(pkg_propsd);
|
||||
show_pkg_info(pkgd);
|
||||
prop_object_release(pkgd);
|
||||
|
||||
return 0;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
.TH "XBPS\-REPO" "8" "02/21/2011" "\ \&" "\ \&"
|
||||
.TH "XBPS\-REPO" "8" "05/27/2011" "\ \&" "\ \&"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@@ -115,7 +115,6 @@ values in repository pool\&.
|
||||
.RS 4
|
||||
Shows information about binary package
|
||||
\fIpkgname\fR\&. This will print the size it takes in filesystem, description, maintainer, architecture and other information\&. The first repository in the pool wins\&.
|
||||
\fBNOTE: if a remote repository is the winner and binary package is not available in cachedir, it will fetch remotely and \fR\fB\fIon\-the\-fly\fR\fR\fB the info\fR\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBshow\-deps \fR\fB\fIpkgname\fR\fR
|
||||
@@ -129,7 +128,7 @@ Shows run time dependencies for binary package
|
||||
Shows the file list for a binary package
|
||||
\fIpkgname\fR
|
||||
by searching it in repository pool\&. The first repository in the pool wins\&.
|
||||
\fBNOTE: if a remote repository is the winner and binary package is not available in \fR\fBcachedir\fR\fB, it will fetch remotely and \fR\fB\fIon\-the\-fly\fR\fR\fB the info\fR\&.
|
||||
\fBNOTE: if a remote repository is the winner and binary package is not available in \fR\fBcachedir\fR\fB, it will fetch remotely and \fR\fB\fIon\-the\-fly\fR\fR\fB the info\fR\& from target repository.
|
||||
.RE
|
||||
.PP
|
||||
\fBsync\fR
|
||||
|
Reference in New Issue
Block a user