Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 836034 - app-emacs/ddskk: uses variables banned in scope (VariableScope)
Summary: app-emacs/ddskk: uses variables banned in scope (VariableScope)
Status: IN_PROGRESS
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: GNU Emacs project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: forbidden-variable-use
  Show dependency tree
 
Reported: 2022-03-26 03:36 UTC by Sam James
Modified: 2023-03-07 05:36 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-03-26 03:36:37 UTC
This package uses variables banned in some scopes. This may stop working in future versions of Portage.

$ pkgcheck scan -k VariableScope app-emacs/ddskk
app-emacs/ddskk
  VariableScope: version 17.1: variable 'ED' used in 'src_prepare', lines 30, 31
Comment 1 Teika kazura 2023-03-02 04:32:57 UTC
Seems like we can drop these two lines altogether, judging from the fact that ddskk has been working for years with null $ED.

Or one can move them to src_install, before the first emake line.
Comment 2 Ulrich Müller gentoo-dev 2023-03-02 07:57:40 UTC
One problem is that when I look at SKK-CFG then I don't speak the language of the comments.

;; PREFIX:
;;   全てのファイルがインストールされるディレクトリの root ディレクトリ。
;;   この変数に値を設定しなかった場合は、Emacs がインストールされているパス
;;   から自動的に設定される。

Google translator suggests this:
"The root directory of the directory where all files are installed. If you do not set a value for this variable, it will automatically be set from the path where Emacs is installed."

;; LISPDIR:
;; ADDITIONAL_LISPDIR:
;;   追加で load-path を設定したいディレクトリを指定する。
;;   例えば skk-lookup.el をインストールする際は、インストール時に lookup.el を
;;   require するので、lookup がインストールされているディレクトリがディフォル
;;   トで (emacs が -q オプション付きで起動されたとき) load-path に加えられてい
;;   ない場合は、そのディレクトリを明示的に load-path に追加する必要がある。そ
;;   の際、この変数を利用して下記のように設定する。
;;
;;   (setq ADDITIONAL_LISPDIR "/usr/local/lib/emacs/site-lisp/lookup")

"Specify the directory you want to set load-path additionally. For example, when installing skk-lookup.el, lookup.el is required during installation, so the directory where lookup is installed is by default (when emacs is started with the -q option) in the load-path. If not, the directory must be explicitly added to load-path. At that time, use this variable to set as follows."

Are these translations accurate?
Comment 3 Ulrich Müller gentoo-dev 2023-03-02 08:46:08 UTC
(In reply to Teika kazura from comment #1)
> Seems like we can drop these two lines altogether, judging from the fact
> that ddskk has been working for years with null $ED.

At least for me, the ebuild then fails in src_install:

>>> Install app-emacs/ddskk-17.1 into /tmp/portage/app-emacs/ddskk-17.1/image
make -j1 install-elc 
emacs --batch --no-init-file --quick --load SKK-MK --funcall SKK-MK-install-elc
Loading /tmp/portage/app-emacs/ddskk-17.1/work/ddskk-17.1/SKK-CFG...
Debugger entered--Lisp error: (file-error "Creating directory" "Permission denied" "/usr/share/emacs/site-lisp/skk")
  signal(file-error ("Creating directory" "Permission denied" "/usr/share/emacs/site-lisp/skk"))
[...]

make: *** [Makefile:65: install-elc] Error 255
 * ERROR: app-emacs/ddskk-17.1::gentoo failed (install phase):
 *   emake failed

> Or one can move them to src_install, before the first emake line.

This seems to work. Please test ddskk-17.1-r1.
Comment 4 Larry the Git Cow gentoo-dev 2023-03-02 08:46:21 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d71f13c5ed48109a5e2c88b5fa9361d696d29b7

commit 5d71f13c5ed48109a5e2c88b5fa9361d696d29b7
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2023-03-02 08:44:45 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2023-03-02 08:46:12 +0000

    app-emacs/ddskk: Don't use ${ED} in src_prepare
    
    EAPI 8. Minor cleanups.
    
    Bug: https://bugs.gentoo.org/836034
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

 app-emacs/ddskk/ddskk-17.1-r1.ebuild | 75 ++++++++++++++++++++++++++++++++++++
 1 file changed, 75 insertions(+)
Comment 5 Teika kazura 2023-03-07 05:36:33 UTC
Thanks. Your fix seems to work.

(In reply to Ulrich Müller from comment #3)
> At least for me, the ebuild then fails in src_install:
> [snip]

Oops, sorry, I thought I tried it.