From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoolkit:master commit in: pym/gentoolkit/eclean/
Date: Fri, 24 Jun 2016 21:36:55 +0000 (UTC) [thread overview]
Message-ID: <1466804115.78a446d0859fd1d3c2922d821fe0664099287312.zmedico@gentoo> (raw)
commit: 78a446d0859fd1d3c2922d821fe0664099287312
Author: Manuel Mommertz <2kmm <AT> gmx <DOT> de>
AuthorDate: Fri Jun 24 15:40:56 2016 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Jun 24 21:35:15 2016 +0000
URL: https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=78a446d0
eclean: Keep only packages with BUILD_TIME equal to installed one
X-Gentoo-bug: 586658
X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=586658
Acked-by: Paul Varner <fuzzyray <AT> gentoo.org>
pym/gentoolkit/eclean/search.py | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/pym/gentoolkit/eclean/search.py b/pym/gentoolkit/eclean/search.py
index 7b261b8..ce796f5 100644
--- a/pym/gentoolkit/eclean/search.py
+++ b/pym/gentoolkit/eclean/search.py
@@ -562,24 +562,28 @@ def findPackages(
if stat.S_ISLNK(st[stat.ST_MODE]):
clean_me[cpv].append(os.path.realpath(path))
# keep only obsolete ones
- if destructive:
- dbapi = var_dbapi
- if package_names:
- cp_all = dict.fromkeys(dbapi.cp_all())
- else:
- cp_all = {}
+ if destructive and package_names:
+ cp_all = dict.fromkeys(var_dbapi.cp_all())
else:
- dbapi = port_dbapi
cp_all = {}
for cpv in list(clean_me):
if exclDictMatchCP(exclude,portage.cpv_getkey(cpv)):
# exclusion because of the exclude file
del clean_me[cpv]
continue
- if dbapi.cpv_exists(cpv):
- # exclusion because pkg still exists (in porttree or vartree)
+ if not destructive and port_dbapi.cpv_exists(cpv):
+ # exclusion because pkg still exists (in porttree)
del clean_me[cpv]
continue
+ if destructive and var_dbapi.cpv_exists(cpv):
+ buildtime = var_dbapi.aux_get(cpv, ['BUILD_TIME'])[0].encode('utf-8').strip()
+ clean_me[cpv] = [path for path in clean_me[cpv]
+ # only keep path if BUILD_TIME is identical with vartree
+ if portage.xpak.tbz2(path).getfile('BUILD_TIME').strip() != buildtime]
+ if not clean_me[cpv]:
+ # nothing we can clean for this package
+ del clean_me[cpv]
+ continue
if portage.cpv_getkey(cpv) in cp_all and port_dbapi.cpv_exists(cpv):
# exlusion because of --package-names
del clean_me[cpv]
next reply other threads:[~2016-06-24 21:37 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-24 21:36 Zac Medico [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-05-03 5:42 [gentoo-commits] proj/gentoolkit:master commit in: pym/gentoolkit/eclean/ Sam James
2024-05-03 5:40 Sam James
2024-05-03 5:40 Sam James
2024-05-03 5:40 Sam James
2024-05-03 5:11 Sam James
2024-02-18 2:19 Brian Dolbec
2024-02-18 2:19 Brian Dolbec
2024-01-19 7:03 Sam James
2024-01-19 6:15 Sam James
2024-01-12 19:16 Matt Turner
2023-12-03 7:51 Sam James
2023-10-08 3:28 Sam James
2023-10-08 3:28 Sam James
2023-09-29 7:20 Sam James
2023-08-24 19:52 Sam James
2023-08-22 20:54 Sam James
2023-08-22 20:52 Sam James
2023-08-22 20:50 Sam James
2023-08-22 20:50 Sam James
2023-08-22 20:35 Sam James
2023-08-21 5:16 Sam James
2023-08-21 5:16 Sam James
2022-07-11 7:17 Brian Dolbec
2022-07-09 22:45 Brian Dolbec
2022-07-09 21:46 Brian Dolbec
2022-06-01 10:25 Yixun Lan
2022-05-28 15:28 Yixun Lan
2022-02-09 10:48 Sam James
2020-06-09 17:29 Zac Medico
2020-03-12 16:51 Matt Turner
2020-03-12 16:51 Matt Turner
2020-01-03 4:31 Matt Turner
2019-12-05 16:51 Matt Turner
2019-12-05 16:51 Matt Turner
2019-09-13 23:34 Zac Medico
2017-12-12 5:51 Zac Medico
2016-07-03 6:29 Zac Medico
2016-07-01 6:19 Zac Medico
2016-06-24 21:40 Zac Medico
2016-06-23 20:01 Paul Varner
2015-10-19 21:33 Paul Varner
2015-10-15 21:39 Paul Varner
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=1466804115.78a446d0859fd1d3c2922d821fe0664099287312.zmedico@gentoo \
--to=zmedico@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