[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [dak/master] process-new: display existing overrides



2013/4/26 Ansgar Burchardt <ansgar@debian.org>:
>> +def claimed_overrides(upload, missing, session):
>> +    source = [upload.source.source]
>
> This shouldn't be a list.

Fixed (also below).

>> +    binaries = set([x.package for x in upload.binaries])
>> +    suites = ('unstable','experimental')
>
> We shouldn't hardcode suite names. The interesting suites are those that
> share overrides with the suite this upload targets.

I agree, but...

> override_suite = upload.target_suite.overridesuite \
>                  or upload.target_suite.suite_name
> suites = session.query(Suite.suite_name).filter(
>            (Suite.suite_name == override_suite)
>            || (Suite.overridesuite == override_suite)).all()
>
> should do the right thing here? (untested)

... this won't allow checking for unstable when package is targeted
experimental. I checked a bit when I initially wrote the code, but I
haven't found a clean solution. Any suggestion?

>> +    for m in missing:
>> +        if m['type'] != 'dsc':
>> +            binaries.remove(m['package'])
>> +    return session.query(DBBinary).filter(DBBinary.package.in_(binaries)). \
>> +                         join(DBBinary.source). \
>> +                         filter(not_(DBSource.source.in_(source))). \
>
>   DBSource.source != source

Fixed (also above)

> Hmm, maybe "BINARIES TAKEN OVER"? It's a source taking over another
> source's binaries after all. "claimed overrides" is a bit unclear.

I was unsure about claimed overrides as well. I think "BINARIES TAKEN
OVER" seems more appropriate. Fixed.


Reply to: