~alpine/devel

3 3

[alpine-devel] saveas uri in APKBUILDs

Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20130215094038.7f847eaf@ncopa-desktop.alpinelinux.org>
Sender timestamp
1360917638
DKIM signature
missing
Download raw message
Hi,

We have a nice feature to download a file with a different name:

  source="saveas-http://$url/newfilename"

I have noticed that Arch Linux has something similar:

  source="newfilename::http://$url"

Do we want to change to same format?

Benefits:
* Easier for Arch users to switch
* Slightly more intuitive?

Drawbacks:
* abuild code probably gets messier
* potensial scripts that parses APKBUILD and uses $source might break.
  (i doubt there are any)

Opinions?

-nc


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Roger Pau Monné <roger.pau@citrix.com>
Details
Message ID
<511DF6F5.3030105@citrix.com>
In-Reply-To
<20130215094038.7f847eaf@ncopa-desktop.alpinelinux.org> (view parent)
Sender timestamp
1360918261
DKIM signature
missing
Download raw message
On 15/02/13 09:40, Natanael Copa wrote:
> Hi,
> 
> We have a nice feature to download a file with a different name:
> 
>   source="saveas-http://$url/newfilename"
> 
> I have noticed that Arch Linux has something similar:
> 
>   source="newfilename::http://$url"
> 
> Do we want to change to same format?
> 
> Benefits:
> * Easier for Arch users to switch
> * Slightly more intuitive?

I have no stake in this, but I think the Arch format is more intuitive
than the one used in Alpine.

> Drawbacks:
> * abuild code probably gets messier
> * potensial scripts that parses APKBUILD and uses $source might break.
>   (i doubt there are any)
> 
> Opinions?
> 
> -nc
> 
> 
> ---
> Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
> Help:         alpine-devel+help@lists.alpinelinux.org
> ---
> 



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Details
Message ID
<6527a9010c5ab92eb8c2fe528bb6b06c@bsod.eu>
In-Reply-To
<511DF6F5.3030105@citrix.com> (view parent)
Sender timestamp
1360918653
DKIM signature
missing
Download raw message
Il 2013-02-15 09:51 Roger Pau Monné ha scritto:
> On 15/02/13 09:40, Natanael Copa wrote:
> 
> I have no stake in this, but I think the Arch format is more intuitive
> than the one used in Alpine.

I've the same opinion as Roger.
"newfile" is more immediate than "saveas".

My two cents.

-- 
:: Francesco ::
Blog.....http://fc1979.blogspot.com
Twit.....http://twitter.com/fcolista
Jabber...francesco@jabber.org
E-Mail...francesco@bsod.eu
AboutMe..http://about.me/fcolista


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20130215110618.6ce197b9@ncopa-desktop.alpinelinux.org>
In-Reply-To
<6527a9010c5ab92eb8c2fe528bb6b06c@bsod.eu> (view parent)
Sender timestamp
1360922778
DKIM signature
missing
Download raw message
On Fri, 15 Feb 2013 09:57:33 +0100
Francesco <francesco@bsod.eu> wrote:

> Il 2013-02-15 09:51 Roger Pau Monné ha scritto:
> > On 15/02/13 09:40, Natanael Copa wrote:
> > 
> > I have no stake in this, but I think the Arch format is more intuitive
> > than the one used in Alpine.
> 
> I've the same opinion as Roger.
> "newfile" is more immediate than "saveas".
> 
> My two cents.
> 

newfile was only an example.

Other example:

  source="saveas-https://https://github/bar/foo/archive/v1.0/foo-1.0.tar.gz"

vs.

  source="foo-1.0.tar.gz::https://github/bar/foo/archive/v1.0"

I somehow like the former variant because it is very easy to implement code:

  filename=${source##*/}

the latter would need some kind of conditional, if contains :: then, else...:

  case $source in
  *::*) filename=${source/::*/};;
  *) filename=${source##*/};;
  esac

I still think it might be worth do the change unless someone have strong opinions.

-nc


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)