Bug#749699: rubber: BIBINPUTS not honored anymore

2014-06-24 Thread Sebastian Reichel
Hi,

On Wed, Jun 18, 2014 at 10:18:29PM +0200, Hilmar Preusse wrote:
 On 18.06.14 Brice Goglin (brice.gog...@ens-lyon.org) wrote:
  BIBINPUTS is honored but it doesn't understand things like
  .:foo/bar: for prepending . and foo/bar to the default path
  (just like TEXINPUTS is documented in tex(1)) as bibtex does.
  
 
 Sebastian: would you be so kind to have a look at this?

I attached a new patch. It's still not perfect, since it does not
read the default BIBINPUTS from texmf.cnf, but it should be good
enough (rubber also ignores the default TEXINPUTS from texmf.cnf).

-- Sebastian
--- biblatex.py	2014-04-02 13:59:08.0 +0200
+++ biblatex.py.new	2014-06-24 16:25:37.440292985 +0200
@@ -4,7 +4,9 @@
 basic BibLaTeX support for Rubber
 
 
-from os.path import exists, getmtime
+import sys
+from os import getenv
+from os.path import join, exists, getmtime
 from rubber.util import parse_keyval, md5_file
 from rubber import _, msg
 from string import split
@@ -50,7 +52,16 @@
 if 'location' in options and options['location'] == 'remote':
 return
 
-doc.add_source(file)
+# BIBINPUTS support with fallback to current working directory
+bibinputs = getenv(BIBINPUTS, .)
+for bibpath in bibinputs.split(:):
+bibfile = join(bibpath, file)
+if exists(bibfile):
+doc.add_source(bibfile)
+return
+
+msg.error(_(cannot find %s) % file)
+sys.exit(2)
 
 def hook_bibliography (loc, files):
 for bib in split(files, ,):


signature.asc
Description: Digital signature


Bug#749699: rubber: BIBINPUTS not honored anymore

2014-06-24 Thread Hilmar Preusse
On 24.06.14 Sebastian Reichel (s...@debian.org) wrote:
 On Wed, Jun 18, 2014 at 10:18:29PM +0200, Hilmar Preusse wrote:
  On 18.06.14 Brice Goglin (brice.gog...@ens-lyon.org) wrote:

Hi,

   BIBINPUTS is honored but it doesn't understand things like
   .:foo/bar: for prepending . and foo/bar to the default path
   (just like TEXINPUTS is documented in tex(1)) as bibtex does.
   
  
  Sebastian: would you be so kind to have a look at this?
 
 I attached a new patch. It's still not perfect, since it does not
 read the default BIBINPUTS from texmf.cnf, but it should be good
 enough (rubber also ignores the default TEXINPUTS from texmf.cnf).
 
Many thanks!

Brice: new package on https://freeshell.de/~hille42/rubber/ . If that
is OK for your, I'll upload.

Hilmar
-- 
sigmentation fault


signature.asc
Description: Digital signature


Bug#749699: rubber: BIBINPUTS not honored anymore

2014-06-24 Thread Brice Goglin
Le 24/06/2014 20:43, Hilmar Preusse a écrit :
 BIBINPUTS is honored but it doesn't understand things like
 .:foo/bar: for prepending . and foo/bar to the default path
 (just like TEXINPUTS is documented in tex(1)) as bibtex does.

 Sebastian: would you be so kind to have a look at this?
 I attached a new patch. It's still not perfect, since it does not
 read the default BIBINPUTS from texmf.cnf, but it should be good
 enough (rubber also ignores the default TEXINPUTS from texmf.cnf).

 Many thanks!

 Brice: new package on https://freeshell.de/~hille42/rubber/ . If that
 is OK for your, I'll upload.

Looks like it works, thanks.

By the way, I see messages like
hdr.tex: [biblatex] Please rerun LaTeX. (page 108)

Isn't rubber supposed to automatically rebuild in this case?

