Mail archive
alpine-devel

[alpine-devel] Re: [PATCH] alpine-conf: add script to add dl-3 internet repos from setup-alpine script

From: Natanael Copa <ncopa_at_alpinelinux.org>
Date: Tue, 28 Dec 2010 15:42:23 +0100

On Mon, 27 Dec 2010 18:10:52 -0500
Jeff Bilyk <jbilyk_at_gmail.com> wrote:

> Hey Natanael,
>
> Thoughts on this patch?

sorry for beeing slow :-(

1. we should autodetect if its v2.2+ or edge. I don't think we need to
backport to pre v2.2. Also, we do not want modify this script everytiem
we make new release.

So what do you think about something like:

        release=$(cut -f1 /etc/alpine-release)
        case "$release" in
                *_git*) repo="edge";;
                [0-9]*.[0-9]*.[0-9]*)
                        # release is in x.y.z format. lets cut the last
                                digit
                        repo=v${release%.[0-9]*};;
        esac
        
        if [ -z "$repo" ]; then
          #prompt user
        fi

2. we should append the arch (right Timo?)

        case "$(uname -m)" in
                i[3-9]86) arch=x86;;
                x86_64) arch=x86_64;;
        esac


3. we should not have any hardcoded repo (dl-3.a.o) but we should fetch
a list of mirrors with wget and either present a choice for the users
or just pick one without any questions asked. I'd prefer the latter.

        mirror=$(wget -q -O - \
                http://www.alpinelinux.org/alpine/MIRRORS.txt \
                | head -n 1)

        url=$mirror/$repo/$arch
        ...


That said, we gotta start from somewhere so I applied your patch.

Thanks for looking into this!

-nc


---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Tue Dec 28 2010 - 15:42:23 UTC