commit: 260d67e07284b53e4d982e071d8463187566f8b2
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 16 06:34:29 2014 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Mar 16 06:34:29 2014 +0000
URL:
http://git.overlays.gentoo.org/gitweb/?p=proj/portage-utils.git;a=commit;h=260d67e0
qpkg: document the chdir() usage
---
qpkg.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/qpkg.c b/qpkg.c
index 512a4b9..4a5d9fd 100644
--- a/qpkg.c
+++ b/qpkg.c
@@ -348,8 +348,6 @@ int qpkg_main(int argc, char **argv)
if (argc == optind)
qpkg_usage(EXIT_FAILURE);
- xchdir(portroot);
-
/* setup temp dirs */
i = 0;
bindir = qpkg_get_bindir();
@@ -368,6 +366,10 @@ retry_mkdir:
errp("could not chmod(0750) temp bindir '%s'",
bindir);
}
+ /* we have to change to the root so that we can feed the full paths
+ * to tar when we create the binary package. */
+ xchdir(portroot);
+
/* first process any arguments which point to /var/db/pkg */
pkgs_made = 0;
s = strlen(portvdb);