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

Re: Diverting dpkg-architecture

I happen to be not the only one to realize that OS and LIBC are two
different things (see debian-devel discussions couple of months back on
hurd-i386 naming).

Officially, there is only one Debian-supported OS besides Linux (Hurd),
and only one LIBC (glibc) but in the future, we would like to have more
OSs (BSDs, etc) and more LIBCs (uclibc, diet) supported.

It looks too restrictive to require OS=LIBC and skip LIBC from the archname.

Wartan Hachaturow wrote:
> I do not see the single reason to do it like this -- and touching hurd,
> doing a special kludge in dpkg-architecture, just because it does not fit
> into uclibc naming convention you like.

That kludge is not required anymore. In the new version of that patch
(to be uploaded) it is done better, namely, by finding a correct CPU
name in the arch and using whatever comes before that as OS and whatever
comes after as LIBC.

sub split_debian {
    local ($_) = @_;

    # needed for common case of ARCH=CPU
    return ("linux",$_) if exists ($cputable{$_});

    # needed for e.g. OS-arm-{softfloat,vfp}-LIBC variants
    if (/^([^-]*)-([^-]*)-([^-]*)-(.*)/) {
        return (join("-",$1,$4), join("-",$2,$3)) if

    if (/^([^-]*)-([^-]*)-(.*)/) {
    # needed for e.g. OS-arm-{softfloat,vfp} variants
                                 	return ($1, join("-",$2,$3)) if
    # needed for e.g. arm-{softfloat,vfp}-LIBC variants
        return (join("-","linux",$3), join("-", $1, $2)) if
    # needed for e.g. OS-CPU-LIBC variants
        return (join("-",$1,$3), $2) if exists($cputable{$2});
    if (/^([^-]*)-(.*)/) {
    # needed for e.g. OS-CPU variants
        return ($1, $2) if exists($cputable{$2});
    # needed for e.g. CPU-LIBC variants
        return (join("-", "linux", $2), $1) if exists($cputable{$1});

    return ("linux", $_);

sub split_gnu {
    local ($_) = @_;

    # needed for e.g.  arm-{softfloat,vfp}-linux-gnu variants
    return (join("-",$1, $2), $3) if exists($cputable{join("-",$1,$2)});

    return ($1, $2);

>>   Which is not true. This
>> http://www.xs4all.nl/~kurzanov/debian/patches/dpkg-1.13.16-uclibc.patch
>> is there since march, and I've been using this successfully for quite
>> some time.

Reply to: