summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f8ed5b9)
Also deal with the possiblity that files may have been hardlinked by
writing to a new file and renaming.
Signed-off-by: Mark Hymers <mhy@debian.org>
('Codename', 'codename') )
# A "Sub" Release file has slightly different fields
('Codename', 'codename') )
# A "Sub" Release file has slightly different fields
- subattribs = ( ('Origin', 'origin'),
+ subattribs = ( ('Archive', 'suite_name'),
+ ('Origin', 'origin'),
- ('Archive', 'suite_name'),
('Version', 'version') )
# Boolean stuff. If we find it true in database, write out "yes" into the release file
('Version', 'version') )
# Boolean stuff. If we find it true in database, write out "yes" into the release file
continue
subfile = os.path.join(dirpath, "Release")
continue
subfile = os.path.join(dirpath, "Release")
- subrel = open(subfile, "w")
+ subrel = open(subfile + '.new', "w")
for key, dbfield in subattribs:
if getattr(suite, dbfield) is not None:
for key, dbfield in subattribs:
if getattr(suite, dbfield) is not None:
subrel.write("%s: yes\n" % (key))
subrel.write("Component: %s%s\n" % (suite_suffix, comp))
subrel.write("%s: yes\n" % (key))
subrel.write("Component: %s%s\n" % (suite_suffix, comp))
+
+ # Urgh, but until we have all the suite/component/arch stuff in the DB,
+ # this'll have to do
+ arch = os.path.split(dirpath)[-1]
+ if arch.startswith('binary-'):
+ arch = arch[7:]
+
+ subrel.write("Architecture: %s\n" % (arch))
+ os.rename(subfile + '.new', subfile)
+
# Now that we have done the groundwork, we want to get off and add the files with
# their checksums to the main Release file
oldcwd = os.getcwd()
# Now that we have done the groundwork, we want to get off and add the files with
# their checksums to the main Release file
oldcwd = os.getcwd()