summaryrefslogtreecommitdiffstats
path: root/pym/_emerge/main.py
diff options
context:
space:
mode:
authorSebastian Luther <SebastianLuther@gmx.de>2010-04-08 07:59:15 +0200
committerZac Medico <zmedico@gentoo.org>2010-05-27 03:52:06 -0700
commit0c85dbb060efade7114a72db615199c88e8558d6 (patch)
treed5ebb6809ccc8826e5909badb6ab13761e520b40 /pym/_emerge/main.py
parentdf1e465d93291689e425ddfd211d8680341322da (diff)
downloadportage-0c85dbb060efade7114a72db615199c88e8558d6.tar.gz
portage-0c85dbb060efade7114a72db615199c88e8558d6.tar.bz2
portage-0c85dbb060efade7114a72db615199c88e8558d6.zip
Add --rebuilt-binaries-timestamp option
This option makes emerge ignore binaries that would have been used for --rebuilt-binaries, if they are older than the given timestamp. Binaries are only reinstalled if they have a newer BUILD_TIME than the installed package (not only unequal) with this option.
Diffstat (limited to 'pym/_emerge/main.py')
-rw-r--r--pym/_emerge/main.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index ca3d17bee..fa2dbaa12 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -637,6 +637,12 @@ def parse_opts(tmpcmdline, silent=False):
"type" : "choice",
"choices" : ("True", "n")
},
+
+ "--rebuilt-binaries-timestamp": {
+ "help" : "use only binaries that are newer than this " + \
+ "timestamp for --rebuilt-binaries",
+ "action" : "store"
+ },
"--root": {
"help" : "specify the target root filesystem for merging packages",
@@ -855,6 +861,20 @@ def parse_opts(tmpcmdline, silent=False):
(myoptions.load_average,), noiselevel=-1)
myoptions.load_average = load_average
+
+ if myoptions.rebuilt_binaries_timestamp:
+ try:
+ rebuilt_binaries_timestamp = int(myoptions.rebuilt_binaries_timestamp)
+ except ValueError:
+ rebuilt_binaries_timestamp = -1
+
+ if rebuilt_binaries_timestamp < 0:
+ rebuilt_binaries_timestamp = 0
+ if not silent:
+ writemsg("!!! Invalid --rebuilt-binaries-timestamp parameter: '%s'\n" % \
+ (myoptions.rebuilt_binaries_timestamp,), noiselevel=-1)
+
+ myoptions.rebuilt_binaries_timestamp = rebuilt_binaries_timestamp
if myoptions.use_ebuild_visibility in ("True",):
myoptions.use_ebuild_visibility = True