Debian Bug report logs - #669250
xdeb: Add support to the option --stage1 to consider the Build_Depends-Stage1 instead of Build-Depends

version graph

Package: xdeb; Maintainer for xdeb is Wookey <wookey@debian.org>; Source for xdeb is src:xdeb.

Reported by: Gustavo Prado Alkmim <alkmim@ic.unicamp.br>

Date: Wed, 18 Apr 2012 13:24:01 UTC

Severity: wishlist

Found in version xdeb/0.6.5

Fixed in version xdeb/0.6.6

Done: Colin Watson <cjwatson@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, alkmim@ic.unicamp.br, Wookey <wookey@debian.org>:
Bug#669250; Package xdeb. (Wed, 18 Apr 2012 13:24:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Gustavo Prado Alkmim <alkmim@ic.unicamp.br>:
New Bug report received and forwarded. Copy sent to alkmim@ic.unicamp.br, Wookey <wookey@debian.org>. (Wed, 18 Apr 2012 13:24:05 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Gustavo Prado Alkmim <alkmim@ic.unicamp.br>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: xdeb: Add support to the option --stage1 to consider the Build_Depends-Stage1 instead of Build-Depends
Date: Wed, 18 Apr 2012 13:19:55 +0000
[Message part 1 (text/plain, inline)]
Package: xdeb
Version: 0.6.5
Severity: wishlist

Dear Maintainer,

Attached is a patch to add support to --stage1 option, which considers the Build-Depends-Stage1 field of control file instead of Build-Depends.

This addition enables the use of xdeb while working with staged build. 

Please, see [1] for more informations about bootstrap in debian.

This is my second bugreport. Sorry for any mistakes.

[1] http://wiki.debian.org/DebianBootstrap

Cheers, 

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=pt_BR.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages xdeb depends on:
ii  apt-utils        0.8.15.10
ii  build-essential  11.5
ii  devscripts       2.11.6
ii  dpkg-cross       2.6.6
ii  dpkg-dev         1.16.2
ii  lintian          2.5.6
ii  python           2.7.2-10
ii  python-apt       0.8.3+nmu1
ii  python-debian    0.1.21
ii  sudo             1.8.3p2-1
ii  wget             1.13.4-2

Versions of packages xdeb recommends:
ii  fakeroot  1.18.2-1
ii  gcc       4:4.6.3-4

xdeb suggests no packages.

-- no debconf information
[xdeb-0.6.5_stage1.patch (text/x-diff, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Wookey <wookey@debian.org>:
Bug#669250; Package xdeb. (Wed, 23 May 2012 09:00:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Colin Watson <cjwatson@debian.org>:
Extra info received and forwarded to list. Copy sent to Wookey <wookey@debian.org>. (Wed, 23 May 2012 09:00:04 GMT) Full text and rfc822 format available.

Message #10 received at 669250@bugs.debian.org (full text, mbox):

From: Colin Watson <cjwatson@debian.org>
To: Gustavo Prado Alkmim <alkmim@ic.unicamp.br>, 669250@bugs.debian.org
Subject: Re: Bug#669250: xdeb: Add support to the option --stage1 to consider the Build_Depends-Stage1 instead of Build-Depends
Date: Wed, 23 May 2012 09:57:18 +0100
On Wed, Apr 18, 2012 at 01:19:55PM +0000, Gustavo Prado Alkmim wrote:
> Attached is a patch to add support to --stage1 option, which considers
> the Build-Depends-Stage1 field of control file instead of
> Build-Depends.

Thanks for your patch!

> diff -Nur xdeb-0.6.5.orig/xdeb.py xdeb-0.6.5/xdeb.py
> --- xdeb-0.6.5.orig/xdeb.py	2011-09-30 09:25:31.000000000 +0000
> +++ xdeb-0.6.5/xdeb.py	2012-04-18 12:22:04.366809385 +0000
> @@ -301,7 +301,12 @@
>          # that we can native-import them, but we don't want to go further
>          # down transitive build-dependencies.
>          if not options.only_explicit or not builddep_depth:
> -            builddeps = src_record.relations['build-depends']
> +            if options.stage1:
> +                builddeps = src_record.relations['build-depends-stage1']
> +                if builddeps == []:

Prefer 'if not builddeps:'.

> @@ -631,9 +642,20 @@
>      print "===== Building %s_%s =====" % (src, ver)
>      print
>  
> -    utils.spawn(['dpkg-checkbuilddeps'], cwd=srcdir)
> +    if options.stage1:
> +        utils.spawn(['dpkg-checkbuilddeps', '--stage=1'], cwd=srcdir)
> +    else:
> +        utils.spawn(['dpkg-checkbuilddeps'], cwd=srcdir)

Better to reduce repetition:

    checkbuilddeps = ['dpkg-checkbuilddeps']
    if options.stage1:
        checkbuilddeps.append('--stage=1')
    utils.spawn(checkbuilddeps, cwd=srcdir)

>      buildpackage = ['debuild', '--no-lintian', '-eUSER']
> +
> +    if 'DEB_BUILD_OPTIONS' in os.environ:
> +        build_options = '%s' % os.environ['DEB_BUILD_OPTIONS']
> +    else:
> +        build_options = '"'

The handling of DEB_BUILD_OPTIONS here isn't quite right.  No shell is
involved in executing debuild, so it's incorrect to use ""-style
quoting; the quotes will actually end up directly in the environment
variable if you do that.  I went for this approach instead:

    build_options = []
    if options.stage1:
        build_options.append('stage=1')

    ...

    if options.architecture != build_arch:
        ...
        build_options.append('nocheck')

    ...

    if build_options:
        if 'DEB_BUILD_OPTIONS' in os.environ:
            build_options_arg = '%s %s' % (
                os.environ['DEB_BUILD_OPTIONS'], ' '.join(build_options))
        else:
            build_options_arg = ' '.join(build_options)
        buildpackage.append('-eDEB_BUILD_OPTIONS=%s' % build_options_arg)

This is still a bit more repetitive than I'd like, but it should work
well enough.

Otherwise this looks good and I've applied it for my next upload.

-- 
Colin Watson                                       [cjwatson@debian.org]




Reply sent to Colin Watson <cjwatson@debian.org>:
You have taken responsibility. (Wed, 23 May 2012 10:21:29 GMT) Full text and rfc822 format available.

Notification sent to Gustavo Prado Alkmim <alkmim@ic.unicamp.br>:
Bug acknowledged by developer. (Wed, 23 May 2012 10:21:34 GMT) Full text and rfc822 format available.

Message #15 received at 669250-close@bugs.debian.org (full text, mbox):

From: Colin Watson <cjwatson@debian.org>
To: 669250-close@bugs.debian.org
Subject: Bug#669250: fixed in xdeb 0.6.6
Date: Wed, 23 May 2012 10:19:18 +0000
Source: xdeb
Source-Version: 0.6.6

We believe that the bug you reported is fixed in the latest version of
xdeb, which is due to be installed in the Debian FTP archive:

xdeb_0.6.6.dsc
  to main/x/xdeb/xdeb_0.6.6.dsc
xdeb_0.6.6.tar.gz
  to main/x/xdeb/xdeb_0.6.6.tar.gz
xdeb_0.6.6_all.deb
  to main/x/xdeb/xdeb_0.6.6_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 669250@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Colin Watson <cjwatson@debian.org> (supplier of updated xdeb package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Wed, 23 May 2012 11:03:18 +0100
Source: xdeb
Binary: xdeb
Architecture: source all
Version: 0.6.6
Distribution: unstable
Urgency: low
Maintainer: Wookey <wookey@debian.org>
Changed-By: Colin Watson <cjwatson@debian.org>
Description: 
 xdeb       - Cross-build tool for Debian packages
Closes: 669250
Changes: 
 xdeb (0.6.6) unstable; urgency=low
 .
   [ Loïc Minier ]
   * Add an initial testsuite.
 .
   [ Colin Watson ]
   * Fix typography of --generate-graph help text.
   * Don't fail if /etc/apt/sources.list (or whatever Dir::Etc::sourcelist
     points to) doesn't exist.
   * Use Python 3-style print functions.
   * Require Python >= 2.6.
   * Use "except Exception as e" syntax rather than the old-style "except
     Exception, e".
   * Use "raise Exception(value)" syntax rather than the old-style "raise
     Exception, value".
   * Make GraphCycleError a subclass of Exception rather than of
     StandardError; StandardError was removed in Python 3.
   * Run the test suite on build.
   * Build-depend on python-debian and python-apt for the test suite.
   * Bump python build-dependency to (>= 2.7) for unittest discovery.
 .
   [ Gustavo Alkmim ]
   * Add support for --stage1 option, which considers the
     Build-Depends-Stage1 field of control file instead of Build-Depends;
     using this option requires patched dpkg-dev with support for
     'dpkg-checkbuilddeps --stage=1' (closes: #669250).
Checksums-Sha1: 
 148f784089de39b160a218123b91c2d248aee477 1612 xdeb_0.6.6.dsc
 bb819fbd1ddc03aea91249fedb2f56afe8a67762 50814 xdeb_0.6.6.tar.gz
 ebe3ccd11952437c6b2d19fbe2462aea6867f538 39136 xdeb_0.6.6_all.deb
Checksums-Sha256: 
 032822c6744f45fd324899571f5ebf6d3257a5cde3a739434bf3a4914f76dd1c 1612 xdeb_0.6.6.dsc
 ab6578d372598eab71c1d69a31f24b1434f935be9a7e310dd93008fbce7a04ea 50814 xdeb_0.6.6.tar.gz
 1c9e56b3e2a4f7a8c03804ae72567230d38542fd53a81a67ca6c4b9438526332 39136 xdeb_0.6.6_all.deb
Files: 
 c98989d89f7714268408a2e50df9de6c 1612 devel optional xdeb_0.6.6.dsc
 064477f21b708d158a89532d79fbcecc 50814 devel optional xdeb_0.6.6.tar.gz
 be0fc9c796181b0c2f40d2b364daea1d 39136 devel optional xdeb_0.6.6_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Colin Watson <cjwatson@debian.org> -- Debian developer

iQIVAwUBT7y3Mzk1h9l9hlALAQigIg//WBSQiZXly7k/OJT+kzwtO5gEnrwuw1Ec
9ZkPWlW9ZzLiW8XsQmKrw+3qhmvHhRaAxdrIy7fKb8V0HB+bB7BNEANrpsNa5LnY
T90YotLYANOVJ6obsj+j7oHFB+P/U0T+B9sKDcnMl5xfZN2s7Y7pSHeLkEIm2EmW
nH9TfDcNm8sew0dBVG8RNF2kFNtlpbimOxkDw/Hn1B9EMUfCC/DP/KYCHJcZ/xPe
UF2ktmGMiH32H7yoqT/aQnoyr2ovxmZlOw7KhukG2zrqhSNZ39ZrsGn0ebBVV+z5
7iHwy+Kn70A3iCJ+E4nN/wkrxa/GFwSbZh2W9bvBFQRBpd3h/x2pKnOKvrqhWeDJ
DXLiwjYFEWQAWSN+9G2X3qGdvMEVy2NWGEUd0BWZeUVoNau6pIUjucbPTM//ZmDZ
tHeOKBM40JLZr07M4KLDh3btG3GXncIoTDN22GPzLaY7P8bQ6YhMM8/ObQHBwT7U
7PR/snO5ARNzLmjDK8+aVJSL0HpXI1620tdL1AJNez4F+phOqd6ydKf3mRxvDumQ
tQoG4UYlMV6GcBq89uUt36h+UF3Fs2g9zfEi15iUTSEaqR/7vNuEXXcDdnJVJ57y
iPqdR4hH6JkH3zhRzSgZDD7fj6Bo2jMt09bdeNYA1sV8ttA4eDG5qdb+Jqt3obed
OTcgH8/tuf4=
=Cb4o
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 01 Jul 2012 07:44:18 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 19 15:32:37 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.