Package: bins
Version: 1.1.29-6
Severity: normal
Tags: patch

On my system bins was not able to complete album creation without a
patch. The patch (attached) removes some unnecessary system() calls
and replaces them by Perl functions.

However, bins still eats memory and therefore becomes very slow.
Here's a line from top:

24812 hans      25   0  998m 553m  72m R 76.7 54.6  92:11.21 bins

That's with only a few 1000 photos (4.4 GB). I don't know where the
memory leaks but perhaps a few undefs in the right places would fix
it.

Patch:

--- /usr/bin/bins       2006-01-27 14:27:09.000000000 +0100
+++ bins        2006-10-24 22:49:31.000000000 +0200
@@ -1872,7 +1872,7 @@
                                 $newpath = $from;
                             }
                             beVerboseN("Linking from $to to $newpath...", 2);
-                            system("ln", "-sf", $newpath, $to) == 0
+                            symlink($newpath, $to) == 1
                                 or die("\nCannot link $to to $newpath: $?");
                         } else {
                             beVerboseN("Copying from $from to $to...", 2);
@@ -3468,13 +3468,14 @@
                     $newpath = "$picdir$origName";
                 }
                 beVerboseN("Linking from $albumdir$newName to $newpath... ", 
2);
-                system("ln", "-sf", $newpath, "$albumdir$newName") == 0
+                unlink("$albumdir$newName");
+                symlink($newpath, "$albumdir$newName") == 1
                     or die("\nCannot link $albumdir$newName to $newpath: $?");
                 # the original file may be r/o but we don't have to modify it
                 # but it must be readable by the http deamon
                 if ($configHash->{updateOriginalPerms})
                 {
-                    system("chmod", "a+r", "$picdir$origName") == 0
+                    chmod(0644, "$picdir$origName") == 1
                         or die("\nCannot set read permission on 
$albumdir$newName: $?");
                 }
                 beVerboseN("done.", 2);
@@ -3485,7 +3486,7 @@
                 system("cp", "-p", "$picdir$origName", "$albumdir$newName") == 0
                     or die("\nCannot copy $picdir$origName to 
$albumdir$newName: $?");
                 # make it writable in case $origName was r/o
-                system("chmod", "u+w,a+r", "$albumdir$newName") == 0
+                chmod(0644, "$albumdir$newName") == 1
                     or die("\nCannot set write permission on 
$albumdir$newName: $?");
                 beVerboseN("done.", 2);
                 return 1;


-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17.13
Locale: LANG=de_DE, LC_CTYPE=de_DE (charmap=ISO-8859-1)

Versions of packages bins depends on:
ii  libhtml-clean-perl         0.8-2         perl HTML::Clean - Cleans up HTML 
ii  libhtml-parser-perl        3.55-1        A collection of modules that parse
ii  libhtml-template-perl      2.8-1         HTML::Template : A module for usin
ii  libimage-info-perl         1.22-1        allows extraction of meta informat
ii  libimage-size-perl         2.992-2       determine the size of images in se
ii  libio-string-perl          1.08-1        Emulate IO::File interface for in-
ii  libjpeg-progs              6b-9          Programs for manipulating JPEG fil
ii  liblocale-gettext-perl     1.05-1        Using libc functions for internati
ii  libtext-iconv-perl         1.4-3         converts between character sets in
ii  libtext-unaccent-perl      1.08-1        provides functions to remove accen
ii  libtimedate-perl           1.1600-2      Time and date functions for Perl
ii  liburi-perl                1.35-1        Manipulates and accesses URI strin
ii  libxml-grove-perl          0.46alpha-9   Perl module for accessing parsed *
ii  libxml-handler-yawriter-pe 0.23-3        Perl module for writing XML docume
ii  libxml-perl                0.08-1        Perl modules for working with XML
ii  libxml-writer-perl         0.600-1       Perl module for writing XML docume
ii  libxml-xql-perl            0.68-2        Perl module for querying XML tree 
ii  perlmagick                 6:6.2.4.5-0.7 A perl interface to the libMagick 

Versions of packages bins recommends:
ii  libglade-gnome0               1:0.17-3   Library to load .glade files at ru
ii  libglade-perl                 0.61-1     Glade-perl runtime modules
ii  libgladexml-perl              0.7009-11  Perl module for the libglade libra
ii  libgnome-perl                 0.7009-11  Perl module for the gnome and zvt 
ii  libgtk-imlib-perl             0.7009-11  Perl module for the gdkimlib libra

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to