Bug 241811 - "Lost" files trigger emacs errors in asymptote
Summary: "Lost" files trigger emacs errors in asymptote
Alias: None
Product: Fedora
Classification: Fedora
Component: asymptote (Show other bugs)
(Show other bugs)
Version: rawhide
Hardware: All Linux
Target Milestone: ---
Assignee: Jose Pedro Oliveira
QA Contact: Fedora Extras Quality Assurance
Whiteboard: bzcl34nup
Depends On:
TreeView+ depends on / blocked
Reported: 2007-05-30 19:29 UTC by Michal Jaegermann
Modified: 2008-04-04 01:30 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-04-04 01:30:46 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
suggested changes to asymptote specs (3.71 KB, patch)
2007-05-30 21:03 UTC, Michal Jaegermann
no flags Details | Diff

Description Michal Jaegermann 2007-05-30 19:29:20 UTC
Description of problem:

Asymptote spec file has errors which cause that after a package
installation an attempt to open in emacs (and xemacs likely too)
a file like 'new.asy' results in the following:

Loading /usr/share/emacs/site-lisp/asy-mode.el (source)...
File mode specification error: (file-error "Cannot open load file"

The problem is that asymptote supplied file "asy-keywords.el"
is indeed not in a load path; but there is more.

First in asy-mode.el the following can be found:

;; Notes:
;; For full functionality the two-mode-mode package should also be installed
;; (http://www.dedasys.com/freesoftware/files/two-mode-mode.el).

That file could, and most likely should, be added to asymptote package
as an additional source.  It is available under "Apache License,
Version 2.0" so this does not appear to be a problem.

I see why you are doing "the real installation work" in triggers
which depend on editors installed.  It that whole section in
'%install' which starts with "# Emacs/Xemacs mode and init files",
and similar for vim, only for a benefit of %ghost?  It does not
look that this is used otherwise.

Absolute symbolic links may turn out to be problematic when something
will get, say, mounter over NFS.  I would think that 'cp -a'
(in %install section and in triggers) would be much safer and files
in question are not that big after all.

In any case I would suggest something in that style (obviously
consistently in all places) for *.el installation:

  install -dm 755 $RPM_BUILD_ROOT$dir/site-start.d
  install -dm 755 $RPM_BUILD_ROOT$dir/asymptote
  ( cd $RPM_BUILD_ROOT$dir/asymptote && \
    ln -s %{_datadir}/%{name}/*.el .  ## or 'cp -p ...' here
    cd $RPM_BUILD_ROOT$dir/site-start.d && \
    ln -s ../asymptote/asy-init.el . )

Bother with .elc files does not produce nowadays anything
which would be here noticeable.

Last but not least asymptote provides 'asymptote.info.gz' and
'asy-faq.info.gz' while in '%post' install-info is run with only
the first one (with obvious consequences).

Version-Release number of selected component (if applicable):
asymptote-1.29-1.fc7 and all other releases

How reproducible:

Comment 1 Michal Jaegermann 2007-05-30 21:03:14 UTC
Created attachment 155750 [details]
suggested changes to asymptote specs

These are spec changes along the lines as suggested in the report.

A closer look at compilation record reveals also that the current
animation support assumes 'animate.sty' (not included, on CTAN)
while there are still references in sources to a removed
'pdfanim_temp.sty'.  Also Makefile in asymptote-1.29/doc/FAQ/
seems to have issues ('asy-faq.xrefdb' is used by bfnnconv.pl
before it is created) but what is harmed is not immediately obvious.

Comment 2 Michal Jaegermann 2007-05-30 21:21:52 UTC
Sigh!  Make this 'mkdir' in triggers into 'mkdir -p'.  Clearly
I do not have much experience with triggers.

Comment 3 Jose Pedro Oliveira 2007-05-31 18:21:01 UTC
Thanks for the report and the patch (I'm a vim guy ;)).

I'll try to update the specfile tomorrow or saturday, and notify one of the
upstream authors (at least John Bowman is very responsive).

PS - The triggers are very fragile; IIRC I duplicated the triggers from the
rpmdevtools specfile.

Comment 4 Michal Jaegermann 2007-06-05 12:42:19 UTC
In asymptote-1.29-2.fc7 emacs support is as broken as it was before.
Patches attached to comment #1 are doing that correctly.

Comment 5 Jose Pedro Oliveira 2007-06-05 18:46:49 UTC
(In reply to comment #4)
> In asymptote-1.29-2.fc7 emacs support is as broken as it was before.
> Patches attached to comment #1 are doing that correctly..

I know. I didn't add time to finish reviewing/testing your patch (IIRC rpmlint
was still complaining about the a couple of emacs symbolic links). I also want
to change the vim syntax file symbolic links (still to test it).


Comment 6 Michal Jaegermann 2007-06-05 20:18:17 UTC
> I know.
Ok. I did not intend to rush you.
> rpmlint was still complaining about the a couple of emacs symbolic links
I am guessing that complaints were about absolute instead of relative
links.  If you will mount /usr/share, or /usr/share/emacs, over NFS then
absolute links may go to another file system; even worse - these could be
links to files in $RPM_BUILD_ROOT tree. Relative links may or may not help
with the first problem.  They may make rpmlint and builder happier but you
have to be careful how they are used (bind mounts may be present).  That
is why I suggested that just a copy could be simpler.

The patch from comment #1 does shave off $RPM_BUILD_ROOT while
constructing links but silently assumes that $RPM_BUILD_ROOT does
not end with "/".  If it does then that can be handled for a price
of a bit of ugliness but it is probably not that important as those
links are really only placeholders and you create real ones in triggers.
Which means that you can replace those in %install with
    ln -s ../../../asymptote/*.el .
anyway without a need to do
    ln -s ../../../../../usr/share/asymptote/*.el .
which is safer.  The above assumes a layout like in my patch.

If you want links then maybe you should do those in that style
both in %install and in triggers.  The second variant is preferred.

Comment 7 Jose Pedro Oliveira 2007-06-17 16:34:56 UTC
asymptote 1.30 has already been built (for FC-6, F-7, and devel) and should
start appearing soon in the mirrors (already being pushed for rawhide and FC-6;
no ETA for F-7).

This version should solve the asy-keywords.el problem. I also tried to minimize
the code in the triggers by avoiding creating the asymptote subdirectory under
the emacs/xemacs owned directories).

Still in the TODO list:

* shipping the two-mode-mode.el mentioned in the first comment

* maybe package animate.sty as tetex-animate

* look into the documentation building problems reported in comment #1

* try to discover why the documentation fails to build in FC-5
  (again; asymptote 1.27 also had a similar problem)


Comment 8 Michal Jaegermann 2007-06-17 19:41:44 UTC
> * try to discover why the documentation fails to build in FC-5
>  (again; asymptote 1.27 also had a similar problem)

I do not see it.  I just tried rebuilding src.rpo package for 1.30
on FC-5 and I got:

'rpm -qdp RPMS/i386/asymptote-1.30-1.fc5.i386.rpm' gave me this:

( 192 lines from /usr/share/doc/asymptote-1.30/examples/ skipped)

I am not sure where could be the problem.

Comment 9 Michal Jaegermann 2007-06-17 19:44:07 UTC
I should likely mention - there is no older asymptote version installed
on a machine used for a build from comment #8.

Comment 10 Michal Jaegermann 2007-06-17 20:17:08 UTC
One more minor nit which showed up when going through a compilation
record.  Something like that is present:

mkdir -p asy-faq.html
perl bfnnconv.pl asy-faq.bfnn
no asy-faq.xrefdb (No such file or directory) at bfnnconv.pl line 43.

followed by other complaints dependent on the above.

This is of no consequece as BUILD/asymptote-1.30/doc/FAQ/Makefile
has now

        perl bfnnconv.pl asy-faq.bfnn
        perl bfnnconv.pl asy-faq.bfnn

and on this missing file is created on the first run.  OTOH if
you want to avoid spurious error reports then you may want to 
change that to

        perl bfnnconv.pl asy-faq.bfnn >/dev/null 2>&1
        perl bfnnconv.pl asy-faq.bfnn

Comment 11 Bug Zapper 2008-04-04 01:00:46 UTC
Based on the date this bug was created, it appears to have been reported
against rawhide during the development of a Fedora release that is no
longer maintained. In order to refocus our efforts as a project we are
flagging all of the open bugs for releases which are no longer
maintained. If this bug remains in NEEDINFO thirty (30) days from now,
we will automatically close it.

If you can reproduce this bug in a maintained Fedora version (7, 8, or
rawhide), please change this bug to the respective version and change
the status to ASSIGNED. (If you're unable to change the bug's version
or status, add a comment to the bug and someone will change it for you.)

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we're following is outlined here:

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

Comment 12 Michal Jaegermann 2008-04-04 01:30:46 UTC
I believe that the current asymptote does a correct thing one way
or another and simply nobody closed the bug.  If I am mistaken
then please somebody reopen.

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