[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#767754: new check: file-in-root-and-usr



Package: lintian
Version: 2.5.30
Severity: normal
Tags: patch
User: md@linux.it
Usertags: usrmerge

For more information please read:
https://lists.debian.org/20141102020154.GA11320@bongo.bofh.it
http://anonscm.debian.org/cgit/users/md/usrmerge.git/tree/debian/README.Debian

-- 
ciao,
Marco
Check-Script: usrmerge
Author: Marco d'Itri <md@linux.it>
Type: binary
Needs-Info: unpacked
Info: This script checks for files with the same name installed in / and /usr.

Tag: file-in-root-and-usr
Severity: important
Certainty: certain
Info: The package ships the two (or more) files with the same name
 installed both in /{bin,sbin,lib*}/ and /usr/{bin,sbin,lib*}/.
 This is incompatible with the everything-in-usr directories scheme.
 .
 Packages which need to do this must create in postinst one of the files
 to be a symbolic link to the other one.
Ref: /usr/share/doc/usrmerge/README.Debian
# usrmerge -- lintian check script -*- perl -*-

# Copyright (C) 2014 Marco d'Itri
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, you can find it on the World Wide
# Web at http://www.gnu.org/copyleft/gpl.html, or write to the Free
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
# MA 02110-1301, USA.

package Lintian::usrmerge;
use strict;
use warnings;
use autodie;

use Lintian::Tags qw(tag);

sub run {
    my (undef, undef, $info) = @_;

    foreach my $file1 ($info->sorted_index) {
        next unless $file1 =~ m,^(?:s?bin|lib(?:|x?32|64))/,;
        my $file2 = $info->index("usr/$file1") or next;

        tag 'file-in-root-and-usr', $file1, $file2;
    }

    return;
}

1;

# Local Variables:
# indent-tabs-mode: nil
# cperl-indent-level: 4
# End:
# vim: syntax=perl sw=4 sts=4 sr et

Attachment: signature.asc
Description: Digital signature


Reply to: