xbps-repo: fix the 'genindex' target with missing directories.
This fixes issue #3 in github.com/vanilla/xbps.
This commit is contained in:
parent
0a2abb3f3d
commit
81d5bdd79a
6
NEWS
6
NEWS
@ -1,7 +1,11 @@
|
||||
xbps-0.9.1 (???):
|
||||
|
||||
* xbps-repo(8): the 'genindex' target creates required directories
|
||||
in local repositories if it's necessary. Fixes issue #3 in
|
||||
github.com/vanilla/xbps.
|
||||
|
||||
* xbps-repo(8): the 'search' target now matches patterns in
|
||||
case insensitive mode.
|
||||
case insensitive mode. Fixes issue #2 on github.com/vanilla/xbps.
|
||||
|
||||
* A bug has been fixed while updating a package and another package
|
||||
providing a virtual package with a greater version was available
|
||||
|
@ -281,6 +281,18 @@ xbps_repo_genindex(const char *pkgdir)
|
||||
rv = errno;
|
||||
goto out;
|
||||
}
|
||||
/*
|
||||
* If repo/<noarch|un.machine> does not exist,
|
||||
* create it.
|
||||
*/
|
||||
if ((access(path, X_OK) == -1) && errno == ENOENT) {
|
||||
if (xbps_mkpath(path, 0755) == -1) {
|
||||
xbps_error_printf("xbps-repo: cannot "
|
||||
"create %s directory: %s\n",
|
||||
path, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
dirp = opendir(path);
|
||||
if (dirp == NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user