[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PATCH] Make use of a separate script for generation of debian.{bib,tex} files.



Hi,

On Thu, Apr 23, 2015 at 12:51:03AM +0530, Akshita Jha wrote:
> > I'm not aware of any naming convention.  I *personally* would have
> > choosen generate_bibtex since bibtex is a single word.
> 
> Renamed to generate_bibtex.

OK.
 
> > I rather consider a totally separate script which is called at the end of
> >
> >    scripts/cron_ftpnew_blends.sh
> >
> > as the most flexible solution.
>
> Yes. It indeed is the most flexible solution. Will do this.

Fine. :-)
 
> > At the moment I have no time to test.  I'd prefer I wait until you might
> > have regarded my hints and checkout afterwards.  Is this OK for you?
> >
> It is perfectly fine. I will inform you when I am done with all the
> changes you suggested.

Thanks.

> > Ahhh, hmmm, I think I need some more detailed explanation what you meain
> > by the last sentence.  Do you mean "include it into the data table" or
> > "include it into the postgresql procedure that extracts the data".  We
> > should do all needed syntax changes in the same manner.
>
> I meant "include the replacement of '#' with '\#', into the postgresql
> procedure that extracts the data" as this is what is done by bibtex() (
> https://udd.debian.org/schema/udd.html#public.function.bibtex) in UDD. The
> bibtex() :
> 
>                .........
> 
>                replace(replace(replace(replace(biburl.value,
>                         '_', E'\\_'),           --
>                         '%', E'\\%'),           --
>                         '&', E'\\&'),           --
>                         '~', E'\\~{}')
> 
>                .........
> 
> 
> If I am to make changes to the bibtex() already in UDD, how do I do it so
> that it can directly be imported ? Or else I could rewrite the function in
> generate_bibtex, and include replace '#' with '\#' and an INNER JOIN (if
> required).

Yes, please do it in the same manner as above.  I guess you have found
the SQL sources in the sql subdir where this change needs to be done.
Since you probably might wonder (as I did when I started to dive into
UDD), how are changes in SQL maintained.  The answer is not really
satisfying (if this is really an "answer"):  Changes will be added to
upgrade sql and from time to time taken over into setup.sql.  Since I'm
not convinced that this works reliably I's suggest you create a new
file (say upgrade_bibtex.sql) containing

   CREATE OR REPLACE FUNCTION bibtex ()
   RETURNS SETOF TEXT LANGUAGE SQL
    ...

and I'll apply it on main UDD manually and will take over to setup.sql
manually afterwards.  The thing is that it is mostly harmless since
every practical application is to clone UDD by restoring the database
dump and not create the database from scratch.  So while this procedure
is not nice it practically works somehow.

> > If (and only if) Umegaya works correctly than the references in
> > bibref_gatherer and in blends_prospective_gatherer should be the same.
> > May be the problem with Umegaya vanished for whatever reason
> > (temporarily??).  Since Upsert does not seem any harm we should probably
> > use it and be safe for future failures.
> >
> >
> There were inserts but no updates in blends_prospective_gatherer. Will
> include Upsert in blends_prospective_gatherer, to be safe.

Fine.

Kind regards

        Andreas.

-- 
http://fam-tille.de


Reply to: