~ubuntu-branches/debian/sid/bzr-builddeb/sid

« back to all changes in this revision

Viewing changes to properties.py

  • Committer: Package Import Robot
  • Author(s): Jelmer Vernooij, Jonathan Riddell, Jelmer Vernooij, Martin Packman
  • Date: 2011-12-16 19:58:57 UTC
  • Revision ID: package-import@ubuntu.com-20111216195857-pnkqsnkv0qlv2358
Tags: 2.8.0
[ Jonathan Riddell ]
* Add get-orig-source command which will get the upstream tar file.
  LP: #862188
* Change "bd-do" command to "builddeb-do" and alias "bd-do".
* Add commit-message-from-changelog option for those who do not
  want commit message set automatically

[ Jelmer Vernooij ]
* Support importing and building packages with multiple upstream
  tarballs. LP: #653757, LP: #664834
* Move .bzr-builddeb/default.conf to debian/bzr-builddeb.conf.
  LP: #793137
* Fix test suite on Lucid, where dpkg-mergechangelogs is not available.

[ Martin Packman ]
* Fix test_utf8_changelog when run with older versions of python-debian.

[ Jelmer Vernooij ]
* Support svn-buildpackage tag names to find upstream versions.
  LP: #874263
* Support --revision argument to merge-package. LP: #888590
* By default, don't override the commit message from debian/changelog
  unless 'commit-message-from-changelog' is explicitly set to True. LP: #812749
* Support running dep3-patch against remote repositories, and with
  open-ended revision ranges. LP: #893608
* Fix finding orig tarballs in directories also containing filenames
  with non-utf8 characters. LP: #865753
* bzr-builddeb now prefers the 'get-packaged-orig-source' rule to
  retrieve the packaged upstream source, and warns about
  'get-orig-source'. LP: #409862
* Support translations.

[ Martin Packman ]
* Deal with invalid versions and bad encoding in the changelog merge
  hook. LP: #893495

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#    properties.py -- Properties of a build
2
 
#    Copyright (C) 2006 James Westby <jw+debian@jameswestby.net>
3
 
#    
4
 
#    This file is part of bzr-builddeb.
5
 
#
6
 
#    bzr-builddeb is free software; you can redistribute it and/or modify
7
 
#    it under the terms of the GNU General Public License as published by
8
 
#    the Free Software Foundation; either version 2 of the License, or
9
 
#    (at your option) any later version.
10
 
#
11
 
#    bzr-builddeb is distributed in the hope that it will be useful,
12
 
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 
#    GNU General Public License for more details.
15
 
#
16
 
#    You should have received a copy of the GNU General Public License
17
 
#    along with bzr-builddeb; if not, write to the Free Software
18
 
#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
 
#
20
 
import os
21
 
 
22
 
class BuildProperties(object):
23
 
  """Properties of this specific build"""
24
 
 
25
 
  def __init__(self, changelog, build_dir, tarball_dir, top_level):
26
 
    self._changelog = changelog
27
 
    self._build_dir = build_dir
28
 
    self._tarball_dir = tarball_dir
29
 
    self._top_level = top_level
30
 
  
31
 
  def package(self):
32
 
    return self._changelog.package
33
 
 
34
 
  def upstream_version(self):
35
 
    return self._changelog.upstream_version
36
 
 
37
 
  def debian_version(self):
38
 
    return self._changelog.debian_version
39
 
 
40
 
  def full_version(self):
41
 
    return self._changelog.full_version
42
 
 
43
 
  def full_version_no_epoch(self):
44
 
    if self._changelog.debian_version is None:
45
 
        return self.upstream_version()
46
 
    return self.upstream_version() + "-" + self.debian_version()
47
 
 
48
 
  def build_dir(self):
49
 
    return self._build_dir
50
 
 
51
 
  def source_dir(self, relative=True):
52
 
    if relative:
53
 
      return os.path.join(self.build_dir(),
54
 
                        self.package()+"-"+self.upstream_version())
55
 
    else:
56
 
      return self.package()+"-"+self.upstream_version()
57
 
 
58
 
  def tarball_dir(self):
59
 
    return self._tarball_dir
60
 
 
61
 
  def top_level(self):
62
 
    return self._top_level
63
 
 
64
 
# vim: ts=2 sts=2 sw=2