thanks
Brice


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#749699: rubber: BIBINPUTS not honored anymore

2014-06-24 Thread Hilmar Preusse
On 24.06.14 Brice Goglin (brice.gog...@ens-lyon.org) wrote:

Hi,

 By the way, I see messages like
 hdr.tex: [biblatex] Please rerun LaTeX. (page 108)
 
 Isn't rubber supposed to automatically rebuild in this case?
 
Is this new in 1.1+20100306-4, did it work befor?. Could you open a
new ticket for this?

Thanks,
  Hilmar
-- 
sigmentation fault


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#749699: rubber: BIBINPUTS not honored anymore

2014-06-24 Thread Brice Goglin
Le 24/06/2014 23:00, Hilmar Preusse a écrit :
 On 24.06.14 Brice Goglin (brice.gog...@ens-lyon.org) wrote:

 Hi,

 By the way, I see messages like
 hdr.tex: [biblatex] Please rerun LaTeX. (page 108)

 Isn't rubber supposed to automatically rebuild in this case?

 Is this new in 1.1+20100306-4, did it work befor?. Could you open a
 new ticket for this?

 Thanks,
   Hilmar

It was hardly testable earlier since my biblatex testcases didn't work well.
I'll open a new BR after your upload.
Brice


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#749699: rubber: BIBINPUTS not honored anymore

2014-06-24 Thread Sebastian Reichel
On Tue, Jun 24, 2014 at 09:02:55PM +0200, Brice Goglin wrote:
 Le 24/06/2014 20:43, Hilmar Preusse a écrit :
  BIBINPUTS is honored but it doesn't understand things like
  .:foo/bar: for prepending . and foo/bar to the default path
  (just like TEXINPUTS is documented in tex(1)) as bibtex does.
 
  Sebastian: would you be so kind to have a look at this?
  I attached a new patch. It's still not perfect, since it does not
  read the default BIBINPUTS from texmf.cnf, but it should be good
  enough (rubber also ignores the default TEXINPUTS from texmf.cnf).
 
  Many thanks!
 
  Brice: new package on https://freeshell.de/~hille42/rubber/ . If that
  is OK for your, I'll upload.
 
 Looks like it works, thanks.
 
 By the way, I see messages like
 hdr.tex: [biblatex] Please rerun LaTeX. (page 108)
 
 Isn't rubber supposed to automatically rebuild in this case?

It should be enough to call rubber once on a document.
I can't tell you what's wrong without example code,
though ;)

-- Sebastian


signature.asc
Description: Digital signature


Bug#749699: rubber: BIBINPUTS not honored anymore

2014-06-18 Thread Hilmar Preusse
On 18.06.14 Brice Goglin (brice.gog...@ens-lyon.org) wrote:

Hi,

 BIBINPUTS is honored but it doesn't understand things like
 .:foo/bar: for prepending . and foo/bar to the default path
 (just like TEXINPUTS is documented in tex(1)) as bibtex does.
 
Thanks.

Sebastian: would you be so kind to have a look at this?

Regards,
  Hilmar
-- 
sigmentation fault


signature.asc
Description: Digital signature


Bug#749699: rubber: BIBINPUTS not honored anymore

2014-06-17 Thread Hilmar Preusse
On 16.06.14 Hilmar Preusse (hill...@web.de) wrote:

Hi,

 Brice: paackage w/ patch is on http://home.amasol.de/~preusse/rubber/
 
 Could you test?
 
Moved to https://freeshell.de/~hille42/rubber/

Hilmar
-- 
sigmentation fault


signature.asc
Description: Digital signature


Bug#749699: rubber: BIBINPUTS not honored anymore

2014-06-17 Thread Brice Goglin
Le 17/06/2014 11:36, Hilmar Preusse a écrit :
 On 16.06.14 Hilmar Preusse (hill...@web.de) wrote:

 Hi,

 Brice: paackage w/ patch is on http://home.amasol.de/~preusse/rubber/

 Could you test?

 Moved to https://freeshell.de/~hille42/rubber/


