MAJOR=7
MINOR=4
DEVNAME=loop4
DEVTYPE=disk
DISKSEQ=9
  %   CˆÚ“þZŒ8Ûd•Ù ¥hMìÕÿ?ÙÔÓØ609×¿Õ a    C‹      }TM�›0½ó+¦—%‰"Ø¬zê*ÕöCém³j·§†à.ØÔ6É¢lþ{Ç†’Vådfæ½yóaï˜¦k~Èa
×\áÈÂuo÷ÇSèK2ƒËª«È³Ãß{^8™ÀW4˜È"ì˜âlS ÄÛBnXñœsÃ$ô)tó­wµi*”l¶9øró‹}¸¹zÞ‘KÔEqi–.ØâºÓ…»ÕèÁ¾8ådµH—LÎ$9&/x“	D‚LN%T
SžXPL=0µ–Ç¨ÚäìsÀÅN¾`
{nr‡aj[—(ñÂ$Èw¨‚YäB…Üs±�KEÉEJrB%µæ¶k™TP)¹ã©�:ç·ðÄ4…ˆÛ:c:§6ÍžSO6µ&%Ì…TL±’Æ¢c¼Jf¨NªÃÈn¶NnŸá2Á'»±íCO¤¯˜ž”¬P™¦UqÁÕj¥$ÌVC1å©Ú0Ãw,±Ü Zf°n=\$ïƒÛàÖý[Æ­Tü4¼p§	AŒÝ$ßN‡U4>ÂêÜ¸ùjð”ÂMEÏC­Ú5Än€ëÀC;f‡á¾w&[£À}¿=- _YYØÕEëïü´Ùë@Ò%±wj´ú,e�LL�ëÜ`Dw§EØè‘?ó�Âæí†áÐm—þþGö8tg¬ÐCAÝÄë:€Ïü0ƒãºó£ñò4ë0¬4…Y4…öt9tèYø)Œ0çgcÔ¿5öý(eZàkEÂ>'Ì½÷éü°    5   Eˆl–Ü4ý(TÐ;â�À·q ©‹Fÿ�þB7^YÆˆáD	#mùÚƒq×\ÙÀÖ x    E#!/usr/bin/perl
#
# dpkg-name
#
# Copyright Â© 1995,1996 Erick Branderhorst <branderh@debian.org>.
# Copyright Â© 2006-2010, 2012-2015 Guillem Jover <guillem@debian.org>
#
# 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, see <https://www.gnu.org/licenses/>.

use warnings;
use strict;

use List::Util qw(none);
use File::Basename;
use File::Path qw(make_path);

use Dpkg ();
use Dpkg::Gettext;
use Dpkg::ErrorHandling;
use Dpkg::Version;
use Dpkg::Control;
use Dpkg::Arch qw(get_host_arch);

textdomain('dpkg-dev');

my %options = (
    subdir => 0,
    destdir => '',
    createdir => 0,
    overwrite => 0,
    symlink => 0,
    architecture => 1,
);

sub version()
{
    printf(g_("Debian %s version %s.\n"), $Dpkg::PROGNAME, $Dpkg::PROGVERSION);
}

sub usage()
{
    printf(g_("Usage: %s [<option>...] <file>...\n"), $Dpkg::PROGNAME);

    print(g_("
Options:
  -a, --no-architecture    no architecture part in filename.
  -o, --overwrite          overwrite if file exists.
  -k, --symlink            don't create a new file, but a symlink.
  -s, --subdir [dir]       move file into subdirectory (use with care).
  -c, --create-dir         create target directory if not there (use with care).
  -?, --help               show this help message.
  -v, --version            show the version.

file.deb changes to <package>_<version>_<architecture>.<package_type>
according to the 'underscores convention'.
"));
}

sub fileexists($)
{
    my $filename = shift;

    if (-f $filename) {
        return 1;
    } else {
        warning(g_("cannot find '%s'"), $filename);
        return 0;
    }
}

sub filesame($$)
{
    my ($a, $b) = @_;
    my @sta = stat($a);
    my @stb = stat($b);

    # Same device and inode numbers.
    return (@sta and @stb and $sta[0] == $stb[0] and $sta[1] == $stb[1]);
}

sub getfields($)
{
    my $filename = shift;

    # Read the fields
    open(my $cdata_fh, '-|', 'dpkg-deb', '-f', '--', $filename)
        or syserr(g_('cannot open %s'), $filename);
    my $fields = Dpkg::Control->new(type => CTRL_PKG_DEB);
    $fields->parse($cdata_fh, sprintf(g_('binary control file %s'), $filename));
    close($cdata_fh);

    return $fields;
}

sub getarch($$)
{
    my ($filename, $fields) = @_;

    my $arch = $fields->{Architecture};
    if (not $fields->{Architecture} and $options{architecture}) {
        $arch = get_host_arch();
        warning(g_("assuming architecture '%s' for '%s'"), $arch, $filename);
    }

    return $arch;
}

sub getname($$$)
{
    my ($filename, $fields, $arch) = @_;

    my $pkg = $fields->{Package};
    my $v = Dpkg::Version->new($fields->{Version});
    my $version = $v->as_string(omit_epoch => 1);
    my $type = $fields->{'Package-Type'} || 'deb';

    my $tname;
    if ($options{architect