From ea901526648c43ef8e961b3d7e051b9ca14b65ca Mon Sep 17 00:00:00 2001 From: Timo Teras Date: Fri, 31 Jul 2009 16:08:09 +0300 Subject: apk: use *at instead of chdir+normal file syscall this way we never change cwd, and relative filenames are always parsed consistently. this also helps filename construction in many places. this patch also changes '--root' to override location of all configuration to be in the new root. previously it depended on the file which one was used. --- src/apk.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/apk.c') diff --git a/src/apk.c b/src/apk.c index a21427f..122f9a7 100644 --- a/src/apk.c +++ b/src/apk.c @@ -26,7 +26,7 @@ const char *apk_root; struct apk_repository_url apk_repository_list; -int apk_verbosity = 1, apk_cwd_fd, apk_wait; +int apk_verbosity = 1, apk_wait; unsigned int apk_flags = 0; static struct apk_option generic_options[] = { @@ -292,7 +292,6 @@ int main(int argc, char **argv) struct apk_repository_url *repo = NULL; umask(0); - apk_cwd_fd = open(".", O_RDONLY); apk_root = getenv("ROOT"); list_init(&apk_repository_list.list); -- cgit v1.2.3-60-g2f50