Bug 389231 - symlinks and packaging
Summary: symlinks and packaging
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: docbook-style-xsl
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Ondrej Vasik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-18 11:20 UTC by Florian La Roche
Modified: 2008-01-03 01:30 UTC (History)
4 users (show)

Fixed In Version: 0.2.8-2.fc7
Clone Of:
Environment:
Last Closed: 2008-01-03 01:30:41 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Florian La Roche 2007-11-18 11:20:34 UTC
Description of problem:

docbook-style-xsl is using a symlink for xsl-stylesheets to a versioned
directory. dblatex from Fedora-devel also wants to store files in that
directory:

symlink /usr/share/sgml/docbook/xsl-stylesheets from
docbook-style-xsl-1.73.2-4.fc9.noarch.rpm is used as directory name in
+docbook-style-xsl-1.73.2-4.fc9.noarch.rpm dblatex-0.2.7-16.fc9.noarch.rpm


Should dblatex use some other directory to not need to hardcode the
exact version number? Or can docbook-style-xsl move the files into
a directory without any version number?
Any other ideas on how this should be resolved?

regards,

Florian La Roche


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Ondrej Vasik 2007-11-19 08:28:07 UTC
I think it will be safe to remove release from directory name. Releases are
usually just small tweaking - same is done for dsssl stylesheets and
docbook-utils, so to change it for docbook-dtds and docbook-style-xsl package
would be possible step. This will reduce count of hardcoding exact
version-release number - as the releases are quiet stable and there is not too
much of version changes.

Comment 2 Ondrej Vasik 2007-11-29 09:45:11 UTC
Built as docbook-style-xsl-1.73.2-5.fc9 , dir will be
/usr/share/sgml/docbook/xsl-stylesheets-{version} , which should reduce number
of conflicts - versions are not changed so frequently. Closing RAWHIDE. If the
removal of release from dir is not sufficient , feel free to reopen the bug, we
could discuss other way.

Comment 3 Patrice Dumas 2007-11-29 11:15:42 UTC
Honestly, I don't understand much of those issues, but I
can't see why there is a need for a version at all in the
directory. It seems to me to be only a unuseful 
complication. In the end it is the symlink that will 
be used anyway.

What is the problem you want to solve with the versioned directory?

As a side note, I don't understand the purpose of this bug 
either.

Comment 4 Ondrej Vasik 2007-11-29 12:26:50 UTC
Purpose of the bug:
There was a mail from Florian La Roche on fedora-devel-list with a
list  of packages files via symlinks. Few bugs opened, some still in new, some
in notabug, this one was closed and now reopened. For this bug I agree that the
change in dirs could affect dblatex and should be reduced as much as possible.

About the not versioned directory: 
Basically all docbook-dirs uses versioned directory. In some cases it is
reasonable - you have many different versions of docbook-dtds (but I'm going to
drop release there too) - you are using that directory name in xml documents, so
you have to change it every update. Honestly - there are many packages which
uses versioned dir and I can't see why docbook-style-xsl should be different. I
agree that {name}-{version}-{release} as a dir is a bit silly and I'd like to
remove it from all docbook packages. 

Why to not drop versioned dir?
There will be docbook5 (now RC7 I thing) in near future and it will be separated
from docbook4 packages (at least for a while). Therefore the symlinks could be
useful to switch between docbook5 and docbook4 - if there are/will be some
differences. Once I will realize that the symlink is useless and I could drop
versioned dir, I will do that. But I'm not sure about that now.

