~ubuntu-branches/ubuntu/raring/reprepro/raring

« back to all changes in this revision

Viewing changes to readrelease.c

  • Committer: Bazaar Package Importer
  • Author(s): Bernhard R. Link
  • Date: 2011-05-05 16:34:23 UTC
  • mfrom: (21.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110505163423-x49kbdijyoubai4x
Tags: 4.6.0-1
* new release
- general cleanup
- new FilterSrcList
* increase Standards-Version, no changes needed

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
        bool foundanything = false;
36
36
 
37
37
        r = readtextfile(releasefile, releasefile, &chunk, NULL);
38
 
        assert( r != RET_NOTHING );
39
 
        if( !RET_IS_OK(r) )
 
38
        assert (r != RET_NOTHING);
 
39
        if (!RET_IS_OK(r))
40
40
                return r;
41
 
        for( cs = cs_md5sum ; cs < cs_hashCOUNT ; cs++ ) {
42
 
                if( ignore[cs] ) {
 
41
        for (cs = cs_md5sum ; cs < cs_hashCOUNT ; cs++) {
 
42
                if (ignore[cs]) {
43
43
                        strlist_init(&files[cs]);
44
44
                        continue;
45
45
                }
46
 
                assert( release_checksum_names[cs] != NULL );
 
46
                assert (release_checksum_names[cs] != NULL);
47
47
                r = chunk_getextralinelist(chunk, release_checksum_names[cs],
48
48
                                &files[cs]);
49
 
                if( RET_WAS_ERROR(r) ) {
50
 
                        while( cs-- > cs_md5sum ) {
 
49
                if (RET_WAS_ERROR(r)) {
 
50
                        while (cs-- > cs_md5sum) {
51
51
                                strlist_done(&files[cs]);
52
52
                        }
53
53
                        free(chunk);
54
54
                        return r;
55
 
                } else if( r == RET_NOTHING )
 
55
                } else if (r == RET_NOTHING)
56
56
                        strlist_init(&files[cs]);
57
57
                else
58
58
                        foundanything = true;
59
59
        }
60
60
        free(chunk);
61
61
 
62
 
        if( !foundanything ) {
 
62
        if (!foundanything) {
63
63
                fprintf(stderr, "Missing checksums in Release file '%s'!\n",
64
64
                                releasefile);
65
65
                return RET_ERROR;
66
66
        }
67
67
 
68
68
        r = checksumsarray_parse(out, files, releasefile);
69
 
        for( cs = cs_md5sum ; cs < cs_hashCOUNT ; cs++ ) {
 
69
        for (cs = cs_md5sum ; cs < cs_hashCOUNT ; cs++) {
70
70
                strlist_done(&files[cs]);
71
71
        }
72
72
        return r;