Tags: patch

Daniel Dehennin <daniel.dehen...@baby-gnu.org> writes:

Hello,

> A new test show me that my patch fails at sign time since
> “/«CHROOT»/«BUILDDIR»/” does not exist anymore.
>
> What do you thing if I remake the patch to pass an argument to
> “get_changes()” to handle where to look for the changes file?
>
> By default, it will look at “/«CHROOT»/«BUILDDIR»/”, but an argument can
> set the path:
>
> - “$self->get_changes()” -> 
> “/«CHROOT»/«BUILDDIR»/Package_SVersion_all.changes”
> - “$self->get_changes("./")” -> “./Package_SVersion_all.changes”

My new patch[1] is available, I include the patch here for review

Regards.

The following changes since commit d299f7eee5f7ea908e0b37ac44886be0aa33ca36:

  debian: Fix changelog for release (2012-08-18 13:49:18 +0100)

are available in the git repository at:

  git://git.baby-gnu.net/sbuild.git 
tags/dad/wrong-path-to-arch-independent-changes-file

for you to fetch changes up to ed5a23594206381a44bfe2240d40b604e6ebe6ae:

  Wrong path to arch independant changes file (2012-09-02 22:21:06 +0200)

----------------------------------------------------------------
Fix arch independant changes file path

----------------------------------------------------------------
Daniel Dehennin (1):
      Wrong path to arch independant changes file

 lib/Sbuild/Build.pm |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)


From ed5a23594206381a44bfe2240d40b604e6ebe6ae Mon Sep 17 00:00:00 2001
From: Daniel Dehennin <daniel.dehen...@baby-gnu.org>
Date: Sun, 2 Sep 2012 22:21:06 +0200
Subject: [PATCH] Wrong path to arch independant changes file
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* lib/Sbuild/Build.pm (get_changes): Use first argument as base path to
  look for changes file.
  Remove duplicated “$self->get('Package_SVersion')”.
  (close_build_log): Get changes file in current directory since build
  directory does not exist anymore.
---
 lib/Sbuild/Build.pm |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/Sbuild/Build.pm b/lib/Sbuild/Build.pm
index 16f77d5..96837ae 100644
--- a/lib/Sbuild/Build.pm
+++ b/lib/Sbuild/Build.pm
@@ -1741,10 +1741,11 @@ sub get_env ($$) {
 
 sub get_changes {
     my $self=shift;
+    my $path=$_[0] || $self->get('Chroot Build Dir');
     my $changes;
 
     if ( (grep {$_ eq "-A"} 
@{$self->get_conf('DPKG_BUILDPACKAGE_USER_OPTIONS')})
-        && -r $self->get('Chroot Build Dir') . '/' . 
$self->get('Package_SVersion') . $self->get('Package_SVersion') . 
"_all.changes") {
+        && -r $path . '/' . $self->get('Package_SVersion') . "_all.changes") {
        $changes = $self->get('Package_SVersion') . "_all.changes";
     }
     else {
@@ -2217,7 +2218,7 @@ sub close_build_log {
            my $key_id = $self->get_conf('KEY_ID');
            my $changes;
            $self->log(sprintf("Signature with key '%s' requested:\n", 
$key_id));
-           $changes = $self->get_changes();
+           $changes = $self->get_changes('.');
            system "debsign", "-k$key_id", $changes;
        }
     }
-- 
1.7.10.4


Footnotes: 
[1]  
http://git.baby-gnu.net/gitweb/?p=sbuild.git;a=commit;h=ed5a23594206381a44bfe2240d40b604e6ebe6ae

-- 
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x7A6FE2DF

Attachment: pgpM5eovLuUo8.pgp
Description: PGP signature

Reply via email to