Hello,

BIBINPUTS is honored but it doesn't understand things like .:foo/bar:
for prepending . and foo/bar to the default path (just like
TEXINPUTS is documented in tex(1)) as bibtex does.

And my onchance bcf custom rule doesn't seem required anymore, indeed.

Thanks
Brice


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#749699: rubber: BIBINPUTS not honored anymore

2014-06-16 Thread Hilmar Preusse
On 14.06.14 Sebastian Reichel (s...@debian.org) wrote:

Hi,

 Sorry for the delay. I did not bother to reply before having a
 patch.
 
Fine with me.

Brice: paackage w/ patch is on http://home.amasol.de/~preusse/rubber/

Could you test?

Thanks,
  Hilmar
-- 
sigmentation fault


signature.asc
Description: Digital signature


Bug#749699: rubber: BIBINPUTS not honored anymore

2014-06-14 Thread Sebastian Reichel
Hi

Sorry for the delay. I did not bother to reply before having a
patch.

On Sun, Jun 01, 2014 at 03:53:37PM +0200, Brice Goglin wrote:
 On Fri, May 30, 2014 at 03:24:26PM +0200, Sebastian Reichel wrote:
  On Fri, May 30, 2014 at 12:59:06PM +0200, Hilmar Preusse wrote:
   In https://bugs.debian.org/743362 you requested me to include the
   provided biblatex module. I've included it and got now a bug report
   telling me that BIBINPUTS and the bibtex.path variable is ignored
   now. I told the submitter to remove your module and he reported that
   it solved the problem.
   
   Please be so kind to provide a new module fixing this regression.
  
  BIBINPUTS is not used by biber(1p), which is called instead of
  bibtex(1) for latex documents using biblatex.
 
 My biber (from Debian package 1.8-1) uses BIBINPUTS.
 I get this output when just asking for biblio.bib
   INFO - Found BibTeX data source 'foo/biblio.bib'

Yes, biber supports it. It's just not in the manpage, which I used
for reference (bibtex manpage references the env variable).

  I guess, that Brice's document tries to use biblatex and bibtex at
  the same time.
 
 I don't understand what this means :)

Ignore it, that was not the problem :)

  This may have worked without the plugin, since all
  biblatex stuff was ignored, but fails once both packages are
  analyzed.
  
  Brice, can you create a minimal example triggering your problem,
  or at least sent the bib* related lines from your LaTeX files?
 
 Here's a tarball containing a .tex and a .bib in the foo subdirectory.
 This command from inside the extracted tarball
   BIBINPUTS=foo rubber -v -d bar   
 works when your biblatex.py is not installed,
 but it fails when it's installed:
   'biblio.bib' does not exist
   There were errors compiling bar.

That's because biblatex.py does proper dependency tracking of your bib
files (so it will rebuild your pdf if only the bib file has
changed). It did not interpret the BIBINPUTS variable, though. I have
attached a patch, which should add simple support for the variable
(your example works with it).

 Note my latex file forces rubber to rerun biber when the bcf changed.
 Otherwise, I have to run rubber, run biber, and rerun rubber with -f.
 That may be related, but removing these rules doesn't solve the issue.

That rule is no longer needed with working biblatex.py ;)

-- Sebastian
--- biblatex.py.orig	2014-04-02 13:59:08.0 +0200
+++ biblatex.py	2014-06-14 18:31:22.940527047 +0200
@@ -4,7 +4,8 @@
 basic BibLaTeX support for Rubber
 
 
-from os.path import exists, getmtime
+from os import getenv
+from os.path import join, exists, getmtime
 from rubber.util import parse_keyval, md5_file
 from rubber import _, msg
 from string import split
@@ -50,6 +51,11 @@
 if 'location' in options and options['location'] == 'remote':
 return
 
