~ubuntu-branches/ubuntu/utopic/sbuild/utopic

« back to all changes in this revision

Viewing changes to debian/patches/fix-rev-0.patch

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2013-01-17 08:59:27 UTC
  • mfrom: (3.3.25 sid)
  • Revision ID: package-import@ubuntu.com-20130117085927-3g1koxmvpvznedp2
Tags: 0.63.2-1.1ubuntu1
* Merge from Debian unstable. Remaining changes:
  - Convert package back to source format 3.0 (quilt) so the patches get
    applied.
  - debian/patches/do-not-install-debfoster-into-chroots.patch: do not
    install debfoster into the chroots because it is in universe and not
    needed for package building itself.
  - debian/patches/run-pre-build-hooks-as-root.patch: run pre-build hooks
    as root.
  - debian/patches/fix-rev-0.patch: convert inline change from 0.63.2-1.1
    into patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Fix building packages with revision "0"
 
2
Origin: inline change from 0.63.2-1.1, converted to patch
 
3
 
 
4
Index: sbuild-0.63.2/lib/Sbuild/Build.pm
 
5
===================================================================
 
6
--- sbuild-0.63.2.orig/lib/Sbuild/Build.pm      2013-01-17 08:56:58.000000000 -0500
 
7
+++ sbuild-0.63.2/lib/Sbuild/Build.pm   2013-01-17 08:58:44.008034659 -0500
 
8
@@ -177,16 +177,14 @@
 
9
     my ($pkg, $version) = split /_/, $pkgv;
 
10
     my $pver = Dpkg::Version->new($version, check => 1);
 
11
     return if (!defined($pkg) || !defined($version) || !defined($pver));
 
12
-    my ($o_version, $o_revision);
 
13
+    my ($o_version);
 
14
     $o_version = $pver->version();
 
15
-    $o_revision = $pver->revision();
 
16
-    $o_revision = "" if $pver->{'no_revision'};
 
17
 
 
18
     # Original version (no binNMU or other addition)
 
19
     my $oversion = $version;
 
20
     # Original version with stripped epoch
 
21
     my $osversion = $o_version;
 
22
-    $osversion .= '-' . $o_revision if $o_revision;
 
23
+    $osversion .= '-' . $pver->revision() unless $pver->{'no_revision'};
 
24
 
 
25
     # Add binNMU to version if needed.
 
26
     if ($self->get_conf('BIN_NMU') || $self->get_conf('APPEND_TO_VERSION')) {