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

Turning debian/upstream into BibTeX (Was: Tasks pages (close to) fixed; Bibref does not seem to be updated automatically)



On Mon, Feb 20, 2012 at 01:48:16PM -0500, Yaroslav Halchenko wrote:
> > >    dh_bibref
> 
> > > which turns debian/upstream data into a usable BibTeX database on the
> > > users system.  This is technically definitely not hard - it just needs
> > > to be *done*.
> 
> > The challenge will be to have it ran by default by Debhelper.  But
> > I think that indeed it is the good direction.  In the meantime, such
> > a tool will need to produce a reference that is stored in the directory.
> 
> Just a clarification -- I don't think we are "competing" here ;)  It is
> more like "eagerly waiting to start using it".  Alternative to the
> dh_bibref tool for me would be just to get back to that little
> http://git.debian.org/?p=pkg-exppsy/debian-bibliography.git;a=blob;hb=HEAD;f=tools/dbib_collect
> and make it do the extraction/conversion from /upstream (which will be
> under /usr/doc/PACKAGE/, right?)

Ahhh, this assumes that reference information is kept in
debian/changelog, right?

To answer your question:  In packages currently featuring a
debian/upstream file this is not installed into /usr/share/doc/PACKAGE -
at least an empty

    apt-file search upstream-metadata.yaml

seems to prove my point (because we do not have seen so much uploads of
packages with renamed files).  If you are asking: "Why, this should be
installed?" I would say:  "You are right, probably nobody has really
thought about this."  I would fully agree that it could add extra
information to the doc inside a binary package - so why not installing
it.

Despite this my plan should work with or without the installation of
the files.  I would like to do something like this:

debian/control:
Build-Depends: upstream-to-bibref-helper
#  for sure the package needs a better name

debian/rules
%:
        dh $@ --with bibref

The bibref helper should contain some similar code like yours and
just moves the information to some common directory, say

   /var/lib/bibref/snippets/package.bib

The installation as well as the deinstallation should run a trigger
doing something like

   cat /var/lib/bibref/snippets/* > /var/lib/bibref/debian.bib

and the file /var/lib/bibref/debian.bib can be used as final BibRef
database.  Please note that this is just a scetch which should be
enhanced and perhaps / probably the debian.bib file should end up at a
better place where bibtex files will be automatically searched for etc -
but these are implemantation details.

The alternative approach could perfectly be to seek for files matching

    /usr/share/doc/*/upstream

and do the BibTeX generation afterwards.  However, this would require a
Depends from this upstream-to-bibtex code where my plan only involves a
Build-Depends and does not include a dependency where some people might
be suspicious about.  A minor issue which I'm not very opinionated about -
just to give reasons for my suggestion.

> indeed having dh_bibref sounds great... my only concern would be -- even
> if it gets into official debhelper (is that the plan)

Yes, definitely however, such a plan requires to prove that the thing
is working first - so for an intermediate period it needs to live and
survive outside official debhelper.

> -- we would need
> to have it available also from some other package interim to use
> this feature on existing Debian/Ubuntu releases while backporting
> packages for NeuroDebian repository.

Sure.

Kind regards

       Andreas. 

-- 
http://fam-tille.de


Reply to: