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

Re: Some patches for patch-tracker



Ciao.

On 02/08/2011 16:09, Raphael Hertzog wrote:
> On Tue, 02 Aug 2011, Giovanni Mascellani wrote:
>> diff --git a/patchtracker/Patch.py b/patchtracker/Patch.py
>> index 80ad8dc..0f90e2f 100644
>> --- a/patchtracker/Patch.py
>> +++ b/patchtracker/Patch.py
>> @@ -177,6 +177,8 @@ class Quilt30PatchSeries (GenericPatchSeries):
>>      try:
>>        try:
>>          series_fh = self.tarfh.extractfile("debian/patches/debian.series")
>> +        # FIXME - From dpkg-source manpage it appears that when both files
>> +        # exist, patch listed in both must be applied
>>        except KeyError:
>>          series_fh = self.tarfh.extractfile("debian/patches/series")
>>      except KeyError:
> 
> I think you have misread the manual page. The or is really a "xor".
> Thus the code is fine as is.
>
> Feel free to send a suggestion for a better wording of the dpkg-source
> manual page. :)

I'd suggest to add the sentence:

"If both files are present, the latter is just ignored."

just after the sentence:

"All  patches listed in debian/patches/debian.series or
debian/patches/series are then applied."

>> +	# Awful printing:
>> +	json.dump(packages, sys.stdout)
> 
> Hum the PTS doesn't use JSON yet (AFAIK), YAML might thus be a better
> choice.

Is it important? JSON is easy to decode using the standard Python
library, so it doesn't add any new dependency. However, if you don't
like it, it should be rather easy to switch from one to another. I'll
anyway wait for Sean's comment before doing other works.

Thanks, Giovanni.
-- 
Giovanni Mascellani <mascellani@poisson.phc.unipi.it>
Pisa, Italy

Web: http://poisson.phc.unipi.it/~mascellani
Jabber: g.mascellani@jabber.org / giovanni@elabor.homelinux.org

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: