Hey, On Sun, Dec 20, 2009 at 10:20:36AM -0200, Marco Túlio Gontijo e Silva wrote:
Hi.
I noticed all -doc packages include some repeated files: plus.gif,
haddock-util.js, haskell-icon.gif, minus.gif and haddock.css.
In ghc6-doc there're a lot of them, as can be seen in
http://packages.debian.org/search?searchon=contents&keywords=haddock-util.js&mode=path&suite=unstable&arch=any .
I've made this simple script to check if the files have the same
content, and they have:
#!/bin/sh
set -e
[ "$1" = "" ] && echo USAGE: $0 FILE && false
files=`dpkg -S $1 | grep -e ghc -e haskell | cut -d\ -f2`
nfiles=`echo $files | wc -w`
file()
{
echo $files | cut -d\ -f$1
}
for i in `seq $nfiles`
do
for j in `seq $((i + 1)) $nfiles`
do
diff -q `file $i` `file $j`
done
done
Should we do something about it?
Greetings.
Ubuntu ships a snippet in cdbs to fix this. Perhaps we could put this into haskell-devscripts if this is considered to be a problem. (attached)
Cheers, Iain
[ -n "$$CDBS_NO_DOC_SYMLINKING" ] || \
[ -h debian/$(cdbs_curpkg)/usr/share/doc ] || \
[ ! -d debian/$(cdbs_curpkg)/usr/share/doc ] || \
for dep in `perl -ne 'if (/^(Pre-)?Depends:/) {s/^\w+://; foreach (split /,/) { split; print($$_[0], "\n"); } }' debian/$(cdbs_curpkg)/DEBIAN/control`; do \
if [ -d debian/$$dep/usr/share/doc ]; then \
echo "Searching for duplicated docs in dependency $$dep..."; \
rootdir=`pwd`; \
(cd debian/$(cdbs_curpkg)/usr/share/doc/$(cdbs_curpkg); find -type f ! -name copyright | while read f; do \
thisfile="$$rootdir/debian/$(cdbs_curpkg)/usr/share/doc/$(cdbs_curpkg)/$$f"; \
depfile="$$rootdir/debian/$$dep/usr/share/doc/$$dep/$$f"; \
if [ -f $$depfile -o -L $$depfile ] && zcmp $$thisfile $$depfile >/dev/null; then \
echo " symlinking $$f in $(cdbs_curpkg) to file in $$dep"; \
rm $$thisfile; ln -s /usr/share/doc/$$dep/$$f $$thisfile; \
fi; \
done ); \
fi; \
done
# fix absolute symlinks created above to be relative
dh_link -p $(cdbs_curpkg)
dh_md5sums -p$(cdbs_curpkg) $(DEB_DH_MD5SUMS_ARGS)
$(DEB_DH_BUILDDEB_ENV) dh_builddeb -p$(cdbs_curpkg) $(DEB_DH_BUILDDEB_ARGS)
Attachment:
signature.asc
Description: Digital signature