On Tue, 07 Jul 2009, Colin Watson wrote:
> dpkg-parsechangelog doesn't emit the Launchpad-Bugs-Fixed field when the
> vendor is Ubuntu.

Why? What's wrong in the current implementation?

> In general I think handling this in dpkg-genchanges is
> just the wrong place for it; other scripts mention Closes and so need to
> handle Launchpad-Bugs-Fixed as well.

That might be true but I'm not sure I want all those references
to that field everywhere. We should better support custom vendor-specific
fields...

> The attached patch series makes things work much better, and adds a few
> tests (although at the moment you need to set DEB_VENDOR to various
> things in order to exercise all the possibilities). I'm not entirely
> happy with the fact that I've had to mention Launchpad-Bugs-Fixed
> outside vendor hooks in various places, although those mentions are a
> no-op if the Ubuntu vendor hook isn't run so I think it's a tolerable
> situation; let me know if you can think of a cleaner approach. I didn't
> want to add a proliferation of hooks just for a single feature!

I understand. Another approach that avoids this pitfall could be
to add one hook that exports meta-information about vendor-specific
fields such as where the field can be found (debian/control,
dpkg-parsechangelog), where the field must be output (Source, Binary,
Changes) and at what position (after/before an official field) it should
appear.

Then the "upstream" code would simply use that data structure to update
its list of fields and the parsing logic.

Populating the field with a value would still require another separate
hook but at least vendors could add new fields in their meta-information
without all the warnings.

> Subject: [PATCH 1/4] Localise $_ in Dpkg::Cdata::parsecdata to avoid 
> confusing callers.

OOI, what caller was confused ?

> Subject: [PATCH 4/4] Add tests for Launchpad-Bugs-Fixed handling

You might want to put that in a separate script where you force
vendor to Ubuntu and you verify only what's relevant to Ubuntu's specific
behaviour.

Don't hesitate to add a copy of the vendor file if needed and to update
the code to allow usage of a custom directory instead of
/etc/dpkg/origins/.

Cheers,
-- 
Raphaël Hertzog

Contribuez à Debian et gagnez un cahier de l'admin Debian Lenny :
http://www.ouaza.com/wp/2009/03/02/contribuer-a-debian-gagner-un-livre/




--
To UNSUBSCRIBE, email to debian-dpkg-bugs-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to