Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 100300 - Portage emerge should save resume data after merging each package
Summary: Portage emerge should save resume data after merging each package
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 115839
  Show dependency tree
 
Reported: 2005-07-25 15:42 UTC by Joshua Pettett
Modified: 2006-02-26 13:56 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Pettett 2005-07-25 15:42:16 UTC
I'm a n00b when it comes to understanding Portage's internals, but it seems to  
me that it would be both useful and simple to have emerge save the  
"--resume data" after each merge operation rather than only when "properly  
interupted".  That way, --resume would work after power failures, system  
crashes, etc.  Thanks for your consideration. 

Reproducible: Always
Steps to Reproduce:
1. emerge -e world  
2. After 100+ packages have been merged, drop limb on power line :-) 
3. emerge --resume 
  
Actual Results:  
emerge: It seems we have nothing to resume... 

Expected Results:  
*** Resuming merge...
Comment 1 Jason Stubbs (RETIRED) gentoo-dev 2005-07-28 07:25:20 UTC
Putting a hold on feature requests for portage as they are drowning out the 
bugs. Most of these features should be available in the next major version of 
portage. But for the time being, they are just drowning out the major bugs and 
delaying the next version's progress. 
 
Any bugs that contain patches and any bugs for etc-update or dispatch-conf can 
be reopened. Sorry, I'm just not good enough with bugzilla. ;) 
Comment 2 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-12-27 19:12:50 UTC
this is INVALID as emerge already does this.
Comment 3 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-12-27 19:13:18 UTC
Invalid
Comment 4 Joshua Pettett 2006-01-24 13:06:14 UTC
(In reply to comment #2)
> emerge already does this.

In 2.0.x???  portage 2.0.54 on my comp doesn't.  I'll provide a specific test case of you want me to.

Comment 5 Alec Warner (RETIRED) archtester gentoo-dev Security 2006-01-24 14:13:29 UTC
Please do.
Comment 6 Joshua Pettett 2006-01-24 14:46:33 UTC
Test case:

1. Run "emerge svn2cl cvs2cl"
2. While emerge is working on the second ebuild (i.e. cvs2cl), flip main power breaker (or just kill -9 the emerge process)
3. Run "emerge --resume"
4. Observe "emerge: It seems we have nothing to resume..."

Notice how this behavior is different than what happens if kill -15 or Ctrl+C is used in step 2.  I want portage to be able to resume regardless of how it dies.
Comment 7 Zac Medico gentoo-dev 2006-01-24 17:11:42 UTC
I'll take some credit for misleading Alec by telling him that emerge does this already. :P

--- portage-2.1_pre.orig/bin/emerge
+++ portage-2.1_pre/bin/emerge
@@ -2142,6 +2142,7 @@ class depgraph:
 
 			# Unsafe for parallel merges
 			del portage.mtimedb["resume"]["mergelist"][0]
+			portage.commit_mtimedb()
 
 		emergelog(" *** Finished. Cleaning up...")
Comment 8 Zac Medico gentoo-dev 2006-02-05 12:29:55 UTC
This is now in trunk for release in portage-2.1_pre5.
Comment 9 Zac Medico gentoo-dev 2006-02-26 13:56:01 UTC
Released in 2.1_pre5.