Opened 11 years ago
Closed 11 years ago
#4953 closed enhancement (fixed)
graphviz-2.38.0
Reported by: | Fernando de Oliveira | Owned by: | Fernando de Oliveira |
---|---|---|---|
Priority: | normal | Milestone: | 7.6 |
Component: | BOOK | Version: | SVN |
Severity: | normal | Keywords: | |
Cc: |
Change History (10)
comment:1 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 11 years ago
comment:3 by , 11 years ago
I cannot test it because I do not have the tarball, but you might investigate whether those are hard links (maybe you already have tried this, but you do not mention it, so just in case). Try:
ls -i /usr/lib/graphviz/tcl/libgv_tcl.so
then
ls -i /usr/lib/tcl8.6/graphviz/libgv_tcl.so
If the inode numbers returned are the same, then, this is a hard link, and you do not have to worry: the file is only once on the disk.
comment:4 by , 11 years ago
Thanks, Pierre.
I do check this for the programs, but almost never for the libraries. Did the check, but I already knew they where not had links, because when trying to solve replacing by symlinks, the dirsizes significantly decreased.
comment:5 by , 11 years ago
Actually, symlinking is Arch linux's solution (they use DESTDIR of course):
rm -r "${pkgdir}/usr/lib/tcl8.6/graphviz" ln -s ../graphviz/tcl "$pkgdir/usr/lib/tcl8.6/graphviz"
What I could propose (but cannot test):
if [ ! -h /usr/lib/tcl8.6/graphviz && -d /usr/lib/tcl8.6/graphviz ]; then for path in $(echo /usr/lib/tcl8.6/graphviz/*); do file=$(basename $path) if [ ! -e "/usr/lib/graphviz/tcl/$file" ]; then mv $path /usr/lib/graphviz/tcl/$file fi # otherwise, we assume the files are the same. I guess diffing would be overkill. done rm -r /usr/lib/tcl8.6/graphviz ln -s ../graphviz/tcl /usr/lib/tcl8.6/graphviz fi
So, if /usr/lib/tcl8.6/graphviz has been populated by other packages, we copy the files to the other directory and do the symlink. If it is already a symlink (or the directory does not exist,which is unlikely after installing graphviz), we do nothing. OTOH, why not just keep the duplicates?
comment:7 by , 11 years ago
Thanks.
Yes, site is up.
I have tried other combinations, not only Arch's solution. In one, there was only files populated by graphviz, but still, how can I guarantee that in the future somebody else will use the same directory?
Yes, I think the duplications are necessary, for the moment. I think I found other duplications, but will not spend time anymore to confirm or eliminate. I am done with this.
I think that only today, almost 20 new needed updates appeared for the book.
comment:8 by , 11 years ago
Also, the duplication you have found occurs only when building language bindings, which are optional. So why worry?
comment:10 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
The site http://www.graphviz.org/ is down, found it when trying to investigate the first problem. Seems to be transient, because I have downloaded the new version from there, but cannot doençoad anything today. If this persists, will need to upload my tarball to anduin.
Some libraries and files are duplicated (not only .so) in directories
/usr/lib/graphviz/tcl
and
/usr/lib/tcl8.6/graphviz
Any solution I find involves removing one version and linking to the other. This is OK, when building with DESTDIR, but I think it is very dangerous to be done in a direct install, because other packages install files/directories there. I will leave duplicated, but would appreciate some solution.
I have lost a lot of time today with those and with diffimg not being installed (site down, could not find anything there, had to find it elsewhere, until I saw something in the code).