libxbps: remove unused xbps_check_pkg_file_hash().
--HG-- extra : convert_revision : xtraeme%40gmail.com-20091128015121-wxiy8y0ift5ykrdm
This commit is contained in:
parent
bf7ca100f6
commit
e652de8d5a
@ -235,8 +235,6 @@ int SYMEXPORT xbps_unpack_binary_pkg(prop_dictionary_t, bool);
|
||||
char SYMEXPORT *xbps_xasprintf(const char *, ...);
|
||||
char SYMEXPORT *xbps_get_file_hash(const char *);
|
||||
int SYMEXPORT xbps_check_file_hash(const char *, const char *);
|
||||
int SYMEXPORT xbps_check_pkg_file_hash(prop_dictionary_t,
|
||||
const char *);
|
||||
int SYMEXPORT xbps_check_is_installed_pkg(const char *);
|
||||
bool SYMEXPORT xbps_check_is_installed_pkgname(const char *);
|
||||
bool SYMEXPORT xbps_check_is_repo_string_remote(const char *);
|
||||
|
29
lib/util.c
29
lib/util.c
@ -83,35 +83,6 @@ xbps_check_file_hash(const char *path, const char *sha256)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int SYMEXPORT
|
||||
xbps_check_pkg_file_hash(prop_dictionary_t pkgd, const char *repoloc)
|
||||
{
|
||||
const char *sha256, *arch, *filename;
|
||||
char *binfile;
|
||||
int rv = 0;
|
||||
|
||||
assert(repoloc != NULL);
|
||||
|
||||
if (!prop_dictionary_get_cstring_nocopy(pkgd, "filename", &filename))
|
||||
return EINVAL;
|
||||
|
||||
if (!prop_dictionary_get_cstring_nocopy(pkgd, "filename-sha256",
|
||||
&sha256))
|
||||
return EINVAL;
|
||||
|
||||
if (!prop_dictionary_get_cstring_nocopy(pkgd, "architecture", &arch))
|
||||
return EINVAL;
|
||||
|
||||
binfile = xbps_xasprintf("%s/%s/%s", repoloc, arch, filename);
|
||||
if (binfile == NULL)
|
||||
return EINVAL;
|
||||
|
||||
rv = xbps_check_file_hash(binfile, sha256);
|
||||
free(binfile);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
bool SYMEXPORT
|
||||
xbps_check_is_repo_string_remote(const char *uri)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user