[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Freeze exception for dpkg 1.14.18



Hi,

On Sat, 26 Apr 2008, Andreas Barth wrote:
> > I'm sorry, I do care about the goal of the freeze: "release a top quality
> > distribution in the planned timeframe".
> 
> Then stop working against that.

I'm not working against that.

> > You should also consider that while dpkg is a key piece of our
> > infrastructure, it's also maintained by very active people in the project
> > itself and that we know what we are doing.
> 
> Ah, you mean like adding LDFLAGS in a way that violates the C-standard
> and breaks a couple of packages? Or also the new CFLAGS which brought us
> enough new RC bugs and where even Joey Hess complained about and you
> miscited the release team in http://bugs.debian.org/476138 (we didn't
> say "please break Debian with that now", but we just didn't want to argue
> about that too). Frankly speaking, I don't think that you always know
> what you're doing.

Andreas, you were supposed to be in contact with Frank on this precise
subject before dpkg got uploaded to sid. Since I saw nothing coming from
the release team, I posted to the -release list to know how to go forward
with that precise change:
http://lists.debian.org/debian-release/2008/03/msg00324.html

That was the 28th of March. The dpkg upload to sid happened the 9th of
April and since nobody else from the release team except Pierre Habouzit
responded, I took his answer as an official answer from the team.

Either you stand behind Pierre's decision as member of the release team
or you should have used your RM super-powers to respond in the thread
and provide another point of view. Now it's too late for this and I don't
want that your forthcoming decisions are based on something where you
share a substantial part of the blame.

(Yes, I did not care much about that precise feature of dpkg-buildpackage
and I would have happily reverted it if you had decided so)

> I would really wish that you stop your way of "Raphael Hertzog is always
> right", and starting working together with other people. Which includes
> the release team as well as other team. And care about their opinions.

I do, otherwise I wouldn't be discussing things with you here...

> If you think the release team is wrong, then please try to convince us.

