Re: pkgselect.sh and pkginstall.sh

Miłosz Gałązka <[email protected]>
Newsgroups gmane.os.freebsd.freesbie
Message-ID <[email protected]>
2005/12/23, Dario Freni <[email protected]>:
> On Fri, Dec 23, 2005 at 01:57:21AM +0100, Mi?osz Ga??zka wrote:
> > hello!
> >
> > I added bonnie++ using `make pkgselect` and I'm getting this error
> > after `make iso` (freesbie2):
>
> Ironically, someone told me the same bug using dvd+rw-tools as package
> yesterday. I commited a fix of pkginstall.sh. Can you try updating and
> tell me if it works?
>
> Bye and thanks,
> Dario

It works, with added bonnie++-1.93.03_1  and everything looks fine:
Installing packages listed in /mnt/bckp/freesbie/freesbie2/conf/packages
Finding origins... 1 found
Finding dependencies... none found
Sorting 1 packages by dependencies... done.
Deleting previously installed packages
Copying 1 packages
[0.]

For bonnie++-1.93.03_1, cdrtools-2.01_1, dvd+rw-tools-5.21.4.10.8 (like above,
works fine):
Installing packages listed in /mnt/bckp/freesbie/freesbie2/conf/packages
Finding origins... 3 found
Finding dependencies... 1 found
Sorting 3 packages by dependencies... done.
Deleting previously installed packages
Copying 3 packages
[0...]

I modified my pkgselect.sh (exactly in the same way):
> diff -u pkgselect.sh.orig  pkgselect.sh
--- pkgselect.sh.orig   Fri Dec 23 16:25:02 2005
+++ pkgselect.sh        Fri Dec 23 16:52:00 2005
@@ -18,6 +18,10 @@
 WORKDIR=$(mktemp -d -t freesbie)
 PKGFILE=${PKGFILE:-${LOCALDIR}/conf/packages};

+escape_pkg() {
+            echo $1 | sed 's/\+/\\\+/'
+}
+
 create_lists() {
     cd ${WORKDIR}
     echo "Creating list of available packages on the build machine..."
@@ -48,7 +52,7 @@

            # pkg_info might fail if the listed package isn't present
            set +e
-           origins=$(pkg_info -QoX "^${pkg}($|-[^-]+$)")
+           origins=$(pkg_info -QoX "^$(escape_pkg ${pkg})($|-[^-]+$)")
            retval=$?
            set -e
            if [ ${retval} -eq 0 ]; then



Thanks
Milosz
-- 
FreeSBIE mailing list (http://www.freesbie.org)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.