Browse Source

Revert "Build-Target/package.sh: added capability to filter out development files while creating the binary package"

This reverts commit 95e731c6a7.
user/chris/test/arm
Nagy Károly Gábriel 13 years ago
parent
commit
6fa00f20bb
2 changed files with 6 additions and 44 deletions
  1. +5
    -42
      lib/sde-binary/package.sh
  2. +1
    -2
      scripts/Build-Target

+ 5
- 42
lib/sde-binary/package.sh

@ -3,7 +3,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: lib/sde-binary/package.sh
# Copyright (C) 2007 - 2012 The OpenSDE Project
# Copyright (C) 2007 - 2010 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
@ -31,14 +31,12 @@ Usage: ${0} --type [--versioned] [--root ] [--output ]
package name of the package
--versioned use package version in the resulting file name
--nodevel do not package development files
EOT
}
while [ $# -gt 0 ]; do
case "$1" in
--versioned) versioned=1 ;;
--nodevel) nodevel=1 ;;
--type) pkg_type="$2"; shift ;;
--root) root="$2"; shift ;;
--output) output="$2"; shift ;;
@ -91,51 +89,16 @@ mkdir -p "$output"
filename="$pkg_name${versioned:+-${version}}.$pkg_type"
flist="$root/var/adm/flists/$pkg_name"
tarfilename="$pkg_name${versioned:+-${version}}.tar"
tmpdir=$( mktemp -d "$SDEROOT/tmp/packaging.$pkg_name.XXXXXXXX" )
tmpflist="$tmpdir/var/adm/flists/$pkg_name"
tmpcksum="$tmpdir/var/adm/cksums/$pkg_name"
tmpmd5sum="$tmpdir/var/adm/md5sums/$pkg_name"
# creating backup of var/adm files
mkdir -p "$tmpdir"
for x in $( grep ' var/adm' "$flist" | cut -d' ' -f2- ); do
mkdir -p "$tmpdir/$(dirname $x)"
cp -a "$root/$x" "$tmpdir/$x"
done
# pattern to filter development files
if [ "$nodevel" ]; then
filterpattern="-e '/\.\(c\|h\|hpp\|hxx\|o\|a\|la\|m4\|pc\)$/d;'"
fi
if [ ! -z "$filterpattern" ]; then
eval "sed -i $filterpattern" "$tmpflist" "$tmpcksum" "$tmpmd5sum"
fi
# create uncompressed tar with the files from the sandbox but without var/adm
( grep -v ' var/adm' "$tmpflist" ) | cut -f2- -d' ' |
tar -C "$root" -cf "$output/$tarfilename.tmp" --no-recursion --files-from=-
errno=$?
# add adjusted var/adm files from tmpdir to the uncompressed tar
( grep ' var/adm' "$tmpflist" ) | cut -f2- -d' ' |
tar -C "$tmpdir" -rf "$output/$tarfilename.tmp" --no-recursion --files-from=-
errno=$?
# create the final compressed tar file
eval "$compressor --stdout $output/$tarfilename.tmp > $output/$filename.tmp"
( grep ' var/adm' "$flist"
grep -v ' var/adm' "$flist" ) | cut -f2- -d' ' |
tar -C "$root" -cf- --no-recursion --files-from=- |
$compressor > "$output/$filename.tmp"
errno=$?
if [ "$errno" != "0" ]; then
echo_error "failed to create '$output/$filename' (errno:$errno)"
rm -f "$output/$tarfilename.tmp"
rm -f "$output/$filename.tmp"
exit 4
else
rm -rf "$tmpdir"
rm -f "$output/$tarfilename.tmp"
mv "$output/$filename.tmp" "$output/$filename"
fi

+ 1
- 2
scripts/Build-Target

@ -3,7 +3,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: scripts/Build-Target
# Copyright (C) 2006 - 2012 The OpenSDE Project
# Copyright (C) 2006 - 2010 The OpenSDE Project
# Copyright (C) 2004 - 2006 The T2 SDE Project
# Copyright (C) 1998 - 2003 Clifford Wolf
#
@ -239,7 +239,6 @@ pkgloop_package() {
else
./lib/sde-binary/package.sh --type "$SDECFG_PKGFILE_TYPE" \
$( if [ "${SDECFG_PKGFILE_VER}" = 1 ]; then echo '--versioned'; fi ) \
$( if [ "${SDECFG_FILTER_NODEVEL}" = 1 ]; then echo '--nodevel'; fi ) \
--root "${build_root}" --output "${build_pkgs}" ${pkg_name}
fi
fi

Loading…
Cancel
Save