Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 289967

Summary: sys-apps/portage-2.2_rc46: refactoring of installsources support
Product: Portage Development Reporter: Peter Alfredsen (RETIRED) <loki_val>
Component: Core - External InteractionAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS
Priority: High    
Version: 2.2   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 288499    
Attachments: Fixup installsources handling

Description Peter Alfredsen (RETIRED) gentoo-dev 2009-10-21 07:50:30 UTC
I just committed dev-util/debugedit-4.4.6-r2. It requires the -r switch to rsync to be dropped to prevent copying all files in source directories.

As I was looking a the prepstrip code for installsources, it struck me that it could be made much more efficient. Attached is a patch that does the following:

General installsources improvements

o Move the rsync run to the end so we only see errors about source files that have been moved
  once. Speeds up prepstrip as well.

o Optimize regexp used by grep so it catches anything after the last slash that looks like:
  <stdin>
  <built-in>
  <internal>

o Make rsync for installsources non-recursive. >=debugedit-4.4.6-r2 will now sometimes output
  directories. Earlier versions didn't, so the option wasn't used.
  This change requires that earlier versions of portage block >=debugedit-4.4.6-r2,
  otherwise when rsync is run, directories with all their contents will be installed
  in /usr/src/debug

o Preserve empty directories referenced in debug sections w.r.t.
  https://bugzilla.redhat.com/show_bug.cgi?id=444310

o Make installsources a bit more verbose, piping up when rsync is run.

This change has been tested with a full world rebuild. It makes error messages from rsync (When source files are shuffled around during the build process) much more concise and the speedup is noticeable.
Comment 1 Peter Alfredsen (RETIRED) gentoo-dev 2009-10-21 07:51:29 UTC
Created attachment 207784 [details, diff]
Fixup installsources handling
Comment 2 Zac Medico gentoo-dev 2009-10-23 18:12:00 UTC
Thanks, this is in svn r14706.
Comment 3 Zac Medico gentoo-dev 2009-10-31 04:39:53 UTC
This is fixed in 2.1.7.2 and 2.2_rc47. I've added blockers for >=debugedit-4.4.6-r2 to earlier versions of portage.