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 Pacman Development

 
 
LinkBack Thread Tools
 
Old 06-16-2008, 07:00 PM
 
Default makepkg.sh.in is now building splitted packages

From: Silvio fricke <silvio@port1024.net>

* it builds the packages in different directories
* repackaging works now

To activate this feature you only need a hook-variable "splitinstall" with all
function-names in it.
After performing of build(), it runs all functions in succession.

Signed-off-by: Silvio fricke <silvio@port1024.net>
---
scripts/makepkg.sh.in | 58 ++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 57 insertions(+), 1 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 5bdc5bc..3c0c6f7 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -675,6 +675,8 @@ run_build() {
mv "$BUILDLOG" "$BUILDLOG.$i"
fi

+ export BUILDLOG
+
build 2>&1 | tee "$BUILDLOG"; ret=${PIPESTATUS[0]}
else
build 2>&1 || ret=$?
@@ -1389,7 +1391,57 @@ if [ "$INFAKEROOT" = "1" ]; then
tidy_install
fi

- create_package
+ if [ "$splitinstall" != "" ] ; then
+ backup_o=$backup
+ conflicts_o=$conflicts
+ depends_o=$depends
+ groups_o=$groups
+ install_o=$install
+ license_o=$license
+ pkgdesc_o=$pkgdesc
+ pkgname_o=$pkgname
+ pkgver_o=$pkgver
+ provides_o=$provides
+ replaces_o=$replaces
+ url_o=$url
+ create_package
+ for it in "${splitinstall[@]}" ; do
+ if [ -d "$pkgdir" ]; then
+ msg "Removing existing pkg/ directory..."
+ rm -rf "$pkgdir"
+ fi
+ mkdir -p "$pkgdir"
+ msg "Building split package using function: $it"
+
+ if [ "$LOGGING" = "1" ]; then
+ [ "x$BUILDLOG" == "x" ] && BUILDLOG="${startdir}/${pkgname}-${pkgver}-${pkgrel}-${CARCH}.log"
+ echo >> "$BUILDLOG"
+ echo >> "$BUILDLOG"
+ echo "--- Logging for $it ------------" >> "$BUILDLOG"
+
+ $it 2>&1 | tee -a "$BUILDLOG"
+ else
+ $it 2>&1
+ fi
+
+ create_package
+ [ "$backup_o" != "" ] && backup=$backup_o || unset backup
+ [ "$conflicts_o" != "" ] && conflicts=$conflicts_o || unset conflicts
+ [ "$depends_o" != "" ] && depends=$depends_o || unset depends
+ [ "$groups_o" != "" ] && groups=$groups_o || unset groups
+ [ "$install_o" != "" ] && install=$install_o || unset install
+ [ "$license_o" != "" ] && license=$license_o || unset license
+ [ "$pkgdesc_o" != "" ] && pkgdesc=$pkgdesc_o || unset pkgdesc
+ [ "$pkgname_o" != "" ] && pkgname=$pkgname_o || unset pkgname
+ [ "$pkgver_o" != "" ] && pkgver=$pkgver_o || unset pkgver
+ [ "$provides_o" != "" ] && provides=$provides_o || unset provides
+ [ "$replaces_o" != "" ] && replaces=$replaces_o || unset replaces
+ [ "$url_o" != "" ] && url=$url_o || unset url
+ done
+ msg "All split packages built!"
+ else
+ create_package
+ fi

msg "$(gettext "Leaving fakeroot environment.")"
exit 0 # $E_OK
@@ -1459,6 +1511,10 @@ if [ "$NOEXTRACT" = "1" -o "$REPKG" = "1" ]; then
error "$(gettext "The source directory is empty, there is nothing to build!")"
plain "$(gettext "Aborting...")"
exit 1
+ elif [ "$splitinstall" != "" ]; then
+ error "$(gettext "Repacking with splittet Packages are not supported")"
+ plain "$(gettext "Aborting...")"
+ exit 1
elif [ "$REPKG" = "1" -a ( ! -d "$pkgdir" -o "$(ls "$pkgdir" 2>/dev/null)" = "" ) ]; then
error "$(gettext "The package directory is empty, there is nothing to repackage!")"
plain "$(gettext "Aborting...")"
--
1.5.5.3


_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 06-16-2008, 07:03 PM
 
Default makepkg.sh.in is now building splitted packages

From: Silvio fricke <silvio@port1024.net>

* it builds the packages in different directories
* repackaging works now

To activate this feature you only need a hook-variable "splitinstall" with all
function-names in it.
After performing of build(), it runs all functions in succession.

Signed-off-by: Silvio fricke <silvio@port1024.net>
---
scripts/makepkg.sh.in | 58 ++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 57 insertions(+), 1 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 5bdc5bc..3c0c6f7 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -675,6 +675,8 @@ run_build() {
mv "$BUILDLOG" "$BUILDLOG.$i"
fi

+ export BUILDLOG
+
build 2>&1 | tee "$BUILDLOG"; ret=${PIPESTATUS[0]}
else
build 2>&1 || ret=$?
@@ -1389,7 +1391,57 @@ if [ "$INFAKEROOT" = "1" ]; then
tidy_install
fi

- create_package
+ if [ "$splitinstall" != "" ] ; then
+ backup_o=$backup
+ conflicts_o=$conflicts
+ depends_o=$depends
+ groups_o=$groups
+ install_o=$install
+ license_o=$license
+ pkgdesc_o=$pkgdesc
+ pkgname_o=$pkgname
+ pkgver_o=$pkgver
+ provides_o=$provides
+ replaces_o=$replaces
+ url_o=$url
+ create_package
+ for it in "${splitinstall[@]}" ; do
+ if [ -d "$pkgdir" ]; then
+ msg "Removing existing pkg/ directory..."
+ rm -rf "$pkgdir"
+ fi
+ mkdir -p "$pkgdir"
+ msg "Building split package using function: $it"
+
+ if [ "$LOGGING" = "1" ]; then
+ [ "x$BUILDLOG" == "x" ] && BUILDLOG="${startdir}/${pkgname}-${pkgver}-${pkgrel}-${CARCH}.log"
+ echo >> "$BUILDLOG"
+ echo >> "$BUILDLOG"
+ echo "--- Logging for $it ------------" >> "$BUILDLOG"
+
+ $it 2>&1 | tee -a "$BUILDLOG"
+ else
+ $it 2>&1
+ fi
+
+ create_package
+ [ "$backup_o" != "" ] && backup=$backup_o || unset backup
+ [ "$conflicts_o" != "" ] && conflicts=$conflicts_o || unset conflicts
+ [ "$depends_o" != "" ] && depends=$depends_o || unset depends
+ [ "$groups_o" != "" ] && groups=$groups_o || unset groups
+ [ "$install_o" != "" ] && install=$install_o || unset install
+ [ "$license_o" != "" ] && license=$license_o || unset license
+ [ "$pkgdesc_o" != "" ] && pkgdesc=$pkgdesc_o || unset pkgdesc
+ [ "$pkgname_o" != "" ] && pkgname=$pkgname_o || unset pkgname
+ [ "$pkgver_o" != "" ] && pkgver=$pkgver_o || unset pkgver
+ [ "$provides_o" != "" ] && provides=$provides_o || unset provides
+ [ "$replaces_o" != "" ] && replaces=$replaces_o || unset replaces
+ [ "$url_o" != "" ] && url=$url_o || unset url
+ done
+ msg "All split packages built!"
+ else
+ create_package
+ fi

msg "$(gettext "Leaving fakeroot environment.")"
exit 0 # $E_OK
@@ -1459,6 +1511,10 @@ if [ "$NOEXTRACT" = "1" -o "$REPKG" = "1" ]; then
error "$(gettext "The source directory is empty, there is nothing to build!")"
plain "$(gettext "Aborting...")"
exit 1
+ elif [ "$splitinstall" != "" ]; then
+ error "$(gettext "Repacking with splittet Packages are not supported")"
+ plain "$(gettext "Aborting...")"
+ exit 1
elif [ "$REPKG" = "1" -a ( ! -d "$pkgdir" -o "$(ls "$pkgdir" 2>/dev/null)" = "" ) ]; then
error "$(gettext "The package directory is empty, there is nothing to repackage!")"
plain "$(gettext "Aborting...")"
--
1.5.5.3


_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 06-16-2008, 07:06 PM
 
Default makepkg.sh.in is now building splitted packages

From: Silvio fricke <silvio@port1024.net>

* it builds the packages in different directories
* repackaging works now

To activate this feature you only need a hook-variable "splitinstall" with all
function-names in it.
After performing of build(), it runs all functions in succession.

Signed-off-by: Silvio fricke <silvio@port1024.net>
---
scripts/makepkg.sh.in | 57 +++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 55 insertions(+), 2 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 5bdc5bc..c96b9fb 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -675,6 +675,8 @@ run_build() {
mv "$BUILDLOG" "$BUILDLOG.$i"
fi

+ export BUILDLOG
+
build 2>&1 | tee "$BUILDLOG"; ret=${PIPESTATUS[0]}
else
build 2>&1 || ret=$?
@@ -1389,7 +1391,38 @@ if [ "$INFAKEROOT" = "1" ]; then
tidy_install
fi

- create_package
+ if [ "$splitinstall" != "" ] ; then
+ for varname in "pkgname" "pkgver" "pkgrel" "pkgdesc" "arch" "url" "license" "groups" "depends" "makedepends" "provides" "conflicts" "replaces" "backup" "options" "install" "pkgdir"; do
+ temp_var_name="${varname}_o"
+ eval "${temp_var_name}="${!varname}""
+ done
+
+ create_package
+ for it in "${splitinstall[@]}" ; do
+ pkgdir="$startdir/pkg_${it}"
+ [ ! -d "$pkgdir" ] && mkdir -p "$pkgdir"
+ msg "$(gettext "Building split package using function: %s")" "$it"
+
+ if [ "$LOGGING" = "1" ]; then
+ [ "x$BUILDLOG" == "x" ] && BUILDLOG="${startdir}/${pkgname}-${pkgver}-${pkgrel}-${CARCH}.log"
+ echo "

--- Logging for $it ------------" >> "$BUILDLOG"
+
+ $it 2>&1 | tee -a "$BUILDLOG"
+ else
+ $it 2>&1
+ fi
+
+ create_package
+
+ for varname in "pkgname" "pkgver" "pkgrel" "pkgdesc" "arch" "url" "license" "groups" "depends" "makedepends" "provides" "conflicts" "replaces" "backup" "options" "install" "pkgdir"; do
+ temp_var_name="${varname}_o"
+ [ "${!temp_var_name}" != "" ] && eval "${varname}="${!temp_var_name}"" || unset ${varname}
+ done
+ done
+ msg "$(gettext "All split packages built!")"
+ else
+ create_package
+ fi

msg "$(gettext "Leaving fakeroot environment.")"
exit 0 # $E_OK
@@ -1459,6 +1492,20 @@ if [ "$NOEXTRACT" = "1" -o "$REPKG" = "1" ]; then
error "$(gettext "The source directory is empty, there is nothing to build!")"
plain "$(gettext "Aborting...")"
exit 1
+ elif [ "$splitinstall" != "" ]; then
+ for fun in "${splitinstall[@]}"; do
+ pkgdir_fun="$startdir/pkg_${fun}"
+ exit_now=0
+ if [ ! -d "$pkgdir_fun" -o "$(ls "$pkgdir_fun" 2>/dev/null)" = "" ]; then
+ warning "$(gettext "The subpackage directory %s is empty, there is nothing to repackage!")" "$pkgdir_fun"
+ pwd
+ exit_now=1
+ fi
+ if [ $exit_now -eq 1 ]; then
+ error "$(gettext "Aborting...")"
+ exit 1
+ fi
+ done
elif [ "$REPKG" = "1" -a ( ! -d "$pkgdir" -o "$(ls "$pkgdir" 2>/dev/null)" = "" ) ]; then
error "$(gettext "The package directory is empty, there is nothing to repackage!")"
plain "$(gettext "Aborting...")"
@@ -1475,9 +1522,15 @@ if [ "$NOBUILD" = "1" ]; then
exit 0 #E_OK
else
# check for existing pkg directory; don't remove if we are repackaging
- if [ -d "$pkgdir" -a "$REPKG" = "0" ]; then
+ if [ -d "$pkgdir" -a "$REPKG" = "0" -a "$splitinstall" == "" ]; then
msg "$(gettext "Removing existing pkg/ directory...")"
rm -rf "$pkgdir"
+ elif [ "$splitinstall" != "" -a "$REPKG" = "0" ]; then
+ for fun in "${splitinstall[@]}"; do
+ pkgdir_fun="$startdir/pkg_${fun}"
+ msg "$(gettext "Removing existing %s directory...")" "$pkgdir_fun"
+ rm -rf "$pkgdir_fun"
+ done
fi
mkdir -p "$pkgdir"
cd "$startdir"
--
1.5.5.3


_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 

Thread Tools




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

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