[Bond-users] PAPYRUS GIT IS BROKEN
Colin Close
itchka at compuserve.com
Sun Dec 11 19:03:42 EST 2011
On Sunday 11 Dec 2011 23:00:56 Colin Close wrote:
> On Monday 12 Dec 2011 10:30:58 Jasen Betts wrote:
> > On Sun, Dec 11, 2011 at 07:22:32PM +0000, Colin Close wrote:
> > > Hi All,
> > > This is just a heads up to say that the current git version is broken
> > > and
> > > will not generate reports (at least not for me).
> > > I have my database on a separate machine to the bobd system it is thus
> > > interrogated over a local network (no dns just ip addresses).
> > > The file that is broken is the papyrus script it is broken by this
> > > seemingly innocuous commit.
> > > dde9c788ec0a1743960c2c69537d1243aa8de2de
> >
> > I am guessing you aren't using --database-connection-string
> > and papyrus_backend is choking on the empty string that was getting
> > substituted in the arguments.
> >
> > try this patch:
> >
> > --- a/papyrus
> > +++ b/papyrus
> > @@ -292,6 +292,7 @@ while [ "$#" -gt "0" ] ; do
> >
> > shift
> >
> > done
> >
> > +
> >
> > if [ -z "$input" ] ; then
> > usage
> > exit 1
> >
> > @@ -337,21 +338,32 @@ fi
> >
> > trap "${dryrun} rm -rf $workdir $cleanup " 0 1 2 15
> > run mkdir "$workdir"
> >
> > +
> > +
> > +# build an argument list avoiding empty arguments from empty source
> > lists.
> > +
> > +[ "$remote" ] && backend="papyrus_backend"
> > +backend=( $backend $validate $dbname $dbtype )
> > +(( ${#dbconn} )) && backend=( "${backend[@]}" "${dbconn[@]}" )
> > +backend=( "${backend[@]}" $dbschema $dbprovider )
> > +(( ${#args} )) && backend=( "${backend[@]}" "${args[@]}" )
> > +
> >
> > if ! [ "$remote" ]
> > then
> >
> > -say -n "Running backend $input..."
> > +say -n "Running backend on $input..."
> >
> > (
> > IFS=\\
> > echo
> >
> > -exdirect "$workdir/output.xml" $backend $validate $dbname $dbtype
> > "${dbconn[@]}" $dbschema $dbprovider "${args[@]}" "$input" +exdirect
> > "$workdir/output.xml" "${backend[@]}" "$input"
> >
> > )
> >
> > else
> >
> > say -n "Running remote backend "
> >
> > + # may need work here to over-quote the arguments for ssh
> >
> > if ! [ "$dryrun" ]
> >
> > - then ssh $remote papyrus_backend $validate $dbname $dbtype
> > "${dbconn[@]}"
> > $dbschema $dbprovider "${args[@]}" - < "$input" > "$workdir/output.xml"
> > +
> > then ssh $remote "${backend[@]}" - < "$input" > "$workdir/output.xml"
> > fail
> > $? "remote papyrus backend failed!"
> > - else echo ssh $remote papyrus_backend $validate $dbname $dbtype
> > "${dbconn[@]}" $dbschema $dbprovider "${args[@]}" - \< \"$input\" \>
> > \"$workdir/output.xml\" + else echo ssh $remote "${backend[@]}" - \<
> > \"$input\" \> \"$workdir/output.xml\" fi
> >
> > fi
>
> Thanks Jasen,
> I'll whack that in and let you know when I have finished the labels thing.
> I find shell scripts even more brain-bursting than C!!!
> Best
> Colin
>
Hi Jasen,
Applied this patch and working order has been restored thank you.
I gotta say that papyrus is a really odd bird it's more of a system than a
program and an real bitch to debug!!
Best,
Colin Close
More information about the Bond-users
mailing list