@@ -40,14 +40,13 @@
|
||||
bool
|
||||
repodata_flush(struct xbps_handle *xhp, const char *repodir,
|
||||
const char *reponame, xbps_dictionary_t idx, xbps_dictionary_t meta,
|
||||
const char *compression, const char *privkey)
|
||||
const char *compression)
|
||||
{
|
||||
struct archive *ar;
|
||||
char *repofile, *tname, *buf;
|
||||
unsigned char *sig = NULL;
|
||||
const char *signature_type = NULL;
|
||||
int rv, repofd = -1;
|
||||
unsigned int siglen, buflen;
|
||||
mode_t mask;
|
||||
bool result;
|
||||
|
||||
@@ -97,9 +96,8 @@ repodata_flush(struct xbps_handle *xhp, const char *repodir,
|
||||
rv = xbps_archive_append_buf(ar, buf, strlen(buf),
|
||||
XBPS_REPOIDX, 0644, "root", "root");
|
||||
free(buf);
|
||||
if (rv != 0) {
|
||||
if (rv != 0)
|
||||
return false;
|
||||
}
|
||||
|
||||
/* XBPS_REPOIDX_META */
|
||||
if (meta == NULL) {
|
||||
@@ -116,8 +114,7 @@ repodata_flush(struct xbps_handle *xhp, const char *repodir,
|
||||
if (rv != 0)
|
||||
return false;
|
||||
|
||||
if (xbps_dictionary_get_cstring_nocopy(meta, "signature-type", &signature_type))
|
||||
{
|
||||
if (xbps_dictionary_get_cstring_nocopy(meta, "signature-type", &signature_type)) {
|
||||
rv = sign_buffer(buf, buflen, privkey, &sig, &siglen);
|
||||
free(buf);
|
||||
if (rv != 0) {
|
||||
|
Reference in New Issue
Block a user