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

How to get better bugreports



Hi all,

after I had written 

,----
| The question is whether we want this. It will for sure make
| bugtracking much harder
`----

yesterday, I was thinking of ways how to make debugging easier. I still
don't know whether I want it, but even now people can have updated files
in $TEXMFLOCAL or $HOMETEXMF. And we often get bug reports without an
example that shows the error. So when I thought about a possible
solution, I found that there's yet one around:
/usr/share/bugs/tetex-*. If we provide a script with that name, it will
be executed before reportbug invokes the editor - see
/usr/share/doc/reportbug/README.developers. 

I would suggest to include such scripts in any case, irrespective of
what we're going to do with texmf-dist. And here's a first try, see
below. Both reportbug.base and reportbug.extra give rather lengthy
output, I'm not sure whether we really want the contents of all ls-R's
(As a compromise, we could try to make one long line out of every
directory listing, but I didn't manage to do this with sed). Also, we
could kick out the prompting. (&3 is redirected into the mail template).

The files should be installed with

# Install reportbug scripts
  install -D --mode=755 debian/reportbug.base debian/$(package)/usr/share/bugs/tetex-base
  install -D --mode=755 debian/reportbug.extra debian/$(extra)/usr/share/bugs/tetex-extra

somewhere in the binary-indep target, and we could do the same for
tetex-bin. 

$ cat debian/reportbug.base
#!/bin/sh

cat <<EOF
Please read and follow the instructions in the first lines below
the text: "-- Package-specific info:".
Thank you.

Press ENTER to continue
EOF

# read

cat >&3 <<EOF
If you report an error when running one of the TeX-related binaries 
(latex, pdftex, metafont,...), or if the bug is related to bad or wrong
output, please include a MINIMAL example input file that produces the
error in your report. Don't forget to also include minimal examples of
other files that are needed, e.g. bibtex databases. Often it also helps
to include the logfile. Please, never send included pictures!

If your example file isn't short or produces more than one page of
output (except when multiple pages are needed to show the problem),
you can probably minimize it further. Instructions on how to do that
can be found at

http://don.t/know/an/english/version (english)

or 

http://www.latex-einfuehrung.de.vu/mini.html (german)

##################################
minimal input file


##################################
other files

EOF

INTERESTING_PACKAGES="tetex-bin tetex-extra"

dpkg -l $INTERESTING_PACKAGES | egrep -v '^Desired|^[|]|^[+]' >&3

for dir in `kpsexpand '$TEXMF' | sed -e 's/,/ /g;s/[!{}]//g;'`; do
  ls_R_files="$ls_R_files `ls $dir/ls-R 2>/dev/null`";
done

echo "######################################" >&3
echo " content of ls-R files" >&3
echo >&3
for file in $ls_R_files; do
  ls -l $file >&3
  echo > &3
  cat $file >&3
  echo "######################################" >&3
done

$ cat debian/reportbug.extra
#!/bin/sh

cat <<EOF
Please read and follow the instructions in the first lines below
the text: "-- Package-specific info:".
Thank you.

Press ENTER to continue
EOF

read

cat >&3 <<EOF
If you report an error when running one of the TeX-related binaries 
(latex, pdftex, metafont,...), or if the bug is related to bad or wrong
output, please include a MINIMAL example input file that produces the
error in your report. Don't forget to also include minimal examples of
other files that are needed, e.g. bibtex databases. Often it also helps
to include the logfile. Please, never send included pictures!

If your example file isn't short or produces more than one page of
output (except when multiple pages are needed to show the problem),
you can probably minimize it further. Instructions on how to do that
can be found at

http://don.t/know/an/english/version (english)

or 

http://www.latex-einfuehrung.de.vu/mini.html (german)

##################################
minimal input file


##################################
other files

EOF

# INTERESTING_PACKAGES="tetex-bin tetex-extra"

# dpkg -l "$INTERESTING_PACKAGES" | egrep -v '^Desired|^[|]|^[+]' >&3

for dir in `kpsexpand '$TEXMF' | sed -e 's/,/ /g;s/[!{}]//g;'`; do
  ls_R_files="$ls_R_files `ls $dir/ls-R 2>/dev/null`";
done

echo "######################################" >&3
echo " content of ls-R files" >&3
echo >&3
for file in $ls_R_files; do
  ls -l $file >&3
  echo > &3
  cat $file >&3
  echo "######################################" >&3
done


-- 
Frank Küster, Biozentrum der Univ. Basel
Abt. Biophysikalische Chemie



Reply to: