aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2019-04-25 19:36:09 +0200
committerFabian Groffen <grobian@gentoo.org>2019-04-25 19:36:09 +0200
commitdf503f922e4070fdbb5bbe4731f79b15709a5ade (patch)
tree94407f8eb8e2dcf5ae5b4ac3f380e2e7c38dd42e /qatom.c
parentlibq/atom: support/parse SUBSLOT (diff)
downloadportage-utils-df503f922e4070fdbb5bbe4731f79b15709a5ade.tar.gz
portage-utils-df503f922e4070fdbb5bbe4731f79b15709a5ade.tar.bz2
portage-utils-df503f922e4070fdbb5bbe4731f79b15709a5ade.zip
qatom: print SUBSLOT as part of SLOT
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'qatom.c')
-rw-r--r--qatom.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/qatom.c b/qatom.c
index 20e2dcb7..e3d2b0b9 100644
--- a/qatom.c
+++ b/qatom.c
@@ -94,20 +94,23 @@ qatom_printf(const char *format, const depend_atom *atom, int pverbose)
printf("r%i", atom->PR_int);
} else if (!strncmp("SLOT", fmt, len)) {
if (showit || atom->SLOT)
- printf(":%s%s",
- atom->SLOT ? atom->SLOT : "-",
+ printf("%s%s%s%s%s",
+ atom->SLOT ? ":" : "<unset>",
+ atom->SLOT ? atom->SLOT : "",
+ atom->SUBSLOT ? "/" : "",
+ atom->SUBSLOT ? atom->SUBSLOT : "",
atom_slotdep_str[atom->slotdep]);
} else if (!strncmp("REPO", fmt, len)) {
if (showit || atom->REPO)
printf("::%s", HN(atom->REPO));
} else if (!strncmp("pfx", fmt, len)) {
if (showit || atom->pfx_op != ATOM_OP_NONE)
- fputs(atom->pfx_op == ATOM_OP_NONE ?
- "-" : atom_op_str[atom->pfx_op], stdout);
+ printf("%s", atom->pfx_op == ATOM_OP_NONE ?
+ "<unset>" : atom_op_str[atom->pfx_op]);
} else if (!strncmp("sfx", fmt, len)) {
if (showit || atom->sfx_op != ATOM_OP_NONE)
- fputs(atom->sfx_op == ATOM_OP_NONE ?
- "-" : atom_op_str[atom->sfx_op], stdout);
+ printf("%s", atom->sfx_op == ATOM_OP_NONE ?
+ "<unset>" : atom_op_str[atom->sfx_op]);
} else
printf("<BAD:%.*s>", (int)len, fmt);
++p;