+# support BIBINPUTS variable
+bibinputs = getenv(BIBINPUTS)
+if bibinputs != None:
+file = join(bibinputs, file)
+
 doc.add_source(file)
 
 def hook_bibliography (loc, files):


signature.asc
Description: Digital signature


Bug#749699: rubber: BIBINPUTS not honored anymore

2014-06-01 Thread Brice Goglin
On Fri, May 30, 2014 at 03:24:26PM +0200, Sebastian Reichel wrote:
 Hi Hilmar and Brice,
 
 On Fri, May 30, 2014 at 12:59:06PM +0200, Hilmar Preusse wrote:
  In https://bugs.debian.org/743362 you requested me to include the
  provided biblatex module. I've included it and got now a bug report
  telling me that BIBINPUTS and the bibtex.path variable is ignored
  now. I told the submitter to remove your module and he reported that
  it solved the problem.
  
  Please be so kind to provide a new module fixing this regression.
 
 BIBINPUTS is not used by biber(1p), which is called instead of
 bibtex(1) for latex documents using biblatex.

My biber (from Debian package 1.8-1) uses BIBINPUTS.
I get this output when just asking for biblio.bib
  INFO - Found BibTeX data source 'foo/biblio.bib'

 I guess, that Brice's document tries to use biblatex and bibtex at
 the same time.

I don't understand what this means :)

 This may have worked without the plugin, since all
 biblatex stuff was ignored, but fails once both packages are
 analyzed.
 
 Brice, can you create a minimal example triggering your problem,
 or at least sent the bib* related lines from your LaTeX files?

Here's a tarball containing a .tex and a .bib in the foo subdirectory.
This command from inside the extracted tarball
  BIBINPUTS=foo rubber -v -d bar   
works when your biblatex.py is not installed,
but it fails when it's installed:
  'biblio.bib' does not exist
  There were errors compiling bar.

Note my latex file forces rubber to rerun biber when the bcf changed.
Otherwise, I have to run rubber, run biber, and rerun rubber with -f.
That may be related, but removing these rules doesn't solve the issue.

Regards
Brice


bib.tar.bz2
Description: Binary data


Bug#749699: (fwd) Bug#749699: rubber: BIBINPUTS not honored anymore

2014-05-30 Thread Hilmar Preusse
Dear Sebastian,

In https://bugs.debian.org/743362 you requested me to include the
provided biblatex module. I've included it and got now a bug report
telling me that BIBINPUTS and the bibtex.path variable is ignored
now. I told the submitter to remove your module and he reported that
it solved the problem.

Please be so kind to provide a new module fixing this regression.

Regards,
  Hilmar

- Forwarded message from Brice Goglin bgog...@debian.org -

Date: Thu, 29 May 2014 10:39:08 +0200
From: Brice Goglin bgog...@debian.org
To: Debian Bug Tracking System sub...@bugs.debian.org
Subject: Bug#749699: rubber: BIBINPUTS not honored anymore
Reply-To: Brice Goglin bgog...@debian.org, 749...@bugs.debian.org
Message-ID: 20140529083908.1855.22619.report...@maiantheme.bordeaux.inria.fr
X-Mailer: reportbug 6.5.0

Package: rubber
Version: 1.1+20100306-4
Severity: important

Dear Maintainer,

