From: Arfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com>
To: Gentoo Portage Development <gentoo-portage-dev@lists.gentoo.org>
Subject: Re: [gentoo-portage-dev] [PATCH] emerge --info: Check metadata/timestamp.chk in all repositories
Date: Sun, 14 Dec 2014 08:21:24 +0100 [thread overview]
Message-ID: <201412140821.26387.Arfrever.FTA@gmail.com> (raw)
In-Reply-To: <201412131833.04573.Arfrever.FTA@gmail.com>
[-- Attachment #1.1: Type: Text/Plain, Size: 197 bytes --]
New patch without os.path.isfile().
[[[
emerge --info: Check metadata/timestamp.chk in all repositories.
1 use of deprecated PORTDIR has been deleted.
]]]
--
Arfrever Frehtes Taifersar Arahesis
[-- Attachment #1.2: portage.patch --]
[-- Type: text/x-patch, Size: 1210 bytes --]
--- pym/_emerge/actions.py
+++ pym/_emerge/actions.py
@@ -1452,6 +1452,7 @@
vardb = trees[eroot]["vartree"].dbapi
portdb = trees[eroot]['porttree'].dbapi
bindb = trees[eroot]["bintree"].dbapi
+ repos = portdb.settings.repositories
for x in myfiles:
any_match = False
cp_exists = bool(vardb.match(x.cp))
@@ -1554,13 +1555,10 @@
line += ",%10d free" % (vm_info["swap.free"] // 1024,)
append(line)
- lastSync = portage.grabfile(os.path.join(
- settings["PORTDIR"], "metadata", "timestamp.chk"))
- if lastSync:
- lastSync = lastSync[0]
- else:
- lastSync = "Unknown"
- append("Timestamp of tree: %s" % (lastSync,))
+ for repo in repos:
+ last_sync = portage.grabfile(os.path.join(repo.location, "metadata", "timestamp.chk"))
+ if last_sync:
+ append("Timestamp of repository %s: %s" % (repo.name, last_sync[0]))
# Searching contents for the /bin/sh provider is somewhat
# slow. Therefore, use the basename of the symlink target
@@ -1707,7 +1705,6 @@
append("%s %s" % \
((cp + ":").ljust(cp_max_len + 1), versions))
- repos = portdb.settings.repositories
append("Repositories:\n")
for repo in repos:
append(repo.info_string())
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-12-14 7:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-13 17:33 [gentoo-portage-dev] [PATCH] emerge --info: Check metadata/timestamp.chk in all repositories Arfrever Frehtes Taifersar Arahesis
2014-12-13 18:43 ` Zac Medico
2014-12-14 7:21 ` Arfrever Frehtes Taifersar Arahesis [this message]
2014-12-14 17:57 ` Zac Medico
2014-12-15 14:09 ` Brian Dolbec
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=201412140821.26387.Arfrever.FTA@gmail.com \
--to=arfrever.fta@gmail.com \
--cc=gentoo-portage-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