aboutsummaryrefslogtreecommitdiff
path: root/qpkg.c
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2019-11-14 13:39:02 +0100
committerFabian Groffen <grobian@gentoo.org>2019-11-14 13:39:02 +0100
commit2c58dc24df8cccf41d4126bb51e5cea8abaabb0f (patch)
treec3077f20d6145af9bb510434ff3f0be7e2951c40 /qpkg.c
parentqmerge: allow -s without arguments to list available packages (diff)
downloadportage-utils-2c58dc24df8cccf41d4126bb51e5cea8abaabb0f.tar.gz
portage-utils-2c58dc24df8cccf41d4126bb51e5cea8abaabb0f.tar.bz2
portage-utils-2c58dc24df8cccf41d4126bb51e5cea8abaabb0f.zip
qpkg: drop binpkgs in CATEGORY subdir for compliance
emaint doesn't get a pile of binpkgs, so stash them where it expects them Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'qpkg.c')
-rw-r--r--qpkg.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/qpkg.c b/qpkg.c
index 947ff847..7a1baae5 100644
--- a/qpkg.c
+++ b/qpkg.c
@@ -29,6 +29,7 @@
#include "xarray.h"
#include "xasprintf.h"
#include "xchdir.h"
+#include "xmkdir.h"
#include "xpak.h"
#define QPKG_FLAGS "cEpP:" COMMON_FLAGS
@@ -309,7 +310,13 @@ qpkg_make(depend_atom *atom)
unlink(filelist);
- snprintf(buf, buflen, "%s/%s.tbz2", qpkg_bindir, atom_to_pvr(atom));
+ /* create dirs, if necessary */
+ snprintf(buf, buflen, "%s/%s",
+ qpkg_bindir, atom->CATEGORY);
+ mkdir_p(buf, 0755);
+
+ snprintf(buf, buflen, "%s/%s/%s.tbz2",
+ qpkg_bindir, atom->CATEGORY, atom_to_pvr(atom));
if (rename(tbz2, buf)) {
warnp("could not move '%s' to '%s'", tbz2, buf);
free(buf);