The BIBINPUTS variable is not honored anymore when building with rubber.
The bug was introduced in -3
I tried the rubber bibtex.path variable instead, doesn't work either
(see bug #694265).

Brice



- End forwarded message -

-- 
http://www.hilmar-preusse.de.vu/#206401 http://counter.li.org


signature.asc
Description: Digital signature


Bug#749699: rubber: BIBINPUTS not honored anymore

2014-05-30 Thread Sebastian Reichel
Hi Hilmar and Brice,

On Fri, May 30, 2014 at 12:59:06PM +0200, Hilmar Preusse wrote:
 In https://bugs.debian.org/743362 you requested me to include the
 provided biblatex module. I've included it and got now a bug report
 telling me that BIBINPUTS and the bibtex.path variable is ignored
 now. I told the submitter to remove your module and he reported that
 it solved the problem.
 
 Please be so kind to provide a new module fixing this regression.

BIBINPUTS is not used by biber(1p), which is called instead of
bibtex(1) for latex documents using biblatex.

I guess, that Brice's document tries to use biblatex and bibtex at
the same time. This may have worked without the plugin, since all
biblatex stuff was ignored, but fails once both packages are
analyzed.

Brice, can you create a minimal example triggering your problem,
or at least sent the bib* related lines from your LaTeX files?

I will try to see if my guess is right and will try to update
rubber, so that it handles that corner case more gracefully.
If necessary by throwing a proper error message.

-- Sebastian


signature.asc
Description: Digital signature


Bug#749699: rubber: BIBINPUTS not honored anymore

2014-05-29 Thread Brice Goglin
Package: rubber
Version: 1.1+20100306-4
Severity: important

Dear Maintainer,

The BIBINPUTS variable is not honored anymore when building with rubber.
The bug was introduced in -3
I tried the rubber bibtex.path variable instead, doesn't work either
(see bug #694265).

Brice


-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'testing-updates'), (500, 'unstable'), 
(1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.14-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages rubber depends on:
ii  python  2.7.6-2
ii  python-support  1.0.15
ii  texlive-latex-base  2013.20140408-1

rubber recommends no packages.

Versions of packages rubber suggests:
ii  imagemagick  8:6.7.7.10+dfsg-1
pn  sam2pnone
ii  transfig 1:3.2.5.e-3

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#749699: rubber: BIBINPUTS not honored anymore

2014-05-29 Thread Brice Goglin
 The BIBINPUTS variable is not honored anymore when building with rubber.
 The bug was introduced in -3

Oops typo. It was introduced in -4. -3 looks OK.

Brice


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#749699: rubber: BIBINPUTS not honored anymore

2014-05-29 Thread Hilmar Preusse
On 29.05.14 Brice Goglin (bgog...@debian.org) wrote:

Hi,

 The BIBINPUTS variable is not honored anymore when building with rubber.
 The bug was introduced in -4
 I tried the rubber bibtex.path variable instead, doesn't work either
 (see bug #694265).
 
rubber (1.1+20100306-4) unstable; urgency=medium

  * fix a typo in multibib.py (Closes: #683523)
  * replace broken xelatex module (Closes: #725356)
  * support for scanning dependencies of ltxtable (Closes: #694836)
  * support for glossaries package (Closes: #694839)
  * basic support for biblatex (Closes: #743362)

 -- Hilmar Preuße hill...@web.de  Sun, 30 Mar 2014 22:48:50 +0200

I'd guess that the latest change introduced the problem. A file
biblatex.py was added. Could you remove/rename the following files on
your system and report if that helps?

/usr/lib/pymodules/python2.7/rubber/latex_modules/biblatex.py
/usr/lib/pymodules/python2.7/rubber/latex_modules/biblatex.pyc
/usr/share/pyshared/rubber/latex_modules/biblatex.py

Thanks!

Hilmar
-- 
sigmentation fault


signature.asc
Description: Digital signature


Bug#749699: rubber: BIBINPUTS not honored anymore

2014-05-29 Thread Brice Goglin
Le 29/05/2014 22:21, Hilmar Preusse a écrit :
 I'd guess that the latest change introduced the problem. A file
 biblatex.py was added. Could you remove/rename the following files on
 your system and report if that helps?

 /usr/lib/pymodules/python2.7/rubber/latex_modules/biblatex.py
 /usr/lib/pymodules/python2.7/rubber/latex_modules/biblatex.pyc
 /usr/share/pyshared/rubber/latex_modules/biblatex.py


Seems to fix the problem !
Brice


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org