xbps-rindex: fix -a/--add mode repodata archive permissions.
The repodata archive wasn't group writable, resulting in a new archive created from scratch if the fd wasn't writable. repodata archives are now created with 0664 mode, this way its main group also can write to it.
This commit is contained in:
@ -59,6 +59,12 @@ index_add(struct xbps_handle *xhp, int argc, char **argv, bool force)
|
||||
|
||||
repodir = dirname(tmprepodir);
|
||||
repo = xbps_repo_open(xhp, repodir, true);
|
||||
if (repo == NULL && errno != ENOENT) {
|
||||
fprintf(stderr, "xbps-rindex: cannot open/lock repository "
|
||||
"%s: %s\n", repodir, strerror(errno));
|
||||
rv = -1;
|
||||
goto out;
|
||||
}
|
||||
if (repo && repo->idx) {
|
||||
xbps_repo_open_idxfiles(repo);
|
||||
idx = xbps_dictionary_copy(repo->idx);
|
||||
|
Reference in New Issue
Block a user