# HG changeset patch # User Christopher Rogers # Date 1337963641 0 # Node ID 24c740e5188abbe5397cb68bf150e401113aa3c7 # Parent 32b585eb6cbe0882492bececb40af4cc986f846d libpkg.sh: Move source_receipt function in spk-ls to libpkg.sh. Source /lib/libtaz.sh in libpkg.sh so source_receipt function will work no matter what. diff -r 32b585eb6cbe -r 24c740e5188a rootfs/usr/lib/slitaz/libpkg.sh --- a/rootfs/usr/lib/slitaz/libpkg.sh Fri May 25 00:20:50 2012 +0200 +++ b/rootfs/usr/lib/slitaz/libpkg.sh Fri May 25 16:34:01 2012 +0000 @@ -8,6 +8,8 @@ # Copyright (C) 2012 SliTaz GNU/Linux - BSD License # +. /lib/libtaz.sh + # Unset all receipt variables. unset_receipt() { unset PACKAGE VERSION EXTRAVERSION SHORT_DESC HOST_ARCH TARBALL \ @@ -37,6 +39,18 @@ fi } +# Source a package receipt +source_receipt() { + local receipt=$1 + if [ ! -f $receipt ]; then + echo -n $(colorize 31 "$pkg") + indent 28 $(gettext "missing receipt") + continue + else + . $receipt + fi +} + # # Do we realy need the code below here ??? #