Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   ArchLinux General Discussion (http://www.linux-archive.org/archlinux-general-discussion/)
-   -   Do not refer to $startdir/{src, pkg} in PKGBUILDs (http://www.linux-archive.org/archlinux-general-discussion/383443-do-not-refer-startdir-src-pkg-pkgbuilds.html)

Andres P 06-09-2010 12:28 AM

Do not refer to $startdir/{src, pkg} in PKGBUILDs
 
2010/6/8 Allan McRae <allan@archlinux.org>:
> It is very rare that you should ever need to use $startdir in a PKGBUILD at
> all.

I exclude config.h from dwm's PKGBUILD $source array and copy it from
$startdir during build().

It's changed constantly so keeping it summed check is awkward, and I
don't want to loose the sumcheck for the rest of sources.

Maybe $sources should have a per entry ! or @ prefix that disables sum
checks for that file.

This could be extended to make one of the " !@" chars skip extraction,
since duplicating the filenames in $noextract is less practical.

Andres P

Andres P 06-09-2010 12:38 AM

Do not refer to $startdir/{src, pkg} in PKGBUILDs
 
On Tue, Jun 8, 2010 at 8:03 PM, <d@falconindy.com> wrote:
> On Tue, Jun 08, 2010 at 07:58:55PM -0430, Andres P wrote:
>> 2010/6/8 Allan McRae <allan@archlinux.org>:
>> > It is very rare that you should ever need to use $startdir in a PKGBUILD at
>> > all.
>>
>> I exclude config.h from dwm's PKGBUILD $source array and copy it from
>> $startdir during build().
>>
>> It's changed constantly so keeping it summed check is awkward, and I
>> don't want to loose the sumcheck for the rest of sources.
>>
>> Maybe $sources should have a per entry ! or @ prefix that disables sum
>> checks for that file.
>>
>> This could be extended to make one of the " !@" chars skip extraction,
>> since duplicating the filenames in $noextract is less practical.
>>
>> Andres P
>
> Rebuilding as 'makepkg -efi' means that checksums are skipped since
> you're asking makepkg to use what's already extracted in $srcdir
>
> d
>

That does not account for PKGBUILD updates, namely $pkgver changes.

bsdtar will overwrite config.h with the new extracted tar's contents

If makepkg were as fluid as /usr/share/mk in *BSD, this wouldn't be
such an issue. ;)

Andres P

Andres P 06-09-2010 03:55 AM

Do not refer to $startdir/{src, pkg} in PKGBUILDs
 
On Tue, Jun 8, 2010 at 11:02 PM, Allan McRae <allan@archlinux.org> wrote:
> On 09/06/10 10:38, Andres P wrote:
>>
>> If makepkg were as fluid as /usr/share/mk in *BSD, this wouldn't be
>> such an issue. ;)
>
> I have no idea what /usr/share/mk does in this regards so you will need to
> explain more.
>

In *bsd, make sources from /usr/share/mk for packages in core/base,
and in /usr/share/pkgsrc/mk (in netbsd; freebsd and obsd use
..ports/{Mk,infastructure}). This effectively couples make timestamp
based builds with a nice library to handle all types of states.

They have different identifiers and directories for distfiles,
patches, and src files that directly reside in the ports db. The
latter being the equivalent for source=() files in arch that get
copied from $startdir. Their Makefiles are fully reentrant if you
peruse these vars instead of using a giant source=() inclusion.

The sum check is specified in another file, like Crux's .md5sums.

Taking this in mind, I can declare config.h outside the distfiles
directory and still have it copied to ./src, have the other files
still be sum checked, and independantly build from extracted sources
or decide to untar from scratch...

Andres P


All times are GMT. The time now is 10:24 AM.

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