xbps-{install,remove}: remove the stupid rw checks on rootdir/metadir.
This commit is contained in:
parent
023484ca0b
commit
c514894152
@ -184,20 +184,6 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
maxcols = get_maxcols();
|
||||
/*
|
||||
* Check that we have write permission on rootdir, metadir
|
||||
* and cachedir.
|
||||
*/
|
||||
if ((!drun && ((access(xh.rootdir, W_OK) == -1) ||
|
||||
(access(xh.metadir, W_OK) == -1) ||
|
||||
(access(xh.cachedir, W_OK) == -1)))) {
|
||||
if (errno != ENOENT) {
|
||||
fprintf(stderr, "Not enough permissions on "
|
||||
"rootdir/cachedir/metadir: %s\n",
|
||||
strerror(errno));
|
||||
exit(errno);
|
||||
}
|
||||
}
|
||||
|
||||
/* Sync remote repository data by default */
|
||||
if (sync && !drun) {
|
||||
|
@ -320,20 +320,6 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
maxcols = get_maxcols();
|
||||
/*
|
||||
* Check that we have write permission on rootdir, metadir
|
||||
* and cachedir.
|
||||
*/
|
||||
if ((!drun && ((access(xh.rootdir, W_OK) == -1) ||
|
||||
(access(xh.metadir, W_OK) == -1) ||
|
||||
(access(xh.cachedir, W_OK) == -1)))) {
|
||||
if (errno != ENOENT) {
|
||||
fprintf(stderr, "Not enough permissions on "
|
||||
"rootdir/cachedir/metadir: %s\n",
|
||||
strerror(errno));
|
||||
exit(errno);
|
||||
}
|
||||
}
|
||||
|
||||
if (clean_cache) {
|
||||
rv = cachedir_clean(&xh);
|
||||
|
Loading…
Reference in New Issue
Block a user