I did argument my point. I didn't ask for random new features, I asked
only for:
- some bugfixes (example: #476113)
  (we can work with a RM/RA to see if a given bugfix is ok)
- regressions (example: #477784)
- changes to the code that is not used in lenny (new source package
  format, I see HE acknowledged that part -- thanks)
- and one particular design change in the way dpkg-source
  interprets the Format: field because otherwise we'll be stuck
  forever with something that I don't like much
  (see patch attached for the details)

> Or if you think that the wrong people are on the release team - feel
> free to start an GR to replace us (or convince the DPL). 

I don't have any problem with the persons, on the contrary, I like
the fact that we have determined people in the release team (we need it to
release on time). I just don't want that you use your authority in a
dogmatic way. Your are smart people, the freeze is not an end in itself,
it's a tool to help achieve a goal. Take decisions based on the goal that
you pursue.

> > In some ways, it seems unfair
> > to have similar freeze criteria for external software just packaged by
> > Debian and software developed by Debian where we have absolute control
> > over it (and where we know what we're doing with it).
> 
> It seems to me you don't understand how a release works. We absolutly
> need to reduce the amount of changes flowing into testing, to stabilize
> testing and to get it stable. Any code part of the build environment of
> many packages (like compilers or dpkg) needs to stop changing especially
> early, as any behaviour change there can affect all packages and give us
> subtle and hard to detect problems. There is no difference in that
> aspect between dpkg and gcc, only that dpkg affects way more packages.

I know this and I fully respect the logic behind it. That's why I had
a targetted list of changes... i have never been asking the right to
continue pushing new features and other important changes. [1]

On Sat, 26 Apr 2008, Mike Hommey wrote:
> If you know so much what you are doing, and are so active, why did you wait 
> right before base freeze to upload disruptive changes to the very base of
> our infrastructure ?

I would have liked to upload all this sooner, but Guillem absolutely
wanted to merge the triggers in dpkg 1.14.17 and with the hijack story,
it delayed the whole for several weeks. 

Cheers,
-- 
Raphaël Hertzog

Le best-seller français mis à jour pour Debian Etch :
http://www.ouaza.com/livre/admin-debian/
commit dee9240fef70ee473417ce5051e8e78ddb144e5b
Author: Raphael Hertzog <hertzog@debian.org>
Date:   Fri Apr 25 21:35:19 2008 +0200

    dpkg-source: change the logic to find the object used to unpack/build
    
    * scripts/Dpkg/Source/Package.pm (upgrade_object_type): Instead
    of using the full Format: version to deduce the perl object name
    use only the major part of the version. The minor part is under
    control of the corresponding object, that way they can evolve
    and indicate that the source package has changed in a backwards
    compatible way. See
    http://lists.debian.org/debian-dpkg/2008/04/msg00045.html
    Also add a new parameter to disable update of the minor version in
    the Format field.
    (initialize): Don't let the Format field be updated by
    upgrade_object_type() as this function only loads information from
    the .dsc into the object.
    * scripts/Dpkg/Source/Package/**: Rename V1_0.pm into V1.pm,
    V2_0.pm into V2.pm and V3_0/ into V3/. Fix perl package names
    accordingly. Integrated a $CURRENT_MINOR_VERSION set to "0"
    in all packages.
    * scripts/Makefile.am, scripts/po/POTFILES.in: Update the lists
    according to above file renames.

diff --git a/ChangeLog b/ChangeLog
index 7bf5326..502883a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2008-04-26  Raphael Hertzog  <hertzog@debian.org>
+
+	* scripts/Dpkg/Source/Package.pm (upgrade_object_type): Instead
+	of using the full Format: version to deduce the perl object name
+	use only the major part of the version. The minor part is under
+	control of the corresponding object, that way they can evolve
+	and indicate that the source package has changed in a backwards
+	compatible way. See
+	http://lists.debian.org/debian-dpkg/2008/04/msg00045.html
+	Also add a new parameter to disable update of the minor version in
+	the Format field.
+	(initialize): Don't let the Format field be updated by
+	upgrade_object_type() as this function only loads information from
+	the .dsc into the object.
+	* scripts/Dpkg/Source/Package/**: Rename V1_0.pm into V1.pm,
+	V2_0.pm into V2.pm and V3_0/ into V3/. Fix perl package names
+	accordingly. Integrated a $CURRENT_MINOR_VERSION set to "0"
+	in all packages.
+	* scripts/Makefile.am, scripts/po/POTFILES.in: Update the lists
+	according to above file renames.
+
 2008-04-25  Raphael Hertzog  <hertzog@debian.org>
 
 	* scripts/Dpkg/Source/Package/V3_0/quilt.pm: Parse correctly
diff --git a/debian/changelog b/debian/changelog
index bda2b23..9bf374e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -27,6 +27,11 @@ dpkg (1.14.19) UNRELEASED; urgency=low
     in a single Conflicts: dpkg-dev (<< 1.14.16).
   * The "3.0 (quilt)" source package format now parses correctly series files
     with patch options and warn if something else than -p1 is used.
+  * Change the way dpkg-source finds the perl object to use to unpack/build
+    a source package to ignore the minor part of the Format: version.
+    For example "1.0" and "1.1" would both map to Dpkg::Source::Package::V1
+    instead of ::V1_0 and ::V1_1 before. Similarly "3.0 (quilt)" now maps to
+    ::V3::quilt instead of ::V3_0::quilt.
   
   [ Helge Kreutzmann ]
   * Minor fixes and clarifications to man pages.
diff --git a/scripts/Dpkg/Source/Package.pm b/scripts/Dpkg/Source/Package.pm
index ed87a66..f086e85 100644
--- a/scripts/Dpkg/Source/Package.pm
+++ b/scripts/Dpkg/Source/Package.pm
@@ -150,19 +150,25 @@ sub initialize {
 
     $self->parse_files();
 
-    $self->upgrade_object_type();
+    $self->upgrade_object_type(0);
 }
 
 sub upgrade_object_type {
-    my ($self) = @_;
+    my ($self, $update_format) = @_;
+    $update_format = 1 unless defined $update_format;
     my $format = $self->{'fields'}{'Format'};
 
     if ($format =~ /^([\d\.]+)(?:\s+\((.*)\))?$/) {
-        my ($version, $variant) = ($1, $2);
-        $version =~ s/\./_/;
-        my $module = "Dpkg::Source::Package::V$version";
+        my ($version, $variant, $major, $minor) = ($1, $2, $1, undef);
+        $major =~ s/\.[\d\.]+$//;
+        my $module = "Dpkg::Source::Package::V$major";
         $module .= "::$variant" if defined $variant;
-        eval "require $module";
+        eval "require $module; \$minor = \$${module}::CURRENT_MINOR_VERSION;";
+        $minor = 0 unless defined $minor;
+        if ($update_format) {
+            $self->{'fields'}{'Format'} = "$major.$minor";
+            $self->{'fields'}{'Format'} .= " ($variant)" if defined $variant;
+        }
         if ($@) {
 	    error(_g("source package format `%s' is not supported (Perl module %s is required)"), $format, $module);
         }
diff --git a/scripts/Dpkg/Source/Package/V1_0.pm b/scripts/Dpkg/Source/Package/V1.pm
similarity index 97%
rename from scripts/Dpkg/Source/Package/V1_0.pm
rename to scripts/Dpkg/Source/Package/V1.pm
index 5ec2c2e..00fccf6 100644
--- a/scripts/Dpkg/Source/Package/V1_0.pm
+++ b/scripts/Dpkg/Source/Package/V1.pm
@@ -14,7 +14,7 @@
 # with this program; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-package Dpkg::Source::Package::V1_0;
+package Dpkg::Source::Package::V1;
 
 use strict;
 use warnings;
@@ -30,13 +30,15 @@ use Dpkg::Source::Patch;
 use Dpkg::Version qw(check_version);
 use Dpkg::Exit;
 use Dpkg::Source::Functions qw(erasedir);
-use Dpkg::Source::Package::V3_0::native;
+use Dpkg::Source::Package::V3::native;
 
 use POSIX;
 use File::Basename;
 use File::Temp qw(tempfile);
 use File::Spec;
 
+our $CURRENT_MINOR_VERSION = "0";
+
 sub init_options {
     my ($self) = @_;
     # Don't call $self->SUPER::init_options() on purpose, V1.0 has no
@@ -92,11 +94,11 @@ sub do_extract {
     my $native = $difffile ? 0 : 1;
     if ($native and ($tarfile =~ /\.orig\.tar\.gz$/)) {
         warning(_g("native package with .orig.tar"));
-        $native = 0; # V3_0::native doesn't handle orig.tar
+        $native = 0; # V3::native doesn't handle orig.tar
     }
 
     if ($native) {
-        Dpkg::Source::Package::V3_0::native::do_extract($self, $newdirectory);
+        Dpkg::Source::Package::V3::native::do_extract($self, $newdirectory);
     } else {
         my $expectprefix = $newdirectory;
         $expectprefix .= '.orig';
@@ -268,7 +270,7 @@ sub do_build {
 
     if ($sourcestyle eq "n") {
         $self->{'options'}{'ARGV'} = []; # ensure we have no error
-        Dpkg::Source::Package::V3_0::native::do_build($self, $dir);
+        Dpkg::Source::Package::V3::native::do_build($self, $dir);
     } elsif ($sourcestyle =~ m/[nurUR]/) {
         if (stat($tarname)) {
             unless ($sourcestyle =~ m/[nUR]/) {
diff --git a/scripts/Dpkg/Source/Package/V2_0.pm b/scripts/Dpkg/Source/Package/V2.pm
similarity index 99%
rename from scripts/Dpkg/Source/Package/V2_0.pm
rename to scripts/Dpkg/Source/Package/V2.pm
index baf78e0..f6b99da 100644
--- a/scripts/Dpkg/Source/Package/V2_0.pm
+++ b/scripts/Dpkg/Source/Package/V2.pm
@@ -14,7 +14,7 @@
 # with this program; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-package Dpkg::Source::Package::V2_0;
+package Dpkg::Source::Package::V2;
 
 use strict;
 use warnings;
@@ -38,6 +38,8 @@ use File::Path;
 use File::Spec;
 use File::Find;
 
+our $CURRENT_MINOR_VERSION = "0";
+
 sub init_options {
     my ($self) = @_;
     $self->SUPER::init_options();
diff --git a/scripts/Dpkg/Source/Package/V3_0/bzr.pm b/scripts/Dpkg/Source/Package/V3/bzr.pm
similarity index 98%
rename from scripts/Dpkg/Source/Package/V3_0/bzr.pm
rename to scripts/Dpkg/Source/Package/V3/bzr.pm
index 617678c..47ebe09 100644
--- a/scripts/Dpkg/Source/Package/V3_0/bzr.pm
+++ b/scripts/Dpkg/Source/Package/V3/bzr.pm
@@ -20,7 +20,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-package Dpkg::Source::Package::V3_0::bzr;
+package Dpkg::Source::Package::V3::bzr;
 
 use strict;
 use warnings;
@@ -41,6 +41,8 @@ use Dpkg::Source::Archive;
 use Dpkg::Exit;
 use Dpkg::Source::Functions qw(erasedir);
 
+our $CURRENT_MINOR_VERSION = "0";
+
 sub import {
     foreach my $dir (split(/:/, $ENV{PATH})) {
         if (-x "$dir/bzr") {
diff --git a/scripts/Dpkg/Source/Package/V3_0/custom.pm b/scripts/Dpkg/Source/Package/V3/custom.pm
similarity index 95%
rename from scripts/Dpkg/Source/Package/V3_0/custom.pm
rename to scripts/Dpkg/Source/Package/V3/custom.pm
index 74152f6..8ad92cf 100644
--- a/scripts/Dpkg/Source/Package/V3_0/custom.pm
+++ b/scripts/Dpkg/Source/Package/V3/custom.pm
@@ -14,7 +14,7 @@
 # with this program; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-package Dpkg::Source::Package::V3_0::custom;
+package Dpkg::Source::Package::V3::custom;
 
 use strict;
 use warnings;
@@ -25,6 +25,8 @@ use Dpkg;
 use Dpkg::Gettext;
 use Dpkg::ErrorHandling qw(error);
 
+our $CURRENT_MINOR_VERSION = "0";
+
 sub parse_cmdline_option {
     my ($self, $opt) = @_;
     if ($opt =~ /^--target-format=(.*)$/) {
diff --git a/scripts/Dpkg/Source/Package/V3_0/git.pm b/scripts/Dpkg/Source/Package/V3/git.pm
similarity index 99%
rename from scripts/Dpkg/Source/Package/V3_0/git.pm
rename to scripts/Dpkg/Source/Package/V3/git.pm
index 8b134fc..b609849 100644
--- a/scripts/Dpkg/Source/Package/V3_0/git.pm
+++ b/scripts/Dpkg/Source/Package/V3/git.pm
@@ -18,7 +18,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-package Dpkg::Source::Package::V3_0::git;
+package Dpkg::Source::Package::V3::git;
 
 use strict;
 use warnings;
@@ -39,6 +39,8 @@ use Dpkg::Source::Archive;
 use Dpkg::Exit;
 use Dpkg::Source::Functions qw(erasedir);
 
+our $CURRENT_MINOR_VERSION = "0";
+
 # Remove variables from the environment that might cause git to do
 # something unexpected.
 delete $ENV{GIT_DIR};
diff --git a/scripts/Dpkg/Source/Package/V3_0/native.pm b/scripts/Dpkg/Source/Package/V3/native.pm
similarity index 97%
rename from scripts/Dpkg/Source/Package/V3_0/native.pm
rename to scripts/Dpkg/Source/Package/V3/native.pm
index 16c8a82..ea2afbb 100644
--- a/scripts/Dpkg/Source/Package/V3_0/native.pm
+++ b/scripts/Dpkg/Source/Package/V3/native.pm
@@ -14,7 +14,7 @@
 # with this program; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-package Dpkg::Source::Package::V3_0::native;
+package Dpkg::Source::Package::V3::native;
 
 use strict;
 use warnings;
@@ -32,6 +32,8 @@ use POSIX;
 use File::Basename;
 use File::Temp qw(tempfile);
 
+our $CURRENT_MINOR_VERSION = "0";
+
 sub do_extract {
     my ($self, $newdirectory) = @_;
     my $sourcestyle = $self->{'options'}{'sourcestyle'};
diff --git a/scripts/Dpkg/Source/Package/V3_0/quilt.pm b/scripts/Dpkg/Source/Package/V3/quilt.pm
similarity index 98%
rename from scripts/Dpkg/Source/Package/V3_0/quilt.pm
rename to scripts/Dpkg/Source/Package/V3/quilt.pm
index 270fe7d..e995e66 100644
--- a/scripts/Dpkg/Source/Package/V3_0/quilt.pm
+++ b/scripts/Dpkg/Source/Package/V3/quilt.pm
@@ -14,13 +14,13 @@
 # with this program; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-package Dpkg::Source::Package::V3_0::quilt;
+package Dpkg::Source::Package::V3::quilt;
 
 use strict;
 use warnings;
 
 # Based on wig&pen implementation
-use base 'Dpkg::Source::Package::V2_0';
+use base 'Dpkg::Source::Package::V2';
 
 use Dpkg;
 use Dpkg::Gettext;
@@ -32,6 +32,8 @@ use POSIX;
 use File::Basename;
 use File::Spec;
 
+our $CURRENT_MINOR_VERSION = "0";
+
 sub init_options {
     my ($self) = @_;
     $self->SUPER::init_options();
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 75c101f..a9e149e 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -112,13 +112,13 @@ nobase_dist_perllib_DATA = \
 	Dpkg/Source/Compressor.pm \
 	Dpkg/Source/Functions.pm \
 	Dpkg/Source/Package.pm \
-	Dpkg/Source/Package/V1_0.pm \
-	Dpkg/Source/Package/V2_0.pm \
-	Dpkg/Source/Package/V3_0/bzr.pm \
-	Dpkg/Source/Package/V3_0/custom.pm \
-	Dpkg/Source/Package/V3_0/native.pm \
-	Dpkg/Source/Package/V3_0/git.pm \
-	Dpkg/Source/Package/V3_0/quilt.pm \
+	Dpkg/Source/Package/V1.pm \
+	Dpkg/Source/Package/V2.pm \
+	Dpkg/Source/Package/V3/bzr.pm \
+	Dpkg/Source/Package/V3/custom.pm \
+	Dpkg/Source/Package/V3/native.pm \
+	Dpkg/Source/Package/V3/git.pm \
+	Dpkg/Source/Package/V3/quilt.pm \
 	Dpkg/Source/Patch.pm \
 	Dpkg.pm
 
diff --git a/scripts/po/POTFILES.in b/scripts/po/POTFILES.in
index 332b74c..1c0c66b 100644
--- a/scripts/po/POTFILES.in
+++ b/scripts/po/POTFILES.in
@@ -33,13 +33,13 @@ scripts/Dpkg/Source/Compressor.pm
 scripts/Dpkg/Source/Functions.pm
 scripts/Dpkg/Source/Patch.pm
 scripts/Dpkg/Source/Package.pm
-scripts/Dpkg/Source/Package/V1_0.pm
-scripts/Dpkg/Source/Package/V2_0.pm
-scripts/Dpkg/Source/Package/V3_0/bzr.pm
-scripts/Dpkg/Source/Package/V3_0/custom.pm
-scripts/Dpkg/Source/Package/V3_0/native.pm
-scripts/Dpkg/Source/Package/V3_0/git.pm
-scripts/Dpkg/Source/Package/V3_0/quilt.pm
+scripts/Dpkg/Source/Package/V1.pm
+scripts/Dpkg/Source/Package/V2.pm
+scripts/Dpkg/Source/Package/V3/bzr.pm
+scripts/Dpkg/Source/Package/V3/custom.pm
+scripts/Dpkg/Source/Package/V3/native.pm
+scripts/Dpkg/Source/Package/V3/git.pm
+scripts/Dpkg/Source/Package/V3/quilt.pm
 scripts/Dpkg/Substvars.pm
 scripts/Dpkg/Vars.pm
 scripts/Dpkg/Version.pm

Reply to: