aboutsummaryrefslogtreecommitdiffstats
path: root/compress_files
diff options
context:
space:
mode:
authorGuillaume Rousse <guillomovitch@mandriva.org>2009-05-08 23:05:34 +0000
committerGuillaume Rousse <guillomovitch@mandriva.org>2009-05-08 23:05:34 +0000
commit40ce96b66753c5be192bc9ea968ffb7376d04d52 (patch)
treef600785f6afa2117c559547a606b6d310e2b05d1 /compress_files
parent675dcaf567789bf5ce17b30327105a74e1fc89b9 (diff)
downloadspec-helper-40ce96b66753c5be192bc9ea968ffb7376d04d52.tar
spec-helper-40ce96b66753c5be192bc9ea968ffb7376d04d52.tar.gz
spec-helper-40ce96b66753c5be192bc9ea968ffb7376d04d52.tar.bz2
spec-helper-40ce96b66753c5be192bc9ea968ffb7376d04d52.tar.xz
spec-helper-40ce96b66753c5be192bc9ea968ffb7376d04d52.zip
cosmetics
Diffstat (limited to 'compress_files')
-rwxr-xr-xcompress_files26
1 files changed, 13 insertions, 13 deletions
diff --git a/compress_files b/compress_files
index ddec6c6..a3fb215 100755
--- a/compress_files
+++ b/compress_files
@@ -35,7 +35,8 @@ my @mandirs = map { "$buildroot/$_" } qw{
usr/lib/perl5/man
};
-# Now the .so conversion.
+# Convert man pages from old locations just consisting
+# of a single include directive to a symlink
my (@sofiles, @sodests);
my $so_function = sub {
# skip symlinks
@@ -49,12 +50,11 @@ my $so_function = sub {
return if $exclude_pattern && $File::Find::name =~ $exclude_pattern;
# Test first line of file for the .so thing.
- my $SOTEST;
- open($SOTEST, $_);
- my $l = <$SOTEST>;
- close $SOTEST;
- if ($l =~ m/\.so\s+(.*)/) {
- my $solink=$1;
+ open(my $in, $_);
+ my $line = <$in>;
+ close ($in);
+ if ($line =~ m/\.so\s+(.*)/) {
+ my $solink = $1;
# This test is here to prevent links like ... man8/../man8/foo.8
if (basename($File::Find::dir) eq dirname($solink)) {
$solink = basename($solink);
@@ -149,25 +149,25 @@ sub xargs {
# Figure out length of static portion of command.
my $static_length = 0;
foreach (@_) {
- $static_length += length($_)+1;
+ $static_length += length($_) + 1;
}
my @collect;
my $length = $static_length;
- foreach (@$args) {
- if (length($_) + 1 + $static_length > $command_max) {
+ foreach my $arg (@$args) {
+ if (length($arg) + 1 + $static_length > $command_max) {
error(qq(This command is greater than the maximum command size allowed by the kernel, and cannot be split up further. What on earth are you doing? "@_ $_"));
}
- $length+=length($_) + 1;
+ $length += length($_) + 1;
if ($length < $command_max) {
push @collect, $_;
} else {
- system(@_,@collect) if $#collect > -1;
+ system(@_, @collect) if $#collect > -1;
@collect = $_;
$length = $static_length + length($_) + 1;
}
}
- system(@_,@collect) if $#collect > -1;
+ system(@_, @collect) if $#collect > -1;
}
# uncompress info/man pages with a given extension