Comment 5 Patrice Dumas 2007-11-29 22:02:16 UTC
(In reply to comment #4)
> Purpose of the bug:
> There was a mail from Florian La Roche on fedora-devel-list with a
> list  of packages files via symlinks. Few bugs opened, some still in new, some
> in notabug, this one was closed and now reopened. For this bug I agree that the
> change in dirs could affect dblatex and should be reduced as much as possible.

That I know but I don't see exactly the issue. Is it that upon
change of the directory name something will break?

> About the not versioned directory: 
> Basically all docbook-dirs uses versioned directory. In some cases it is
> reasonable - you have many different versions of docbook-dtds (but I'm going to
> drop release there too) - you are using that directory name in xml documents,

The symlink could also be in the reverse direction.

Also is the directory name hardcoded? This looks dubious since
it was a fedora specific name (with the release). Do you have
an example of package depending on the versionned directory?

> so
> you have to change it every update. Honestly - there are many packages which
> uses versioned dir and I can't see why docbook-style-xsl should be different.

If it is a wrong practice, it is a good thing to change. The number
of package isn't an argument.

> Why to not drop versioned dir?
> There will be docbook5 (now RC7 I thing) in near future and it will be separated
> from docbook4 packages (at least for a while). Therefore the symlinks could be
> useful to switch between docbook5 and docbook4 - if there are/will be some
> differences. Once I will realize that the symlink is useless and I could drop
> versioned dir, I will do that. But I'm not sure about that now.

Wouldn't it be more simple if there was a versionned directory
for the packages that are not the default and a non versionned
directory for the default version?

Comment 6 Fedora Update System 2007-12-10 20:49:07 UTC
docbook-style-xsl-1.73.2-2.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update docbook-style-xsl'

Comment 7 Patrice Dumas 2007-12-11 10:39:20 UTC
What about my proposal Comment #5 use an unversioned directory
for the current release with a symlink pointing to the directory
and a versioned directory for the other versions?

Comment 8 Ondrej Vasik 2007-12-11 13:26:44 UTC
Hmmms, now I found why the version-release syntax was used. This was most
probably due to post/postun sequence and xmlcatalog registration - so after
removal of release from dir, updating of package was broken - postun removed
what post added because of same texts after version drop. That thing is easy to
fix(and was already fixed). Anyway - I would like to keep versioned dir and
symlink - as it is done now - at least until I'll be sure about docbook5. Then I
will think about version drop in some of docbook-packages. Thanks for suggestions.


Comment 9 Alex Lancaster 2007-12-14 12:10:03 UTC
Another possibility (not necessarily the best) is to have packages like dblatex
put fiiles in the versioned directory rather than the unversioned directory,
then make the package dependent on the specific version of docbook-style-xsl
i.e. in dblatex have:
 
Requires: docbook-style-xsl = 1.73.2

then if you upgraded docbook-style-xsl without also simultaneously updating
dblatex it will at least break deps noisily at install-time rather than failing
silently at runtime.

Comment 10 Ondrej Vasik 2007-12-14 16:46:20 UTC
Just adding dblatex maintainer ... as he might have some feelings/ideas about
that topic.

Comment 11 Neal Becker 2007-12-14 18:07:15 UTC
I could be misunderstanding something here, but I think your diagnostic is 
wrong.  dblatex doesn't hardcode the path, it stores to

ln -s ../sgml/docbook/xsl-stylesheets/dblatex 
$RPM_BUILD_ROOT%{_datadir}/dblatex/xsl

which picks up the versioned symlink along the way:
xsl-stylesheets -> xsl-stylesheets-1.73.2

I guess the issue you're concerned with is that if you upgrade the package 
that owns xsl-stylesheets-1.73.2 it breaks dblatex?

One possibility is to place dblatex xsl-xslstylesheets into a different 
location, but I don't know enough about sgml to then make sure dblatex will 
find them.  Still, this sounds like the best idea.


Comment 12 Patrice Dumas 2007-12-14 18:26:52 UTC
(In reply to comment #11)

> I guess the issue you're concerned with is that if you upgrade the package 
> that owns xsl-stylesheets-1.73.2 it breaks dblatex?

Indeed.
 
> One possibility is to place dblatex xsl-xslstylesheets into a different 
> location, but I don't know enough about sgml to then make sure dblatex will 
> find them.  Still, this sounds like the best idea.

It is what is intended by dblatex upstream, to put them in something
along %{_datadir}/dblatex/xsl, in fact we link from the docbook directory
to that directory since dblatex only searches in that directory.

So the  solution is not to install in docbook directory but in dblatex
directory only.

Comment 13 Florian La Roche 2007-12-20 14:50:11 UTC
Looks like the newest dblatex in Fedora-rawhide has this fixed, so I am
closing this bz now.

Thanks a lot,

Florian La Roche


Comment 14 Fedora Update System 2007-12-20 19:50:05 UTC
dblatex-0.2.8-2.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update dblatex'

Comment 15 Fedora Update System 2007-12-20 19:52:43 UTC
dblatex-0.2.8-2.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update dblatex'

Comment 16 Fedora Update System 2007-12-28 17:13:33 UTC
dblatex-0.2.8-2.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2008-01-03 01:30:38 UTC
dblatex-0.2.8-2.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.