xbps_configure_pkg: chdir(rootdir) before checking for INSTALL script!
--HG-- extra : convert_revision : xtraeme%40gmail.com-20090818213947-kl9f5gfbcq8vwvvt
This commit is contained in:
parent
5a2348e502
commit
d7ff3ea85a
@ -76,13 +76,13 @@ xbps_configure_pkg(const char *pkgname)
|
|||||||
if (buf == NULL)
|
if (buf == NULL)
|
||||||
return errno;
|
return errno;
|
||||||
|
|
||||||
|
if (strcmp(rootdir, "") == 0)
|
||||||
|
rootdir = "/";
|
||||||
|
|
||||||
|
if (chdir(rootdir) == -1)
|
||||||
|
return errno;
|
||||||
|
|
||||||
if (access(buf, R_OK) == 0) {
|
if (access(buf, R_OK) == 0) {
|
||||||
if (strcmp(rootdir, "") == 0)
|
|
||||||
rootdir = "/";
|
|
||||||
|
|
||||||
if (chdir(rootdir) == -1)
|
|
||||||
return errno;
|
|
||||||
|
|
||||||
if ((rv = xbps_file_chdir_exec(rootdir, buf, "post",
|
if ((rv = xbps_file_chdir_exec(rootdir, buf, "post",
|
||||||
pkgname, version, NULL)) != 0) {
|
pkgname, version, NULL)) != 0) {
|
||||||
free(buf);
|
free(buf);
|
||||||
|
Loading…
Reference in New Issue
Block a user