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

Re: libdebctrl Update



Hm.

On Tue, Jun 30, 2009 at 2:24 AM, Russ Allbery<rra@debian.org> wrote:
> Jonathan Yu <jonathan.i.yu@gmail.com> writes:
>
>> I think it would be useful if:
>> a) The library accepted any given architecture; but
>> b) The library warns when something looks fishy, like:
>>     i) an unsatisfiable condition as discussed above
>>     ii) the architecture isn't in the known list -- more of a, "hey,
>> you might have typo'd here, or the list I'm using is out of date, so
>> please file a bug report"
>>     iii) a particular architecture is specified twice
>
> For the record, what Lintian does is check the architecture against the
> list generated by dpkg-architecture and warn if it's not in that list.
> It doesn't check for things like !i386 i386 or for duplicates.
>
> That makes sense to me.
>
>> c) The library could clean up such strange things before writing the file
>
> Yeah, although in some cases the meaning is ambiguous.  I'm not sure if
> you want to just strip out ambiguous or bad data.  But duplicates it
> could definitely remove.
Where are meanings ambiguous?

I should note that anywhere that I "clean up" things for the user, I
also emit a warning. For example if there are multiple newlines
between paragraphs, I shrink that down to one, and emit a warning.

If there are tabs instead of spaces beginning a continuation line, like:
Description: blah blah blah
<TAB>Blah

Then I emit a warning that tabs will be changed to spaces, and do that.

Definitely I don't want to break someone's control file, though I
don't think anything I've come across is ambiguous so as to do that.

Thanks for the discussion Russ :-)

Cheers,

Jonathan


Reply to: