view test/test_debian.py @ 171:c0ea6cbb0fd2

Add "--debbuildopts -b" to "pbuilder build" command line to stop pbuilder from creating a source package. The .changes would otherwise contain references to that new source package instead of the one we passed to pbuilder. The checksums for the two source packages would be different so the .changes file would not match the source package that treepkg produces.
author Bernhard Herzog <bh@intevation.de>
date Mon, 23 Jun 2008 16:12:01 +0000
parents e83e96ef12b1
children e1c7cd896310
line wrap: on
line source
# Copyright (C) 2008 by Intevation GmbH
# Authors:
# Bernhard Herzog <bh@intevation.de>
#
# This program is free software under the GPL (>=v2)
# Read the file COPYING coming with the software for details.

"""Tests for treepkg.debian"""

import unittest

from filesupport import FileTestMixin

from treepkg.debian import DebianControlFile


class TestDebianControlFile(unittest.TestCase, FileTestMixin):

    control_contents = """\
Source: libksba
Section: libs
Priority: optional
Maintainer: Kolab-Konsortium Packager <packaging@kolab-konsortium.de>
Uploaders: Removed for the test
Build-Depends: debhelper (>= 4.2), libgpg-error-dev (>= 1.2), bison, autotools-dev, cdbs
Standards-Version: 3.7.2

Package: libksba-dev
Section: libdevel
Architecture: any
Depends: libksba8 (>= ${Source-Version})
Replaces: libksba0
Description: Test description
 Some more text.
 .
 Development library files.

Package: libksba8
Section: libs
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Test description
 Some more text.
 .
 Runtime library files.
"""

    def test(self):
        filename = self.create_temp_file(self.id() + "-control",
                                         self.control_contents)
        parsed = DebianControlFile(filename)
        self.assertEquals(parsed.packages,
                          [('libksba-dev', 'any'), ('libksba8', 'any')])
        self.assertEquals(parsed.build_depends,
                          ['debhelper', 'libgpg-error-dev', 'bison',
                           'autotools-dev', 'cdbs'])
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)