Commit 80c53350 authored by Bernhard Link's avatar Bernhard Link

make more similar to dpkg output

parent 4419e9fc
......@@ -620,7 +620,7 @@ static retvalue write_dsc_file(struct fileentry *dscfile, unsigned int flags) {
if( flagset(DSC_WRITE_FILES) ) {
cef = NULL;
for( cs = cs_md5sum ; cs < cs_hashCOUNT ; cs++ ) {
for( cs = cs_hashCOUNT ; (cs--) > cs_md5sum ; ) {
cef = cef_newfield(source_checksum_names[cs],
CEF_ADD, CEF_LATE,
dsc->expected.names.count, cef);
......@@ -933,7 +933,7 @@ static retvalue write_changes_file(const char *changesfilename,struct changes *c
if( flagset(CHANGES_WRITE_FILES) ) {
cef = NULL;
for( cs = cs_md5sum ; cs < cs_hashCOUNT ; cs++ ) {
for( cs = cs_hashCOUNT ; (cs--) > cs_md5sum ; ) {
cef = cef_newfield(changes_checksum_names[cs],
CEF_ADD, CEF_LATE, filecount, cef);
if( cef == NULL )
......@@ -952,11 +952,20 @@ static retvalue write_changes_file(const char *changesfilename,struct changes *c
cef = cef_pop(cef);
break;
}
cef_setline2(cef, i, hash, hashlen, size, sizelen,
if( cs == cs_md5sum )
cef_setline2(cef, i,
hash, hashlen, size, sizelen,
3,
f->section?f->section:"-",
f->priority?f->priority:"-",
f->basename, NULL);
else
/* strange way, but as dpkg-genchanges
* does it this way... */
cef_setline2(cef, i,
hash, hashlen, size, sizelen,
1,
f->basename, NULL);
i++;
}
assert( f != NULL || i == filecount );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment