FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux General Discussion

 
 
LinkBack Thread Tools
 
Old 09-17-2010, 01:35 PM
Lukas Fleischer
 
Default "$startdir/src", "$startdir/pkg" and "|| return 1" in official packages

Although this isn't really significant... I was just curious

`grep '${?startdir}?/src' /var/abs/*/*/PKGBUILD | wc -l` - "648"

`grep '${?startdir}?/pkg' /var/abs/*/*/PKGBUILD | wc -l` - "1385"

`fgrep '|| return 1' /var/abs/*/*/PKGBUILD | wc -l` - "9274"

Isn't that something that could be fixed easily using sed(1)/awk(1)?
E.g. using:

`find . -name 'PKGBUILD' -exec sed -i 's/$startdir/src/$srcdir/g;
s/${startdir}/src/${srcdir}/g; s/$startdir/pkg/$pkgdir/g;
s/${startdir}/pkg/${pkgdir}/g' {} ';'`

... to replace all that "$startdir/[...]" stuff?
 
Old 09-17-2010, 01:45 PM
Steve Holmes
 
Default "$startdir/src", "$startdir/pkg" and "|| return 1" in official packages

On Fri, Sep 17, 2010 at 03:35:58PM +0200, Lukas Fleischer wrote:
> Although this isn't really significant... I was just curious
>
> `grep '${?startdir}?/src' /var/abs/*/*/PKGBUILD | wc -l` - "648"
>
> `grep '${?startdir}?/pkg' /var/abs/*/*/PKGBUILD | wc -l` - "1385"
>
> `fgrep '|| return 1' /var/abs/*/*/PKGBUILD | wc -l` - "9274"
>
> Isn't that something that could be fixed easily using sed(1)/awk(1)?
> E.g. using:
>
> `find . -name 'PKGBUILD' -exec sed -i 's/$startdir/src/$srcdir/g;
> s/${startdir}/src/${srcdir}/g; s/$startdir/pkg/$pkgdir/g;
> s/${startdir}/pkg/${pkgdir}/g' {} ';'`
>
> ... to replace all that "$startdir/[...]" stuff?

Sounds good conceptionally to me. However, wouldn't you need to
escape the '$' signs as well? With regexp, the '$' means the end of
the expression string.
 
Old 09-17-2010, 01:53 PM
Allan McRae
 
Default "$startdir/src", "$startdir/pkg" and "|| return 1" in official packages

On 17/09/10 23:35, Lukas Fleischer wrote:

Although this isn't really significant... I was just curious

`grep '${?startdir}?/src' /var/abs/*/*/PKGBUILD | wc -l` - "648"

`grep '${?startdir}?/pkg' /var/abs/*/*/PKGBUILD | wc -l` - "1385"

`fgrep '|| return 1' /var/abs/*/*/PKGBUILD | wc -l` - "9274"

Isn't that something that could be fixed easily using sed(1)/awk(1)?
E.g. using:

`find . -name 'PKGBUILD' -exec sed -i 's/$startdir/src/$srcdir/g;
s/${startdir}/src/${srcdir}/g; s/$startdir/pkg/$pkgdir/g;
s/${startdir}/pkg/${pkgdir}/g' {} ';'`

... to replace all that "$startdir/[...]" stuff?



Well, it would need to be done on SVN trunk and released to the repo
branches... so it is not just a simple sed.


Anyway, whats the rush? They will change eventually. There should be
no (or very few) $startdir/{src,pkg} in [core].


Allan
 
Old 09-17-2010, 01:54 PM
Ionuț Bîru
 
Default "$startdir/src", "$startdir/pkg" and "|| return 1" in official packages

On 09/17/2010 04:35 PM, Lukas Fleischer wrote:

Although this isn't really significant... I was just curious

`grep '${?startdir}?/src' /var/abs/*/*/PKGBUILD | wc -l` - "648"

`grep '${?startdir}?/pkg' /var/abs/*/*/PKGBUILD | wc -l` - "1385"

`fgrep '|| return 1' /var/abs/*/*/PKGBUILD | wc -l` - "9274"

Isn't that something that could be fixed easily using sed(1)/awk(1)?
E.g. using:

`find . -name 'PKGBUILD' -exec sed -i 's/$startdir/src/$srcdir/g;
s/${startdir}/src/${srcdir}/g; s/$startdir/pkg/$pkgdir/g;
s/${startdir}/pkg/${pkgdir}/g' {} ';'`

... to replace all that "$startdir/[...]" stuff?


we don't have to rush things like this. eventually everything would be
all right with time when the packages are updated/rebuilt.


--
Ionuț
 
Old 09-17-2010, 01:59 PM
甘露(Gan Lu)
 
Default "$startdir/src", "$startdir/pkg" and "|| return 1" in official packages

On Fri, Sep 17, 2010 at 9:54 PM, Ionuț Bîru <ibiru@archlinux.org> wrote:
> On 09/17/2010 04:35 PM, Lukas Fleischer wrote:
>>
>> Although this isn't really significant... I was just curious
>>
>> `grep '${?startdir}?/src' /var/abs/*/*/PKGBUILD | wc -l` - "648"
>>
>> `grep '${?startdir}?/pkg' /var/abs/*/*/PKGBUILD | wc -l` - "1385"
>>
>> `fgrep '|| return 1' /var/abs/*/*/PKGBUILD | wc -l` - "9274"
>>
>> Isn't that something that could be fixed easily using sed(1)/awk(1)?
>> E.g. using:
>>
>> `find . -name 'PKGBUILD' -exec sed -i 's/$startdir/src/$srcdir/g;
>> s/${startdir}/src/${srcdir}/g; s/$startdir/pkg/$pkgdir/g;
>> s/${startdir}/pkg/${pkgdir}/g' {} ';'`
>>
>> ... to replace all that "$startdir/[...]" stuff?
>
> we don't have to rush things like this. eventually everything would be all
> right with time when the packages are updated/rebuilt.
So it's more convincing if someone will calculate this the next year.
>
> --
> Ionuț
>
 
Old 09-17-2010, 02:07 PM
Lukas Fleischer
 
Default "$startdir/src", "$startdir/pkg" and "|| return 1" in official packages

> Well, it would need to be done on SVN trunk and released to the repo
> branches... so it is not just a simple sed.

Mh, yeah. But that shouldn't be too difficult to script either (e.g.
using a for loop and running scp(1) and archrelease for every package).

> Anyway, whats the rush? They will change eventually. There should
> be no (or very few) $startdir/{src,pkg} in [core].

As I already said at the beginning:

> Although this isn't really significant... I was just curious

Just thought that might be an easy way to clean up and unify packages a
bit.
 
Old 09-17-2010, 02:14 PM
Dieter Plaetinck
 
Default "$startdir/src", "$startdir/pkg" and "|| return 1" in official packages

On Fri, 17 Sep 2010 16:07:30 +0200
Lukas Fleischer <archlinux@cryptocrack.de> wrote:


> > Anyway, whats the rush? They will change eventually. There should
> > be no (or very few) $startdir/{src,pkg} in [core].
>
> As I already said at the beginning:
>
> > Although this isn't really significant... I was just curious
>
> Just thought that might be an easy way to clean up and unify packages
> a bit.

If a fix can be applied on all packages at once, that seems more
efficient and less error-prone to me. But I'm not a packager, so do
what you want

Dieter
 
Old 09-17-2010, 02:18 PM
Dan McGee
 
Default "$startdir/src", "$startdir/pkg" and "|| return 1" in official packages

On Fri, Sep 17, 2010 at 9:14 AM, Dieter Plaetinck <dieter@plaetinck.be> wrote:
> On Fri, 17 Sep 2010 16:07:30 +0200
> Lukas Fleischer <archlinux@cryptocrack.de> wrote:
>
>
>> > Anyway, whats the rush? *They will change eventually. *There should
>> > be no (or very few) $startdir/{src,pkg} in [core].
>>
>> As I already said at the beginning:
>>
>> > Although this isn't really significant... I was just curious
>>
>> Just thought that might be an easy way to clean up and unify packages
>> a bit.
>
> If a fix can be applied on all packages at once, that seems more
> efficient and less error-prone to me. *But I'm not a packager, so do
> what you want

I wouldn't object to doing this to everything in trunk/, but we
shouldn't push those changes out to the repos/ unless the package
actually gets rebuilt. Those should reflect the current state of the
package as much as possible.

-Dan
 
Old 09-17-2010, 02:27 PM
Lukas Fleischer
 
Default "$startdir/src", "$startdir/pkg" and "|| return 1" in official packages

On Fri, Sep 17, 2010 at 09:18:41AM -0500, Dan McGee wrote:
> I wouldn't object to doing this to everything in trunk/, but we
> shouldn't push those changes out to the repos/ unless the package
> actually gets rebuilt. Those should reflect the current state of the
> package as much as possible.

I agree.

And imho replacing deprecated "$startdir" and "|| return 1" statements
are the kind of things people always tend to forget... Even when
rebuilding packages. So I don't see any reason why this shouldn't be
done automatically if it's that easy...
 
Old 09-17-2010, 02:40 PM
Vitaliy Berdinskikh UR6LAD
 
Default "$startdir/src", "$startdir/pkg" and "|| return 1" in official packages

> Although this isn't really significant... I was just curious
>
> `grep '${?startdir}?/src' /var/abs/*/*/PKGBUILD | wc -l` - "648"
>
> `grep '${?startdir}?/pkg' /var/abs/*/*/PKGBUILD | wc -l` - "1385"
>
> `fgrep '|| return 1' /var/abs/*/*/PKGBUILD | wc -l` - "9274"

Why ' || return 1' is deprecated?

-- реклама -----------------------------------------------------------
Три новые линейки хостинг-планов - всё что нужно Вашему сайту!
6 месяцев хостинга бесплатно и домен в подарок. http://Hvosting.ua
 

Thread Tools




All times are GMT. The time now is 12:48 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org