Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   ArchLinux User Repository (http://www.linux-archive.org/archlinux-user-repository/)
-   -   PKGBUILD with depending _pkgver (http://www.linux-archive.org/archlinux-user-repository/646899-pkgbuild-depending-_pkgver.html)

Maximilian Bräutigam 03-20-2012 04:44 PM

PKGBUILD with depending _pkgver
 
Hi all,

recently, I wrote an ebuild where pkgver=2.4.2 but in the download link
a 242 is needed. Thus, I decided to avoid any redundancy and to write
_pkgver="${pkgver//./}". The PKGBUILD is working fine but
aur.archlinux.org is expanding the download link to "2.4.2//./}".


Is there a way to avoid both the redundancy and the wrong interpretation
at aur.archlinux.org?


This is the package we are talking about:
https://aur.archlinux.org/packages.php?ID=34230

Kind regards,
Max

小龙 陈 03-20-2012 06:08 PM

PKGBUILD with depending _pkgver
 
As far as I know, you'll have to write the package version twice.
The AUR reads the PKGBUILD's directly, not with bash (security
concerns). Right now, the AUR only supports variables with the
name only (i.e. $blah or ${blah}).

Regards,
Xiao-Long Chen

> Date: Tue, 20 Mar 2012 18:44:43 +0100
> From: m@xbra.de
> To: aur-general@archlinux.org
> Subject: [aur-general] PKGBUILD with depending _pkgver
>
> Hi all,
>
> recently, I wrote an ebuild where pkgver=2.4.2 but in the download link
> a 242 is needed. Thus, I decided to avoid any redundancy and to write
> _pkgver="${pkgver//./}". The PKGBUILD is working fine but
> aur.archlinux.org is expanding the download link to "2.4.2//./}".
>
> Is there a way to avoid both the redundancy and the wrong interpretation
> at aur.archlinux.org?
>
> This is the package we are talking about:
> https://aur.archlinux.org/packages.php?ID=34230
>
> Kind regards,
> Max

Martti Kühne 03-20-2012 08:52 PM

PKGBUILD with depending _pkgver
 
On Tue, Mar 20, 2012 at 06:44:43PM +0100, Maximilian Bräutigam wrote:
> Is there a way to avoid both the redundancy and the wrong
> interpretation at aur.archlinux.org?
>
> This is the package we are talking about:
> https://aur.archlinux.org/packages.php?ID=34230

suggestion: use the parameter expansion in the source url only?

source=("http://my.domain.org/my/package-${pkgver//./}.tar.gz")
...or would this be too obvious?
saves you ... a line of code. :)

cheers!
mar77i

rafael ff1 03-20-2012 09:34 PM

PKGBUILD with depending _pkgver
 
2012/3/20 Martti Kühne <mysatyre@gmail.com>:
> On Tue, Mar 20, 2012 at 06:44:43PM +0100, Maximilian Bräutigam wrote:
>> Is there a way to avoid both the redundancy and the wrong
>> interpretation at aur.archlinux.org?
>>
>> This is the package we are talking about:
>> https://aur.archlinux.org/packages.php?ID=34230
>
> suggestion: use the parameter expansion in the source url only?
>
> source=("http://my.domain.org/my/package-${pkgver//./}.tar.gz")
> ...or would this be too obvious?
> saves you ... a line of code. :)
>
> cheers!
> mar77i

This will display a weird source URL line in AUR interface, and that's
what the author of the thread want's to avoid. Therefore, not that
obvious.

Rafael

Martti Kühne 03-21-2012 08:22 AM

PKGBUILD with depending _pkgver
 
On Tue, Mar 20, 2012 at 07:34:52PM -0300, rafael ff1 wrote:
> This will display a weird source URL line in AUR interface, and that's
> what the author of the thread want's to avoid. Therefore, not that
> obvious.


in the end, it's the aur's problem, not the packager's.

cheers!
mar77i

rafael ff1 03-21-2012 01:18 PM

PKGBUILD with depending _pkgver
 
2012/3/21 Martti Kühne <mysatyre@gmail.com>:
> On Tue, Mar 20, 2012 at 07:34:52PM -0300, rafael ff1 wrote:
>> This will display a weird source URL line in AUR interface, and that's
>> what the author of the thread want's to avoid. Therefore, not that
>> obvious.
>
>
> in the end, it's the aur's problem, not the packager's.
>
> cheers!
> mar77i

Sort of. If the maintainer knows this issue, he/she can avoid it. So,
IMO, the problem is the maintainer's, in the end.

Of course this is not a big issue, but if i can choose to solve this
issue with one more line in the PKGBUILD, I prefer to do it than mess
the displayed source url.

Rafael


All times are GMT. The time now is 01:03 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.