[sponsor-patch] support cowbuilder and cowbuilder-dist

Bug #728751 reported by Julian Taylor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-dev-tools (Ubuntu)
Fix Released
Wishlist
Julian Taylor

Bug Description

Binary package hint: ubuntu-dev-tools

it would be nice when sponsor-patch would also supports building the package with cowbuilder/cowbuilder-dist
they are only wrappers to pbuilder and thus support almost the same options.
The differences (documented in man cowbuilder) do not affect sponsor-patch.

Revision history for this message
Benjamin Drung (bdrung) wrote :

I reviewed your changes:
1. Can you make command in internal variable (self.command -> self._command)?
2. Can you sort the pbuilder-dist, cowbuilder, ... list alphabetical?
3. The man pages needs to be updated.

Revision history for this message
Julian Taylor (jtaylor) wrote :

done, backportpackage also works with cowbuilder so that manpage is also updated.

Revision history for this message
Benjamin Drung (bdrung) wrote :

4. Can you sort the "elif builder == foo" part too?
5. Missing comma in the error message: "pbuilder, pbuilder-dist and sbuild" -> "pbuilder, pbuilder-dist, and sbuild"
6. Can you add a changelog entry?

Revision history for this message
Julian Taylor (jtaylor) wrote :

4. done
5. I don't think you should place a comma in front of an 'and'
6. done

Revision history for this message
Benjamin Drung (bdrung) wrote :

5. My English teacher said, that both variants are used, but using a comma in front of an 'and' makes it clearer.

Revision history for this message
Julian Taylor (jtaylor) wrote :

well its disputed: http://en.wikipedia.org/wiki/Serial_comma

its probably better to reformat the message instead, e.g:
>sponsor-patch: Error: Unsupported builder specified: gsgs.
>sponsor-patch: Error: Supported builders: cowbuilder, cowbuilder-dist, pbuilder, pbuilder-dist, sbuild

maybe also get rid of the long if clause in get_builder too?
e.g. like this:

    supported = {
      "cowbuilder": lambda: Pbuilder("cowbuilder"),
      "cowbuilder-dist": lambda: Pbuilderdist("cowbuilderdist"),
      "pbuilder": lambda: Pbuilder(),
      "pbuilder-dist": lambda: Pbuilderdist(),
      "sbuild": lambda: Sbuild()
    }
    if builder in supported:
      return supported[builder]()

    Logger.error("Unsupported builder specified: %s." % builder)
    Logger.error("Supported builders: %s" % ", ".join(sorted(supported.keys())))

Revision history for this message
Stefano Rivera (stefanor) wrote :

Coming from a more British-english background, I've always been taught not to use it (although I sometimes choose to).

I also like the proposed dict + lambda approach.

Changed in ubuntu-dev-tools (Ubuntu):
assignee: nobody → Julian Taylor (jtaylor)
importance: Undecided → Wishlist
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-dev-tools - 0.120

---------------
ubuntu-dev-tools (0.120) unstable; urgency=low

  [ Felix Geyer ]
  * pull-lp-source.1: Document -d option.

  [ Stefano Rivera ]
  * ubuntutools.archive: Filter rmadison results. (LP: #710579)
    - Canonicalise suites (use code-names) before passing them to rmadison.
  * pull-{lp,debian}-source: Download requested versions, as well as simply
    the latest version in a release.
  * pull-{lp,debian}-source, pull-debian-debdiff: Catch KeyboardInterrupt.
    (LP: #713845)
  * pull-debian-source: Handle -p-u and -security suites.
  * Bump X-Python-Version to >= 2.6, now that python-launchpadlib no longer
    supports Python 2.5.

  [ Julian Taylor ]
  * add support for cowbuilder and cowbuilder-dist in builder.py
    - allows use in sponsor-patch and backportpackage (LP: #728751)

  [ Benjamin Drung ]
  * data/ubuntu.csv: Add Oneiric Ocelot to the list of know releases.
  * ubuntutools.distro_info: Fix TypeError crash and add a test case to
    catch regressions (LP: #731398).
 -- Stefano Rivera <email address hidden> Sat, 12 Mar 2011 22:07:47 +0200

Changed in ubuntu-dev-tools (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.