Bug 154954

Summary: [patch] csup(1) in the CVS mode terminates before it applies all required fixups
Product: Base System Reporter: Alexander Zagrebin <alex>
Component: binAssignee: Adrian Chadd <adrian>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 8.2-PRERELEASE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Alexander Zagrebin 2011-02-22 07:30:11 UTC
It seems that csup has a bug in a fixups handling.
csup doesn't downloads all required files during an "Applying fixups for collection..." stage.
For example, after new CVS tag created in the 'src' part of the FreeBSD master CVS repository, a csup have to download a whole src tree (due to a checksum mismatching). But really it downloads, for example, the 'src/bin', 'src/cddl' only and finishes successfully. On next run the csup downloads, for example again, 'src/contrib' and  'src/crypto' and stops again. And so on.

Fix: When an updater thread completes its job, it "closes" the list of fixups by invoking fixups_close. After this, the function fixups_get always returns NULL, despite the fact that there are fixups in the list.
The attached patch fixes this issue.

Patch attached with submission follows:
How-To-Repeat: Try to update a CVS tree using csup after a lot of changes in the 'src' (for example, after a new branch/tag is created in the repository).
csup will not update all required files at once, so multiple runs of csup are required for successful updating of the CVS tree.
Comment 1 Adrian Chadd freebsd_committer freebsd_triage 2011-09-18 10:51:02 UTC
Responsible Changed
From-To: freebsd-bugs->adrian

I'll take it
Comment 2 Adrian Chadd freebsd_committer freebsd_triage 2012-03-27 00:17:03 UTC
State Changed
From-To: open->patched

Patched in SVN r225980.
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2012-09-16 00:47:30 UTC
State Changed
From-To: patched->closed

mfced some time ago