get_new(filename,
old_files,
old_all_files,
all_pieces,
all_new_pieces)
| source code
|
Read the new piece data from a Packages file.
Reads the Packages file, finding old files in it and copying their
data to the new ordering, and adding any new files found to the end of
the ordering. The old_files input is modified by removing the found files
from it, and the 'NextPiece' header in the input headers is changed.
Any architecture:all files found are processed and added to the 'all'
piece ordering. This is done by modifying the input old_all_files,
all_pieces, and all_new_pieces variables.
- Parameters:
filename (string) - the Packages file to open and parse
old_files (dictionary) - the original piece ordering, keys are the file names, values
are the starting piece number
old_all_files (dictionary) - the original piece ordering for architecture:all files, keys
are the file names, values are the starting piece number
all_pieces (dictionary) - the new piece ordering for architecture:all files, keys are
the starting piece numbers, values are the file names
all_new_pieces (list of (string,
long)) - the file name and file size of the new architecture:all files
that have been found
- Returns:
dictionary
- the new piece ordering, keys are the starting piece numbers,
values are the file names
|