[Debpool-commits] [SCM] Debpool Project Repository branch, master, updated. debian/0.3.10-1-gbc3ce9d
Andres Mejia
mcitadel at gmail.com
Tue Oct 21 04:08:09 UTC 2008
The following commit has been merged in the master branch:
commit bc3ce9da0c4f65c84f481ad5ba8e5193a1fdb6e1
Author: Andres Mejia <mcitadel at gmail.com>
Date: Tue Oct 21 00:07:57 2008 -0400
Minor code cleanup
diff --git a/bin/debpool b/bin/debpool
index dd4a5d7..5672c35 100755
--- a/bin/debpool
+++ b/bin/debpool
@@ -313,11 +313,11 @@ foreach my $changefile (@changefiles) {
my($pkg_pooldir) = join('/',
($Options{'pool_dir'}, PoolDir($package, $section),
$package));
-
+
if ($has_orig) { # Orig tarball uploaded
if ((!$Options{'rollback'}) && (-e "$pkg_pooldir/$file")) {
Reject_Package($changefile, $changes_data);
-
+
my($msg) = "Duplicate orig tarball '$file'";
Log_Message($msg, LOG_REJECT, LOG_ERROR);
@@ -325,7 +325,7 @@ foreach my $changefile (@changefiles) {
last; # Don't check other files, we just rejected
} elsif (!(-e "$Options{'incoming_dir'}/$file")) {
Reject_Package($changefile, $changes_data);
-
+
my($msg) = "Missing orig tarball '$file'";
Log_Message($msg, LOG_REJECT, LOG_ERROR);
@@ -337,7 +337,7 @@ foreach my $changefile (@changefiles) {
} else { # Orig tarball in pool - we hope
if (!(-e "$pkg_pooldir/$file")) {
Reject_Package($changefile, $changes_data);
-
+
my($msg) = "Missing orig tarball '$file'";
Log_Message($msg, LOG_REJECT, LOG_ERROR);
@@ -508,12 +508,12 @@ ARCH_LOOP:
# Generate a Packages/Sources file.
my($file) = Generate_List(@triple);
-
+
if (!defined($file)) {
my($msg) = "Couldn't create list for $dist/$section/${arch}: ";
$msg .= $DebPool::Packages::Error;
Log_Message($msg, LOG_GENERAL, LOG_ERROR);
-
+
next;
}
@@ -575,15 +575,15 @@ ARCH_LOOP:
unlink($file, @zfiles);
next;
}
-
+
if ($Options{'sign_release'}) {
$sigfile = Sign_Release($relfile);
-
+
if (!defined($sigfile)) {
my($msg) = "Couldn't create Release signature file: ";
$msg .= $DebPool::GnuPG::Error;
Log_Message($msg, LOG_GENERAL, LOG_ERROR);
-
+
unlink($file, @zfiles);
if (defined($relfile)) {
@@ -658,7 +658,7 @@ ARCH_LOOP:
} else {
if ($Options{'sign_release'}) {
$sigfile = Sign_Release($relfile);
-
+
if (!defined($sigfile)) {
my($msg) = "Couldn't create Release signature file: ";
$msg .= $DebPool::GnuPG::Error;
diff --git a/debian/changelog b/debian/changelog
index 7f70c19..83dbef4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+debpool (0.3.11) experimental; urgency=low
+
+ * Minor code cleanup.
+
+ -- Andres Mejia <mcitadel at gmail.com> Tue, 21 Oct 2008 00:06:48 -0400
+
debpool (0.3.10) experimental; urgency=low
* Handle conffile renaming as suggested in
diff --git a/lib/DebPool/Bzip2.pm b/lib/DebPool/Bzip2.pm
index 36b7953..397af0c 100644
--- a/lib/DebPool/Bzip2.pm
+++ b/lib/DebPool/Bzip2.pm
@@ -17,7 +17,7 @@ package DebPool::Bzip2;
# 3. Neither the name of the Author nor the names of any contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
-#
+#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
diff --git a/lib/DebPool/Config.pm b/lib/DebPool/Config.pm
index efac159..ec6e265 100644
--- a/lib/DebPool/Config.pm
+++ b/lib/DebPool/Config.pm
@@ -5,7 +5,7 @@ package DebPool::Config;
# DebPool::Config - Module for handling config options
#
# Copyright 2003-2004 Joel Aelwyn. All rights reserved.
-#
+#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
@@ -17,7 +17,7 @@ package DebPool::Config;
# 3. Neither the name of the Author nor the names of any contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
-#
+#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -95,8 +95,8 @@ BEGIN {
);
@EXPORT_OK = qw(
- %Options
- %OptionDefs
+ %Options
+ %OptionDefs
&Clean_Options
&Load_Default_Configs
&Load_Minimal_Configs
@@ -264,7 +264,7 @@ sub Clean_Options {
# (non-alias) distribution values.
%dummy = ();
-
+
foreach my $dummykey (values(%{$Options{'dists'}})) {
$dummy{$dummykey} = 1;
}
diff --git a/lib/DebPool/DB.pm b/lib/DebPool/DB.pm
index 1e7fdba..4ce152c 100644
--- a/lib/DebPool/DB.pm
+++ b/lib/DebPool/DB.pm
@@ -5,7 +5,7 @@ package DebPool::DB;
# DebPool::DB - Module for managing data hashes via tied NDBM files
#
# Copyright 2003-2004 Joel Aelwyn. All rights reserved.
-#
+#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
@@ -17,7 +17,7 @@ package DebPool::DB;
# 3. Neither the name of the Author nor the names of any contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
-#
+#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
diff --git a/lib/DebPool/Dirs.pm b/lib/DebPool/Dirs.pm
index 05ce56d..8b1ba2f 100644
--- a/lib/DebPool/Dirs.pm
+++ b/lib/DebPool/Dirs.pm
@@ -5,7 +5,7 @@ package DebPool::Dirs;
# DebPool::Dirs - Module for dealing with directory related tasks
#
# Copyright 2003-2004 Joel Aelwyn. All rights reserved.
-#
+#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
@@ -17,7 +17,7 @@ package DebPool::Dirs;
# 3. Neither the name of the Author nor the names of any contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
-#
+#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -343,15 +343,15 @@ sub Setup_Incoming_Watch {
#
# Returns a list of .changes files on success, undef on failure (which
# includes interruption by a signal).
-
+
sub Watch_Incoming {
use DebPool::Logging qw(:functions :facility :level);
while (my @events = $inotify->read) {
- my @changes;
- foreach (@events) {
- push @changes, $_->name if ($_->name =~ /\.changes$/);
- }
+ my @changes;
+ foreach (@events) {
+ push @changes, $_->name if ($_->name =~ /\.changes$/);
+ }
if (@changes > 0) {
Log_Message("Found changes: ".join(', ', @changes),
LOG_GENERAL, LOG_DEBUG);
@@ -396,7 +396,7 @@ sub Monitor_Incoming {
}
return if $DebPool::Signal::Signal_Caught;
} until ($stat[9] != $mtime);
-
+
return Scan_Changes();
}
}
@@ -441,7 +441,7 @@ sub Strip_Subsection {
if (!defined($section)) {
return 'main';
}
-
+
foreach my $check_section (@{$Options{'sections'}}) {
if ($section =~ m/^$check_section(\/.+)?$/) {
return $check_section;
@@ -489,7 +489,7 @@ sub Archfile {
$result .= "/binary-${architecture}";
$type = "Packages";
}
-
+
if (!$dironly) {
$result .= "/${type}";
}
diff --git a/lib/DebPool/GnuPG.pm b/lib/DebPool/GnuPG.pm
index eb8562c..7296b63 100644
--- a/lib/DebPool/GnuPG.pm
+++ b/lib/DebPool/GnuPG.pm
@@ -5,7 +5,7 @@ package DebPool::GnuPG;
# DebPool::GnuPG - Module for all interactions with GNU Privacy Guard
#
# Copyright 2003-2004 Joel Aelwyn. All rights reserved.
-#
+#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
@@ -17,7 +17,7 @@ package DebPool::GnuPG;
# 3. Neither the name of the Author nor the names of any contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
-#
+#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -114,7 +114,7 @@ sub Check_Signature {
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.
@@ -131,24 +131,24 @@ sub Check_Signature {
waitpid($pid,0); # No flags, just wait.
if ($?) { # Failure
- foreach (@loglines) {
- Log_Message($_, LOG_GPG, LOG_DEBUG);
- }
+ foreach (@loglines) {
+ Log_Message($_, LOG_GPG, LOG_DEBUG);
+ }
my($msg) = "Failed signature check on '$file' ";
if (defined($signature)) {
$msg .= "(signature file '$signature'): ";
} else {
$msg .= "(internal signature): ";
}
- if (WIFEXITED($?)) {
- $msg .= "gpg returned non-zero status " . WEXITSTATUS($?);
- }
- elsif (WIFSIGNALED($?)) {
- $msg .= "gpg died from signal " . WTERMSIG($?);
- }
- else {
- $msg .= "gpg terminated in an unknown way.";
- }
+ if (WIFEXITED($?)) {
+ $msg .= "gpg returned non-zero status " . WEXITSTATUS($?);
+ }
+ elsif (WIFSIGNALED($?)) {
+ $msg .= "gpg died from signal " . WTERMSIG($?);
+ }
+ else {
+ $msg .= "gpg terminated in an unknown way.";
+ }
Log_Message($msg, LOG_GPG, LOG_WARNING);
}
return 1;
@@ -183,20 +183,20 @@ sub Sign_Release {
waitpid($gnupg_pid, 0);
foreach (@loglines) {
- Log_Message($_, LOG_GPG, $? ? LOG_ERROR : LOG_WARNING);
+ Log_Message($_, LOG_GPG, $? ? LOG_ERROR : LOG_WARNING);
}
if ($?) {
- if (WIFEXITED($?)) {
- $Error = "gpg returned non-zero status " . WEXITSTATUS($?);
- }
- elsif (WIFSIGNALED($?)) {
- $Error = "gpg died from signal " . WTERMSIG($?);
- }
- else {
- $Error = "gpg terminated in an unknown way.";
- }
- return;
+ if (WIFEXITED($?)) {
+ $Error = "gpg returned non-zero status " . WEXITSTATUS($?);
+ }
+ elsif (WIFSIGNALED($?)) {
+ $Error = "gpg died from signal " . WTERMSIG($?);
+ }
+ else {
+ $Error = "gpg terminated in an unknown way.";
+ }
+ return;
}
# And we're done
@@ -237,7 +237,7 @@ sub Strip_GPG {
# Okay. Back to front, so that we don't muck up reference numbers.
# First, we rip out the signature data by splicing it with an empty
# list.
-
+
splice(@text, $sigstart, ($sigend - $sigstart) + 1);
# We used to just rip off the first 3 lines (BEGIN line, hash header,
diff --git a/lib/DebPool/Gzip.pm b/lib/DebPool/Gzip.pm
index ebf8608..5aa40ba 100644
--- a/lib/DebPool/Gzip.pm
+++ b/lib/DebPool/Gzip.pm
@@ -17,7 +17,7 @@ package DebPool::Gzip;
# 3. Neither the name of the Author nor the names of any contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
-#
+#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
diff --git a/lib/DebPool/Logging.pm b/lib/DebPool/Logging.pm
index 3ea7e5a..e5fc2c2 100644
--- a/lib/DebPool/Logging.pm
+++ b/lib/DebPool/Logging.pm
@@ -5,7 +5,7 @@ package DebPool::Logging;
# DebPool::Logging - Module to handle logging messages
#
# Copyright 2003-2004 Joel Aelwyn. All rights reserved.
-#
+#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
@@ -17,7 +17,7 @@ package DebPool::Logging;
# 3. Neither the name of the Author nor the names of any contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
-#
+#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
diff --git a/lib/DebPool/Packages.pm b/lib/DebPool/Packages.pm
index b89917e..227ab17 100644
--- a/lib/DebPool/Packages.pm
+++ b/lib/DebPool/Packages.pm
@@ -730,14 +730,14 @@ sub Install_Package {
if (defined($dsc) && defined($dsc_hashref)) {
my $src_file = Generate_Source($dsc, $dsc_hashref, $chg_hashref);
-
+
if (!defined($src_file)) {
$Error = "Failed to generate .source file: $Error";
return;
}
$target = "$pkg_dir/${pkg_name}_" . Strip_Epoch($pkg_ver) . '.source';
-
+
if (!Move_File($src_file, $target, $Options{'pool_file_mode'})) {
$Error = "Failed to move '$src_file' to '$target': ";
$Error .= $DebPool::Util::Error;
@@ -1038,7 +1038,7 @@ sub Generate_Package {
my @files = @{$changes_data->{'Files'}};
my $pool_base = PoolBasePath();
-
+
# Grab a temporary file.
my($tmpfile_handle, $tmpfile_name) = tempfile();
@@ -1150,7 +1150,7 @@ sub Generate_Source {
my($dsc, $dsc_data, $changes_data) = @_;
my $source = $dsc_data->{'Source'};
my @files = @{$dsc_data->{'Files'}};
-
+
# Figure out the priority and section, using the DSC filename and
# the Changes file data.
diff --git a/lib/DebPool/Release.pm b/lib/DebPool/Release.pm
index e05810c..5fb0390 100644
--- a/lib/DebPool/Release.pm
+++ b/lib/DebPool/Release.pm
@@ -5,7 +5,7 @@ package DebPool::Release;
# DebPool::Release - Module for generating and installing Release files
#
# Copyright 2003-2004 Joel Aelwyn. All rights reserved.
-#
+#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
@@ -17,7 +17,7 @@ package DebPool::Release;
# 3. Neither the name of the Author nor the names of any contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
-#
+#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -254,7 +254,7 @@ sub Generate_Release_Dist {
# Now, for each file, generate MD5 and SHA1 checksums, and put them
# into Checksums for later use (assuming it's a file we care about).
-
+
my(@stat) = stat($fullfile);
my($size) = $stat[7];
@@ -267,11 +267,11 @@ sub Generate_Release_Dist {
close($hash_fh);
# Now calculate the checksums and put them into the hashes.
-
+
my($md5) = Digest::MD5::md5_hex(@filetext);
my($sha1) = Digest::SHA::sha1_hex(@filetext);
my($sha256) = Digest::SHA::sha256_hex(@filetext);
-
+
push @Checksums, {
'File' => $file,
'Size' => $size,
diff --git a/lib/DebPool/Signal.pm b/lib/DebPool/Signal.pm
index a8c0fe8..f8ae046 100644
--- a/lib/DebPool/Signal.pm
+++ b/lib/DebPool/Signal.pm
@@ -5,7 +5,7 @@ package DebPool::Signal;
# DebPool::DB - Module for handling inter-process signals
#
# Copyright 2003-2004 Joel Aelwyn. All rights reserved.
-#
+#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
@@ -17,7 +17,7 @@ package DebPool::Signal;
# 3. Neither the name of the Author nor the names of any contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
-#
+#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
diff --git a/lib/DebPool/Util.pm b/lib/DebPool/Util.pm
index 2f8daa6..4e8e019 100644
--- a/lib/DebPool/Util.pm
+++ b/lib/DebPool/Util.pm
@@ -5,7 +5,7 @@ package DebPool::Util;
# DebPool::Util - Module to contain various utility routines
#
# Copyright 2004 Joel Aelwyn. All rights reserved.
-#
+#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
@@ -17,7 +17,7 @@ package DebPool::Util;
# 3. Neither the name of the Author nor the names of any contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
-#
+#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
--
Debpool Project Repository
More information about the Debpool-commits
mailing list