[Adduser-devel] Bug#453419: adduser: should depend on bzip2

Joerg Hoh joerg at joerghoh.de
Sat Dec 29 15:09:12 UTC 2007


tags 453419 more-info-required
thanks

Hi


On Thu, Nov 29, 2007 at 02:16:06PM +0100, Loris Boillet wrote:
> Package: adduser
> Version: 3.102
> Severity: normal
> 
> Hi,
> 
> deluser's --backup option assumes bzip2 is installed, but adduser does
> not depend on it.

No, it doesn't. If available in the path, deluser makes use of bzip2,
otherwise it falls back to gzip.


> Ex of command that fails if bzip2 is not installed:
> deluser --remove-home --backup --backup-to . u111
> Looking for files to backup/remove ...
> Backing up files to be removed to . ...
> backup_name = ./u111.tar/bin/tar: Removing leading `/' from member names
> /usr/sbin/deluser: `1 ./u111.tar' returned error code 16777215. Exiting.

This looks really strange, as it seems that the which function returns
wrong values.  Can you paste the output of the small script attached? It
will test the return values of the which function.

It should be something like this:

joerg at bastet temp $ perl test-adduser-which
found gzip: /bin/gzip
found bzip2: /bin/bzip2
test-adduser-which: Kein Programm mit dem Namen »bzip3« in Verzeichnisliste $PATH gefunden.

Jörg


-- 
What did you do to the cat? It looks half-dead. -Schroedinger's wife
-------------- next part --------------
#!/usr/bin/perl

use strict;
use warnings;

use Debian::AdduserCommon;


BEGIN {
    eval 'use Locale::gettext';
    if ($@) {
        *gettext = sub { shift };
        *textdomain = sub { "" };
        *LC_MESSAGES = sub { 5 };
    }
    eval {
        require POSIX;
        import POSIX qw(setlocale);
    };
    if ($@) {
        *setlocale = sub { return 1 };
    }
}

setlocale(LC_MESSAGES, "");
textdomain("adduser");

my $gzip = &which("gzip");
print "found gzip: $gzip\n";

my $bzip2 = &which("bzip2");
print "found bzip2: $bzip2\n";

my $bzip3 = &which("bzip3");
print "found bzip3: $bzip3 (unlikely)\n";
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/adduser-devel/attachments/20071229/83dab281/attachment.pgp 


More information about the Adduser-devel mailing list