From 4697a558d03c2119c03ba1ad93511e42ccb60176 Mon Sep 17 00:00:00 2001 From: joey Date: Fri, 15 Dec 2006 18:46:37 +0000 Subject: [PATCH] * When converting LSB packages, do not increment the release number. * Use rpmbuild to build lsb packages, not rpm. --- Alien/Package.pm | 15 +++++++++++++++ Alien/Package/Lsb.pm | 10 +++++++++- alien.pl | 7 ++++--- debian/changelog | 4 +++- 4 files changed, 31 insertions(+), 5 deletions(-) diff --git a/Alien/Package.pm b/Alien/Package.pm index 34e7289..093a9c1 100644 --- a/Alien/Package.pm +++ b/Alien/Package.pm @@ -306,6 +306,21 @@ the filename of the generated package. sub build {} +=item incrementrelease + +This method should increment the release field of the package by +the specified number. + +=cut + +sub incrementrelease { + my $this=shift; + my $number=shift; + $^W=0; # Shut of possible "is not numeric" warning. + $this->release($this->release + $number); + $^W=1; # Re-enable warnings. +} + =item DESTROY When an object is destroyed, it cleans some stuff up. In particular, if the diff --git a/Alien/Package/Lsb.pm b/Alien/Package/Lsb.pm index cc72e66..a214588 100644 --- a/Alien/Package/Lsb.pm +++ b/Alien/Package/Lsb.pm @@ -103,7 +103,7 @@ the package. sub build { my $this=shift; - my $buildcmd=shift || 'rpm'; + my $buildcmd=shift || 'rpmbuild'; foreach (split(/:/,$ENV{PATH})) { if (-x "$_/lsb-rpm") { $buildcmd='lsb-rpm'; @@ -113,6 +113,14 @@ sub build { $this->SUPER::build($buildcmd); } +=item incrementrelease + +LSB package versions are not changed. + +=cut + +sub incrementrelease {} + =back =head1 AUTHOR diff --git a/alien.pl b/alien.pl index 2d3b141..a04df2b 100755 --- a/alien.pl +++ b/alien.pl @@ -50,6 +50,9 @@ No guarantees are made that the generated lsb packages will be fully LSB compliant, and it's rather unlikely they will unless you build them in the lsbdev environment. +Note that unlike other package formats, converting an LSB package to +another format will not cause its minor version number to be changed. + =item deb For converting to (but not from) deb format, the gcc, make, debhelper, @@ -458,9 +461,7 @@ foreach my $file (@ARGV) { # Increment release. unless (defined $keepversion) { - $^W=0; # Shut of possible "is not numeric" warning. - $package->release($package->release + $versionbump); - $^W=1; # Re-enable warnings. + $package->incrementrelease($versionbump); } foreach my $format (keys %destformats) { diff --git a/debian/changelog b/debian/changelog index b52c6cb..27c2634 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,8 +3,10 @@ alien (8.65) UNRELEASED; urgency=low * Fix alien's own spec file, s/Copyright/License/. * Add support for rpm scripts that use RPM_INSTALL_PREFIX, by setting RPM_INSTALL_PREFIX as part of the converted script. Closes: #400863 + * When converting LSB packages, do not increment the release number. + * Use rpmbuild to build lsb packages, not rpm. - -- Joey Hess Fri, 15 Dec 2006 13:31:54 -0500 + -- Joey Hess Fri, 15 Dec 2006 13:44:22 -0500 alien (8.64) unstable; urgency=low