From: "Fabian Groffen" <grobian@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage-utils:master commit in: /, libq/
Date: Wed, 1 Jan 2020 17:54:32 +0000 (UTC) [thread overview]
Message-ID: <1577901212.3e6a2e36af413a4dc1469a4042c8ce1aae95dfc9.grobian@gentoo> (raw)
commit: 3e6a2e36af413a4dc1469a4042c8ce1aae95dfc9
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 1 17:53:32 2020 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Wed Jan 1 17:53:32 2020 +0000
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=3e6a2e36
*: use new PF in places were it was simulated
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
libq/atom.c | 5 +----
libq/tree.c | 10 ++++------
qgrep.c | 7 +++----
qlist.c | 22 ++++++++++------------
qlop.c | 14 +++++---------
qpkg.c | 13 ++++---------
6 files changed, 27 insertions(+), 44 deletions(-)
diff --git a/libq/atom.c b/libq/atom.c
index 6f70847..946e821 100644
--- a/libq/atom.c
+++ b/libq/atom.c
@@ -794,10 +794,7 @@ atom_format_r(
append_buf(buf, buflen, "%s%s%s", BLUE, atom->PN, NORM);
if (atom->PV)
append_buf(buf, buflen, "%s-%s%s",
- CYAN, atom->PV, NORM);
- if (atom->PR_int)
- append_buf(buf, buflen,"%s-r%d%s",
- CYAN, atom->PR_int, NORM);
+ CYAN, atom->PVR, NORM);
} else if (!strncmp("PR", fmt, len)) {
if (showit || atom->PR_int)
append_buf(buf, buflen, "%sr%d%s",
diff --git a/libq/tree.c b/libq/tree.c
index bac9d00..377af83 100644
--- a/libq/tree.c
+++ b/libq/tree.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2019 Gentoo Foundation
+ * Copyright 2005-2020 Gentoo Foundation
* Distributed under the terms of the GNU General Public License v2
*
* Copyright 2005-2008 Ned Ludd - <solar@gentoo.org>
@@ -1196,8 +1196,8 @@ tree_foreach_packages(tree_ctx *ctx, tree_pkg_cb callback, void *priv)
tree_close_cat(cat);
pkg->cat_ctx = cat = tree_open_cat(ctx, atom->CATEGORY);
}
- pkgnamelen = snprintf(pkgname, sizeof(pkgname), "%s-%s.tbz2",
- atom->PN, atom->PR_int > 0 ? atom->PVR : atom->PV);
+ pkgnamelen = snprintf(pkgname, sizeof(pkgname),
+ "%s.tbz2", atom->PF);
pkgname[pkgnamelen - (sizeof(".tbz2") - 1)] = '\0';
pkg->name = pkgname;
pkg->slot = meta->Q_SLOT == NULL ? (char *)"0" : meta->Q_SLOT;
@@ -1389,9 +1389,7 @@ static int tree_get_atoms_cb(tree_pkg_ctx *pkg_ctx, void *priv)
char abuf[BUFSIZ];
if (state->fullcpv) {
- snprintf(abuf, sizeof(abuf), "%s/%s-%s",
- atom->CATEGORY, atom->PN,
- atom->PR_int > 0 ? atom->PVR : atom->PV);
+ snprintf(abuf, sizeof(abuf), "%s/%s", atom->CATEGORY, atom->PF);
state->cpf = add_set(abuf, state->cpf);
} else {
snprintf(abuf, sizeof(abuf), "%s/%s", atom->CATEGORY, atom->PN);
diff --git a/qgrep.c b/qgrep.c
index 2a64d1b..4d8c27f 100644
--- a/qgrep.c
+++ b/qgrep.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2019 Gentoo Foundation
+ * Copyright 2005-2020 Gentoo Foundation
* Distributed under the terms of the GNU General Public License v2
*
* Copyright 2005 Petteri Räty - <betelgeuse@gentoo.org>
@@ -416,9 +416,8 @@ qgrep_cache_cb(tree_pkg_ctx *pkg_ctx, void *priv)
}
/* cat/pkg/pkg-ver.ebuild */
- snprintf(buf, sizeof(buf), "%s/%s/%s-%s.ebuild",
- patom->CATEGORY, patom->PN, patom->PN,
- patom->PR_int > 0 ? patom->PVR : patom->PV);
+ snprintf(buf, sizeof(buf), "%s/%s/%s.ebuild",
+ patom->CATEGORY, patom->PN, patom->PF);
label = NULL;
if (data->show_name) {
diff --git a/qlist.c b/qlist.c
index 1d4862f..f77eaea 100644
--- a/qlist.c
+++ b/qlist.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2019 Gentoo Foundation
+ * Copyright 2005-2020 Gentoo Foundation
* Distributed under the terms of the GNU General Public License v2
*
* Copyright 2005 Martin Schlemmer - <azarah@gentoo.org>
@@ -262,10 +262,9 @@ qlist_match(
if (exact) {
int i;
- snprintf(buf, sizeof(buf), "%s/%s-%s%s%s%s%s%s%s",
+ snprintf(buf, sizeof(buf), "%s/%s%s%s%s%s%s%s",
atom->CATEGORY,
- atom->PN,
- atom->PVR,
+ atom->PF,
atom->SLOT != NULL ? ":" : "",
atom->SLOT != NULL ? atom->SLOT : "",
atom->SUBSLOT != NULL ? "/" : "",
@@ -273,10 +272,10 @@ qlist_match(
atom->REPO != NULL ? "::" : "",
atom->REPO != NULL ? atom->REPO : "");
- /* exact match: CAT/PN-PVR[:SLOT][::REPO] */
+ /* exact match: CAT/PF[:SLOT][::REPO] */
if (strcmp(name, buf) == 0)
return true;
- /* exact match: PN-PVR[:SLOT][::REPO] */
+ /* exact match: PF[:SLOT][::REPO] */
if (strcmp(name, strstr(buf, "/") + 1) == 0)
return true;
@@ -294,15 +293,14 @@ qlist_match(
if (strcmp(name, strstr(buf, "/") + 1) == 0)
return true;
} else {
- /* partial leading match: CAT/PN-PVR */
- snprintf(buf, sizeof(buf), "%s/%s-%s",
- atom->CATEGORY, atom->PN, atom->PVR);
+ /* partial leading match: CAT/PF */
+ snprintf(buf, sizeof(buf), "%s/%s",
+ atom->CATEGORY, atom->PF);
if (strncmp(name, buf, pf_len) == 0 ||
rematch(name, buf, REG_EXTENDED) == 0)
return true;
- /* partial leading match: PN-PVR */
- snprintf(buf, sizeof(buf), "%s-%s", atom->PN, atom->PVR);
- if (strncmp(name, buf, pf_len) == 0 ||
+ /* partial leading match: PF */
+ if (strncmp(name, atom->PF, pf_len) == 0 ||
rematch(name, buf, REG_EXTENDED) == 0)
return true;
}
diff --git a/qlop.c b/qlop.c
index 3120d85..9fa1387 100644
--- a/qlop.c
+++ b/qlop.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2019 Gentoo Foundation
+ * Copyright 2005-2020 Gentoo Foundation
* Distributed under the terms of the GNU General Public License v2
*
* Copyright 2005-2010 Ned Ludd - <solar@gentoo.org>
@@ -654,10 +654,8 @@ static int do_emerge_log(
snprintf(afmt, sizeof(afmt), "%s/%s",
pkgw->atom->CATEGORY, pkgw->atom->PN);
} else {
- snprintf(afmt, sizeof(afmt), "%s/%s-%s",
- pkgw->atom->CATEGORY, pkgw->atom->PN,
- pkgw->atom->PR_int > 0 ?
- pkgw->atom->PVR : pkgw->atom->PV);
+ snprintf(afmt, sizeof(afmt), "%s/%s",
+ pkgw->atom->CATEGORY, pkgw->atom->PF);
}
pkg = add_set_value(afmt, pkgw, merge_averages);
@@ -798,10 +796,8 @@ static int do_emerge_log(
snprintf(afmt, sizeof(afmt), "%s/%s",
pkgw->atom->CATEGORY, pkgw->atom->PN);
} else {
- snprintf(afmt, sizeof(afmt), "%s/%s-%s",
- pkgw->atom->CATEGORY, pkgw->atom->PN,
- pkgw->atom->PR_int > 0 ?
- pkgw->atom->PVR : pkgw->atom->PV);
+ snprintf(afmt, sizeof(afmt), "%s/%s",
+ pkgw->atom->CATEGORY, pkgw->atom->PF);
}
pkg = add_set_value(afmt, pkgw, unmerge_averages);
diff --git a/qpkg.c b/qpkg.c
index f5e8168..9d2d82a 100644
--- a/qpkg.c
+++ b/qpkg.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2019 Gentoo Foundation
+ * Copyright 2005-2020 Gentoo Foundation
* Distributed under the terms of the GNU General Public License v2
*
* Copyright 2005-2010 Ned Ludd - <solar@gentoo.org>
@@ -54,11 +54,6 @@ extern char pretend;
static char *qpkg_bindir = NULL;
static int eclean = 0;
-static char *
-atom_to_pvr(depend_atom *atom) {
- return (atom->PR_int == 0 ? atom->P : atom->PVR );
-}
-
/* checks to make sure this is a .tbz2 file. used by scandir() */
static int
filter_tbz2(const struct dirent *dentry)
@@ -228,7 +223,7 @@ qpkg_make(depend_atom *atom)
buf = xmalloc(buflen);
snprintf(buf, buflen, "%s/%s/%s/CONTENTS",
- portvdb, atom->CATEGORY, atom_to_pvr(atom));
+ portvdb, atom->CATEGORY, atom->PF);
if ((fp = fopen(buf, "r")) == NULL) {
free(buf);
return -1;
@@ -293,7 +288,7 @@ qpkg_make(depend_atom *atom)
xpaksize = st.st_size;
snprintf(buf, buflen, "%s/%s/%s",
- portvdb, atom->CATEGORY, atom_to_pvr(atom));
+ portvdb, atom->CATEGORY, atom->PF);
xpak_argv[0] = buf;
xpak_argv[1] = NULL;
xpak_create(AT_FDCWD, tbz2, 1, xpak_argv, 1, verbose);
@@ -316,7 +311,7 @@ qpkg_make(depend_atom *atom)
mkdir_p(buf, 0755);
snprintf(buf, buflen, "%s/%s/%s.tbz2",
- qpkg_bindir, atom->CATEGORY, atom_to_pvr(atom));
+ qpkg_bindir, atom->CATEGORY, atom->PF);
if (rename(tbz2, buf)) {
warnp("could not move '%s' to '%s'", tbz2, buf);
free(buf);
next reply other threads:[~2020-01-01 17:54 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-01 17:54 Fabian Groffen [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-01-02 7:57 [gentoo-commits] proj/portage-utils:master commit in: /, libq/ Fabian Groffen
2020-05-16 18:27 Fabian Groffen
2020-01-05 16:08 Fabian Groffen
2020-01-04 19:48 Fabian Groffen
2019-11-15 13:52 Fabian Groffen
2019-07-14 13:09 Fabian Groffen
2019-05-07 6:19 Fabian Groffen
2019-05-06 17:33 Fabian Groffen
2019-05-02 15:48 Fabian Groffen
2018-05-18 16:58 Fabian Groffen
2016-12-29 2:25 Mike Frysinger
2016-12-29 2:25 Mike Frysinger
2016-02-14 1:26 Mike Frysinger
2016-02-14 1:26 Mike Frysinger
2015-11-28 2:44 Mike Frysinger
2015-11-28 2:44 Mike Frysinger
2015-02-24 1:26 Mike Frysinger
2014-03-21 5:32 Mike Frysinger
2014-03-10 8:45 Mike Frysinger
2014-03-10 6:00 Mike Frysinger
2014-03-08 5:51 Mike Frysinger
2014-03-08 5:51 Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1577901212.3e6a2e36af413a4dc1469a4042c8ce1aae95dfc9.grobian@gentoo \
--to=grobian@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox