Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   ArchLinux Pacman Development (http://www.linux-archive.org/archlinux-pacman-development/)
-   -   makepkg: always use pkg/$pkgname as $pkgdir (http://www.linux-archive.org/archlinux-pacman-development/706645-makepkg-always-use-pkg-pkgname-pkgdir.html)

Allan McRae 09-23-2012 02:44 PM

makepkg: always use pkg/$pkgname as $pkgdir
 
Unify split and single packages to always use a folder within pkg/
as thier $pkgdir. This will allow a folder for storing a package with
stripped debug symbols to be added within pkg/ too.

Signed-off-by: Allan McRae <allan@archlinux.org>
---
scripts/makepkg.sh.in | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 5283d73..c857060 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -2678,6 +2678,9 @@ if (( INFAKEROOT )); then
fi

if (( ! SPLITPKG )); then
+ pkgdir="$pkgdir/$pkgname"
+ mkdir -p "$pkgdir"
+ chmod a-s "$pkgdir"
if (( ! PKGFUNC )); then
if (( ! REPKG )); then
if (( BUILDFUNC )); then
@@ -2693,6 +2696,7 @@ if (( INFAKEROOT )); then
fi
tidy_install
create_package
+ pkgdir="${pkgdir%/*}"
else
run_split_packaging
fi
@@ -2819,6 +2823,9 @@ else
(( CHECKFUNC )) && run_check
fi
if (( ! SPLITPKG )); then
+ pkgdir="$pkgdir/$pkgname"
+ mkdir -p "$pkgdir"
+ chmod a-s "$pkgdir"
if (( PKGFUNC )); then
run_package
elif (( REPKG )); then
@@ -2827,6 +2834,7 @@ else
fi
tidy_install
create_package
+ pkgdir="${pkgdir%/*}"
else
run_split_packaging
fi
--
1.7.12.1

Dave Reisner 09-23-2012 03:55 PM

makepkg: always use pkg/$pkgname as $pkgdir
 
On Mon, Sep 24, 2012 at 12:44:32AM +1000, Allan McRae wrote:
> Unify split and single packages to always use a folder within pkg/
> as thier $pkgdir. This will allow a folder for storing a package with
> stripped debug symbols to be added within pkg/ too.
>
> Signed-off-by: Allan McRae <allan@archlinux.org>
> ---
> scripts/makepkg.sh.in | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> index 5283d73..c857060 100644
> --- a/scripts/makepkg.sh.in
> +++ b/scripts/makepkg.sh.in
> @@ -2678,6 +2678,9 @@ if (( INFAKEROOT )); then
> fi
>
> if (( ! SPLITPKG )); then
> + pkgdir="$pkgdir/$pkgname"
> + mkdir -p "$pkgdir"
> + chmod a-s "$pkgdir"

Can't we just use mkdir's -m flag here? It's specified by POSIX.

> if (( ! PKGFUNC )); then
> if (( ! REPKG )); then
> if (( BUILDFUNC )); then
> @@ -2693,6 +2696,7 @@ if (( INFAKEROOT )); then
> fi
> tidy_install
> create_package
> + pkgdir="${pkgdir%/*}"
> else
> run_split_packaging
> fi
> @@ -2819,6 +2823,9 @@ else
> (( CHECKFUNC )) && run_check
> fi
> if (( ! SPLITPKG )); then
> + pkgdir="$pkgdir/$pkgname"
> + mkdir -p "$pkgdir"
> + chmod a-s "$pkgdir"

And here...

> if (( PKGFUNC )); then
> run_package
> elif (( REPKG )); then
> @@ -2827,6 +2834,7 @@ else
> fi
> tidy_install
> create_package
> + pkgdir="${pkgdir%/*}"
> else
> run_split_packaging
> fi
> --
> 1.7.12.1
>
>

Allan McRae 09-23-2012 11:51 PM

makepkg: always use pkg/$pkgname as $pkgdir
 
On 24/09/12 01:55, Dave Reisner wrote:
>> + pkgdir="$pkgdir/$pkgname"
>> > + mkdir -p "$pkgdir"
>> > + chmod a-s "$pkgdir"
> Can't we just use mkdir's -m flag here? It's specified by POSIX.
>

Note this is used in multiple other places in makepkg. I seem to recall
we did not use the "-m" flag for some reason, but I can not remember
why. Maybe Dan can shed some light here?

Anyway, I have just realized we only need it on the creation of $srcdir
and $startdir/pkg. All directories created within them have no need for
it...

Allan


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

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