Bug 1420129

Summary: %_emacs_bytecompile does not work with files in subdirectories
Product: [Fedora] Fedora Reporter: Tim Landscheidt <tim>
Component: emacsAssignee: Jan Synacek <jsynacek>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: jonathan.underwood, jsynacek, msekleta, phracek
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-29 11:45:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch to use default-directory instead of ".". none

Description Tim Landscheidt 2017-02-07 22:40:30 UTC
%_emacs_bytecompile is defined as:

| %%_emacs_bytecompile /usr/bin/emacs -batch --no-init-file --no-site-file --eval '(progn (setq load-path (cons "." load-path)))' -f batch-byte-compile

When example.el is in the current directory and subdir/test.el has "(require 'example)", this will search for example.el *only* in subdir/ (and the default load-path) because "." is resolved relative to the directory the visited file is in.  Example:

| [tim@passepartout ~/src/emacs-php-mode/php-mode-1.18.2]$ /usr/bin/emacs -batch --no-init-file --no-site-file --eval '(progn (setq load-path (cons "." load-path)))' -f batch-byte-compile skeleton/php-current.el

| In toplevel form:
| skeleton/php-current.el:33:1:Error: Cannot open load file: No such file or directory, php-mode
| [tim@passepartout ~/src/emacs-php-mode/php-mode-1.18.2]$ /usr/bin/emacs -batch --no-init-file --no-site-file --eval '(progn (setq load-path (cons ".." load-path)))' -f batch-byte-compile skeleton/php-current.el
| [tim@passepartout ~/src/emacs-php-mode/php-mode-1.18.2]$

Replacing "." with default-directory works.

Comment 1 Tim Landscheidt 2017-02-07 22:46:07 UTC
Created attachment 1248510 [details]
Patch to use default-directory instead of ".".

Comment 2 Jan Synacek 2017-02-08 13:25:17 UTC
I'm not sure how this macro was supposed to work and if the "." is there on purpose or not. I definitely don't want to change this in F25 unless I'm sure that it won't break packages that use it during their build.

Let's ask the original author of that macro.

Comment 3 Jonathan Underwood 2017-03-20 21:37:20 UTC
I can't recall why I coded the macro that way - it was a good few years ago now! I think it was meant to serve only the very simple case of single file packages, under the assumption that more complicated multifold packages would have a makefile.

I suggest creating a new macro rather than changing the old one if you want to be sure about not breaking other packages in f25.

In rawhide you could replace the old macro with the new one.

Comment 4 Fedora End Of Life 2017-11-16 19:44:35 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 5 Fedora Update System 2017-11-27 12:58:00 UTC
emacs-php-mode-1.18.2-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-ccccec1245

Comment 6 Fedora Update System 2017-11-28 06:45:59 UTC
emacs-php-mode-1.18.2-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-ccccec1245

Comment 7 Fedora Update System 2017-11-28 07:24:39 UTC
emacs-php-mode-1.18.2-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-c8dca89d9d

Comment 8 Jonathan Underwood 2017-11-28 12:00:32 UTC
I don't think an update to emacs-php-mode should be closing this bug?

Comment 9 Jan Synacek 2017-11-28 13:30:01 UTC
It definitely shouldn't.

Comment 10 Fedora Update System 2018-02-15 16:23:20 UTC
emacs-php-mode-1.18.2-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2018-02-15 16:46:49 UTC
emacs-php-mode-1.18.2-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Fedora End Of Life 2018-05-03 07:58:26 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 13 Fedora End Of Life 2018-05-29 11:45:10 UTC
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
is no longer maintained, which means that it will not receive any
further security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.