~ubuntu-branches/ubuntu/wily/simplestreams/wily-proposed

« back to all changes in this revision

Viewing changes to bin/sstream-mirror

  • Committer: Package Import Robot
  • Author(s): Scott Moser
  • Date: 2015-09-24 21:53:46 UTC
  • mfrom: (1.1.16)
  • Revision ID: package-import@ubuntu.com-20150924215346-ijw9jcrq49fchix8
Tags: 0.1.0~bzr400-0ubuntu1
* New upstream snapshot.
  - sstream-mirror, sstream-query, sstream-sync: add --no-verify
    flag (LP: #1249018)
  - pep8/flake8 cleanups
  - several closing of filehandle fixes (LP: #1461181)
  - GlanceMirror fix stack trace if no matching entries (LP: #1353724)
  - tools: upstream development tools fixes (not shipped in ubuntu)
  - GlanceMirror: change known Ubuntu arches into appropriate glance
    arch values (LP: #1483159)
  - Ensure all users of 'sync' get checksumming of content by default.
    insert_item now provides a content source that does checksumming
    during reads and raises exception on error (LP: #1487004)
* debian/README.source: add file, doc how to take upstream snapshot
* debian/rules: export SS_REQUIRE_DISTRO_INFO so that test
  runs without a dependency on distro-info

Show diffs side-by-side

added added

removed removed

Lines of Context:
84
84
 
85
85
    parser.add_argument('--keyring', action='store', default=None,
86
86
                        help='keyring to be specified to gpg via --keyring')
 
87
    parser.add_argument('--no-verify', '-U', action='store_false',
 
88
                        dest='verify', default=True,
 
89
                        help="do not gpg check signed json files")
 
90
    parser.add_argument('--no-checksumming-reader', action='store_false',
 
91
                        dest='checksumming_reader', default=True,
 
92
                        help=("do not call 'insert_item' with a reader"
 
93
                              " that does checksumming."))
87
94
 
88
95
    parser.add_argument('source_mirror')
89
96
    parser.add_argument('output_d')
96
103
 
97
104
    def policy(content, path):
98
105
        if initial_path.endswith('sjson'):
99
 
            return util.read_signed(content, keyring=args.keyring)
 
106
            return util.read_signed(content,
 
107
                                    keyring=args.keyring,
 
108
                                    checked=args.verify)
100
109
        else:
101
110
            return content
102
111
 
103
112
    filter_list = filters.get_filters(args.filters)
104
113
    mirror_config = {'max_items': args.max, 'keep_items': args.keep,
105
114
                     'filters': filter_list,
106
 
                     'item_download': not args.no_item_download}
 
115
                     'item_download': not args.no_item_download,
 
116
                     'checksumming_reader': args.checksumming_reader}
107
117
 
108
118
    level = (log.ERROR, log.INFO, log.DEBUG)[min(args.verbose, 2)]
109
119
    log.basicConfig(stream=args.log_file, level=level)