From a31a003a63af94f0ab03e169e4c97eb5190d190a Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 13 Dec 2008 08:44:51 +0100 Subject: [PATCH] Create binpkgs for meta-template packages. --HG-- extra : convert_revision : fdf26fe45ee1b5ecb2d32a7e72e2b83c8ee02f5a --- utils/sh/binpkg.sh | 6 ++++++ utils/sh/pkgtarget_funcs.sh | 22 ---------------------- utils/sh/stow_funcs.sh | 14 +++++--------- xbps.sh | 1 - 4 files changed, 11 insertions(+), 32 deletions(-) diff --git a/utils/sh/binpkg.sh b/utils/sh/binpkg.sh index 2db3776995d..a77949d9ddb 100644 --- a/utils/sh/binpkg.sh +++ b/utils/sh/binpkg.sh @@ -62,6 +62,12 @@ xbps_write_metadata_pkg() $(uname -m) installed_size $(du -sb $destdir|awk '{print $1}') + maintainer + $maintainer + short_desc + $short_desc + long_desc + $long_desc _EOF # Dependencies if [ -n "$run_depends" ]; then diff --git a/utils/sh/pkgtarget_funcs.sh b/utils/sh/pkgtarget_funcs.sh index 138de69221a..e9e522883e1 100644 --- a/utils/sh/pkgtarget_funcs.sh +++ b/utils/sh/pkgtarget_funcs.sh @@ -108,19 +108,6 @@ install_pkg() . $XBPS_SHUTILSDIR/install_funcs.sh install_src_phase - # - # Just register meta-template and exit. - # - if [ "$build_style" = "meta-template" ]; then - $XBPS_PKGDB_CMD register $pkgname $version "$short_desc" - if [ $? -eq 0 ]; then - msg_normal "Installed meta-template: $pkg." - return 0 - else - return 1 - fi - fi - # # Do not stow package if it wasn't requested. # @@ -162,15 +149,6 @@ remove_pkg() . $XBPS_TEMPLATESDIR/$pkg.tmpl - # - # If it's a meta-template, just unregister it from the db. - # - if [ "$build_style" = "meta-template" ]; then - $XBPS_PKGDB_CMD unregister $pkgname $version - [ $? -eq 0 ] && msg_normal "Removed meta-template: $pkg." - return $? - fi - ver=$($XBPS_PKGDB_CMD version $pkg) [ -z "$ver" ] && msg_error "$pkg is not installed." diff --git a/utils/sh/stow_funcs.sh b/utils/sh/stow_funcs.sh index df461996a9b..a294797c8b5 100644 --- a/utils/sh/stow_funcs.sh +++ b/utils/sh/stow_funcs.sh @@ -34,16 +34,17 @@ stow_pkg() [ -z "$pkg" ] && return 2 + if [ "$build_style" = "meta-template" ]; then + [ ! -d $XBPS_DESTDIR/$pkgname-$version ] && \ + mkdir -p $XBPS_DESTDIR/$pkgname-$version + fi + if [ -n "$stow_flag" ]; then pkg=$XBPS_TEMPLATESDIR/$pkg.tmpl if [ "$pkgname" != "$pkg" ]; then . $pkg fi pkg=$pkgname-$version - # - # You cannot stow a meta-template. - # - [ "$build_style" = "meta-template" ] && return 0 fi cd $XBPS_DESTDIR/$pkgname-$version || exit 1 @@ -103,11 +104,6 @@ unstow_pkg() msg_error "$pkg is not installed." fi - # - # You cannot unstow a meta-template. - # - [ "$build_style" = "meta-template" ] && return 0 - cd $XBPS_PKGMETADIR/$pkgname-$version || exit 1 if [ ! -f flist ]; then msg_error "$pkg is incomplete, missing flist." diff --git a/xbps.sh b/xbps.sh index 8f49cbc3bf1..e3205517f4e 100755 --- a/xbps.sh +++ b/xbps.sh @@ -278,7 +278,6 @@ build-pkg) if [ "$2" = "all" ]; then for f in $($XBPS_PKGDB_CMD list|awk '{print $1}'); do setup_tmpl $f - [ "$build_style" = "meta-template" ] && continue xbps_make_binpkg reset_tmpl_vars done