[sponsor-patch] support cowbuilder and cowbuilder-dist

Bug #728751 reported by Julian Taylor on 2011-03-03
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-dev-tools (Ubuntu)
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.

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.

Julian Taylor (jtaylor) wrote :

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

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?

Julian Taylor (jtaylor) wrote :

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

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.

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())))

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
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  Edit
Everyone can see this information.

Other bug subscribers