[Debpool-commits] [SCM] Debpool Project Repository branch, master, updated. debian/0.3.10-7-g2abb162
Andres Mejia
mcitadel at gmail.com
Fri Oct 24 18:42:09 UTC 2008
The following commit has been merged in the master branch:
commit 2abb162e05e56fb8326d85d7928694047d1a2d96
Author: Andres Mejia <mcitadel at gmail.com>
Date: Fri Oct 24 14:41:59 2008 -0400
More cleanup
diff --git a/bin/debpool b/bin/debpool
index cbc28ba..7f25e3b 100755
--- a/bin/debpool
+++ b/bin/debpool
@@ -66,7 +66,9 @@ if ($Options{'daemon'}) {
# sure that it will never be used.
if (! -d "$ENV{'HOME'}/.debpool") {
mkdir("$ENV{'HOME'}/.debpool") or
- Log_Message("Failed to create user configuration directory '$ENV{'HOME'}/.debpool'.", LOG_GENERAL, LOG_ERROR);
+ Log_Message(
+ "Failed to create user configuration directory '" .
+ $ENV{'HOME'} . "/.debpool'.", LOG_GENERAL, LOG_ERROR);
}
# Have support for multiple compression schemes in a dynamical fashion
@@ -153,7 +155,9 @@ if ($Options{'daemon'} && $Options{'use_inotify'}) {
# Fall back to normal monitoring if Inotify setup fails.
if (!Setup_Incoming_Watch()) {
$Options{'use_inotify'} = 0;
- Log_Message("Inotify setup failed. Falling back to normal monitoring.", LOG_GENERAL, LOG_WARNING);
+ Log_Message(
+ "Inotify setup failed. Falling back to normal monitoring.",
+ LOG_GENERAL, LOG_WARNING);
}
}
@@ -260,7 +264,8 @@ foreach my $changefile (@changefiles) {
# Now check the dscfile signature
- if ($with_source && !Check_Signature("$Options{'incoming_dir'}/$dscfile")) {
+ if ($with_source &&
+ !Check_Signature("$Options{'incoming_dir'}/$dscfile")) {
Reject_Package($changefile, $changes_data);
Log_Message("GPG signature failure in dsc file '$dscfile'",
LOG_REJECT, LOG_ERROR);
@@ -398,7 +403,8 @@ foreach my $changefile (@changefiles) {
foreach my $chg_arch (@chg_archs) {
unless ( grep /^\Q$chg_arch\E$/, @{$Options{'archs'}} ) {
Reject_Package($changefile, $changes_data);
- my($msg) = "The archive isn't configured for '$chg_arch' type packages.";
+ my $msg =
+ "The archive isn't configured for '$chg_arch' type packages.";
Log_Message($msg, LOG_REJECT, LOG_ERROR);
$rejected = 1;
last;
@@ -429,7 +435,8 @@ foreach my $changefile (@changefiles) {
next;
}
- my($allow) = Allow_Version($package, $version, $realdist, $changes_data->{'Architecture'});
+ my $allow = Allow_Version($package, $version, $realdist,
+ $changes_data->{'Architecture'});
if (!defined($allow)) {
Log_Message("Version check for $version failed: " .
diff --git a/debian/changelog b/debian/changelog
index 60b0cf7..9fef621 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,6 @@
debpool (0.4.0) experimental; urgency=low
- * Created a new module to handle file parsing (NOT YET COMPLETE).
+ * Created a new module to handle file parsing.
* Minor code cleanup.
* Add target in debian/rules to generate the MANIFEST file.
diff --git a/lib/DebPool/DB.pm b/lib/DebPool/DB.pm
index e7f2f6b..3d3c1f3 100644
--- a/lib/DebPool/DB.pm
+++ b/lib/DebPool/DB.pm
@@ -216,7 +216,8 @@ sub Set_Versions {
my (%entries, %archs);
my($oldversion, $oldbinlist, $archlist);
($oldversion, $oldbinlist, $archlist) =
- split(/\|/, $VersionDB{$dist}{$source}) if defined $VersionDB{$dist}{$source};
+ split(/\|/, $VersionDB{$dist}{$source}) if defined
+ $VersionDB{$dist}{$source};
if (defined($oldbinlist)) {
my(@oldbins) = split(/,/,$oldbinlist);
diff --git a/lib/DebPool/Dirs.pm b/lib/DebPool/Dirs.pm
index 8b1ba2f..c167479 100644
--- a/lib/DebPool/Dirs.pm
+++ b/lib/DebPool/Dirs.pm
@@ -122,7 +122,8 @@ sub Create_Tree {
return 0;
}
- if (!Tree_Mkdir($Options{'installed_dir'}, $Options{'installed_dir_mode'})) {
+ if (!Tree_Mkdir($Options{'installed_dir'},
+ $Options{'installed_dir_mode'})) {
return 0;
}
@@ -311,7 +312,9 @@ sub Setup_Incoming_Watch {
use DebPool::Logging qw(:functions :facility :level);
use DebPool::Config;
if (!eval{ require Linux::Inotify2; }) {
- Log_Message("liblinux-inotify2-perl is required to activate inotify support for debpool.", LOG_GENERAL, LOG_WARNING);
+ my $msg = "liblinux-inotify2-perl is required to activate inotify ";
+ $msg .= "support for debpool.";
+ Log_Message($msg, LOG_GENERAL, LOG_WARNING);
return 0;
} else {
use Linux::Inotify2;
@@ -391,7 +394,8 @@ sub Monitor_Incoming {
sleep($Options{'sleep'});
@stat = stat($Options{'incoming_dir'});
if (!@stat) {
- $Error = "Couldn't stat incoming_dir '$Options{'incoming_dir'}'";
+ $Error =
+ "Couldn't stat incoming_dir '$Options{'incoming_dir'}'";
return;
}
return if $DebPool::Signal::Signal_Caught;
diff --git a/lib/DebPool/GnuPG.pm b/lib/DebPool/GnuPG.pm
index 7296b63..f73e9e5 100644
--- a/lib/DebPool/GnuPG.pm
+++ b/lib/DebPool/GnuPG.pm
@@ -109,14 +109,16 @@ sub Check_Signature {
my($file, $signature) = @_;
my(@args) = ('--verify', '--no-default-keyring');
- push(@args, '--homedir', $Options{'gpg_home'}) if defined $Options{'gpg_home'};
+ push(@args, '--homedir', $Options{'gpg_home'}) if defined
+ $Options{'gpg_home'};
foreach my $keyring (@{$Options{'gpg_keyrings'}}) {
push(@args, '--keyring', $keyring);
}
- push(@args, '--'); # Always a good idea, even if we're pretty sure we won't
- # get any file names starting with "--" in this program.
+ # Always a good idea, even if we're pretty sure we won't get any file names
+ # starting with "--" in this program.
+ push(@args, '--');
if (defined($signature)) {
push(@args, $signature);
@@ -171,13 +173,18 @@ sub Sign_Release {
# We are go for main engine start
- my(@args) = ('--batch', '--no-tty', '--detach-sign', '--armor', '--output=-');
- push(@args, '--homedir', $Options{'gpg_home'}) if defined $Options{'gpg_home'};
- push(@args, '--default-key', $Options{'gpg_sign_key'}) if defined $Options{'gpg_sign_key'};
- push(@args, '--passphrase-fd=0', '--passphrase-file', $Options{'gpg_passfile'}) if defined $Options{'gpg_passfile'};
+ my(@args) =
+ ('--batch', '--no-tty', '--detach-sign', '--armor', '--output=-');
+ push(@args, '--homedir', $Options{'gpg_home'}) if defined
+ $Options{'gpg_home'};
+ push(@args, '--default-key', $Options{'gpg_sign_key'}) if defined
+ $Options{'gpg_sign_key'};
+ push(@args, '--passphrase-fd=0', '--passphrase-file',
+ $Options{'gpg_passfile'}) if defined $Options{'gpg_passfile'};
push(@args, '--', $release_file);
- my($gnupg_pid) = open3(*DUMMY, ">&".fileno $tmpfile, *GPG_ERR, $Options{'gpg_bin'}, @args);
+ my($gnupg_pid) = open3(*DUMMY, ">&".fileno $tmpfile, *GPG_ERR,
+ $Options{'gpg_bin'}, @args);
close DUMMY;
my @loglines = <GPG_ERR>;
waitpid($gnupg_pid, 0);
diff --git a/lib/DebPool/Packages.pm b/lib/DebPool/Packages.pm
index d0b092d..5616208 100644
--- a/lib/DebPool/Packages.pm
+++ b/lib/DebPool/Packages.pm
@@ -131,7 +131,8 @@ my @Relationship_Fields = (
### Meaningful functions
-# Allow_Version($package, $version, $distribution)
+# Allow_Version($package, $version, $distribution, $arch)
+# Parameter data types (string, string, string, array_ref)
#
# Decide, based on version comparison and config options, whether $version
# is an acceptable version for $package in $distribution. Returns 1 if the
@@ -161,7 +162,7 @@ sub Allow_Version {
if ($version eq $old_version) {
my (%count, @duplicate_arches);
my @old_archs = Get_Archs($distribution, $package);
- foreach (@old_archs, @$arch) {
+ foreach (@old_archs, @{$arch}) {
if (++$count{$_} > 1) {
push @duplicate_arches, $_;
}
@@ -256,7 +257,8 @@ sub Generate_List {
if (-e $target) {
if (!open($pkg_arch_fh, '<', "$target")) {
my $msg = "Skipping package entry for all packages from ";
- $msg .= "${source}: couldn't open '$target' for reading: $!";
+ $msg .=
+ "${source}: couldn't open '$target' for reading: $!";
Log_Message($msg, LOG_GENERAL, LOG_ERROR);
next;
@@ -375,7 +377,8 @@ sub Install_Package {
return;
}
- $target = "$pkg_dir/${pkg_name}_" . Strip_Epoch($pkg_ver) . "_$pkg_arch" . '.package';
+ $target = "$pkg_dir/${pkg_name}_" . Strip_Epoch($pkg_ver) .
+ "_$pkg_arch" . '.package';
if (!Move_File($pkg_file, $target, $Options{'pool_file_mode'})) {
$Error = "Failed to move '$pkg_file' to '$target': ";
@@ -577,7 +580,8 @@ sub Audit_Package {
$bin_package = $1;
$version = $2;
$src = 1;
- } elsif ($file =~ m/^([^_]+)_([^_]+)\.source$/) { # source metadata
+ } elsif ($file =~ m/^([^_]+)_([^_]+)\.source$/) {
+ # source metadata
$bin_package = $1;
$version = $2;
}
@@ -588,7 +592,8 @@ sub Audit_Package {
$version = $2;
$deb = 1;
} elsif ($file =~
- m/^([^_]+)_([^_]+)\Q_${arch}.\Epackage$/) { # package metadata
+ m/^([^_]+)_([^_]+)\Q_${arch}.\Epackage$/) {
+ # package metadata
$bin_package = $1;
$version = $2;
}
@@ -821,7 +826,8 @@ sub Generate_Source {
# Dump out various metadata.
print $tmpfile_handle "Package: $source\n";
- print $tmpfile_handle "Binary: " . join(', ', @{$dsc_data->{'Binary'}}) . "\n";
+ print $tmpfile_handle
+ "Binary: " . join(', ', @{$dsc_data->{'Binary'}}) . "\n";
print $tmpfile_handle "Version: $dsc_data->{'Version'}\n";
print $tmpfile_handle "Priority: $priority\n";
print $tmpfile_handle "Section: $section\n";
@@ -829,18 +835,21 @@ sub Generate_Source {
if (defined($dsc_data->{'Build-Depends'})) {
print $tmpfile_handle 'Build-Depends: ';
- print $tmpfile_handle join(', ', @{$dsc_data->{'Build-Depends'}}) . "\n";
+ print $tmpfile_handle
+ join(', ', @{$dsc_data->{'Build-Depends'}}) . "\n";
}
if (defined($dsc_data->{'Build-Depends-Indep'})) {
print $tmpfile_handle 'Build-Depends-Indep: ';
- print $tmpfile_handle join(', ', @{$dsc_data->{'Build-Depends-Indep'}}) . "\n";
+ print $tmpfile_handle
+ join(', ', @{$dsc_data->{'Build-Depends-Indep'}}) . "\n";
}
print $tmpfile_handle 'Architecture: ';
print $tmpfile_handle join(' ', @{$dsc_data->{'Architecture'}}) . "\n";
- print $tmpfile_handle "Standards-Version: $dsc_data->{'Standards-Version'}\n"
+ print $tmpfile_handle
+ "Standards-Version: $dsc_data->{'Standards-Version'}\n"
if exists $dsc_data->{'Standards-Version'};
print $tmpfile_handle "Format: $dsc_data->{'Format'}\n";
print $tmpfile_handle "Directory: " . join('/',
diff --git a/lib/DebPool/Release.pm b/lib/DebPool/Release.pm
index 5fb0390..089e7f4 100644
--- a/lib/DebPool/Release.pm
+++ b/lib/DebPool/Release.pm
@@ -297,7 +297,8 @@ sub Generate_Release_Dist {
print $tmpfile_handle "Codename: ${archive}\n";
print $tmpfile_handle "Date: ${now_822}\n";
print $tmpfile_handle "Architectures: " . join(' ', @archs) . "\n";
- print $tmpfile_handle "Components: " . join(' ', @{$Options{'sections'}}) . "\n";
+ print $tmpfile_handle
+ "Components: " . join(' ', @{$Options{'sections'}}) . "\n";
print $tmpfile_handle "Description: $Options{'release_description'}\n";
# Now print MD5 and SHA1 checksum lists.
--
Debpool Project Repository
More information about the Debpool-commits
mailing list