Opened 10 years ago

Closed 10 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:

Description

Change History (10)

comment:1 by Fernando de Oliveira, 10 years ago

Owner: changed from blfs-book@… to Fernando de Oliveira
Status: newassigned

comment:2 by Fernando de Oliveira, 10 years ago

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

/usr/lib/graphviz/tcl/libgv_tcl.so
/usr/lib/graphviz/tcl/libtcldot_builtin.so
/usr/lib/graphviz/tcl/libtcldot.so
/usr/lib/graphviz/tcl/libtclplan.so
/usr/lib/graphviz/tcl/libtkspline.so
/usr/lib/tcl8.6/graphviz/libgv_tcl.so
/usr/lib/tcl8.6/graphviz/libtcldot_builtin.so
/usr/lib/tcl8.6/graphviz/libtcldot.so
/usr/lib/tcl8.6/graphviz/libtclplan.so
/usr/lib/tcl8.6/graphviz/libtkspline.so

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).

comment:3 by Pierre Labastie, 10 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 Fernando de Oliveira, 10 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 Pierre Labastie, 10 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:6 by Pierre Labastie, 10 years ago

Site is up again.

comment:7 by Fernando de Oliveira, 10 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 Pierre Labastie, 10 years ago

Also, the duplication you have found occurs only when building language bindings, which are optional. So why worry?

comment:9 by Fernando de Oliveira, 10 years ago

Pierre, thank you very much.

Fixed at r12956.

comment:10 by Fernando de Oliveira, 10 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.