F-i-f / tweaks-system-menu

Gnome Shell Extension to put Gnome Tweaks in the system menu.
GNU General Public License v3.0
38 stars 14 forks source link

install-po: Unknown subcommand #17

Closed yochananmarqos closed 2 years ago

yochananmarqos commented 2 years ago

I'm guessing something changed with the release of Meson 0.6.0?

Running custom install script '/build/gnome-shell-extension-tweaks-system-menu-git/src/tweaks-system-menu/meson-gse/meson-scripts/install-po tweaks-system-menu /usr/share/gnome-shell/extensions/tweaks-system-menu@extensions.gnome-shell.fifi.org/locale'
--- stdout ---
Unknown subcommand.

--- stderr ---

FAILED: install script '/build/gnome-shell-extension-tweaks-system-menu-git/src/tweaks-system-menu/meson-gse/meson-scripts/install-po tweaks-system-menu /usr/share/gnome-shell/extensions/tweaks-system-menu@extensions.gnome-shell.fifi.org/locale' exit code 1, stopped

meson-log.txt:

Build started at 2021-12-19T02:30:36.869399
Main binary: /usr/bin/python
Build Options: -Db_lto=true -Db_pie=true -Dprefix=/usr -Dlibexecdir=lib -Dsbindir=bin -Dauto_features=enabled -Dbuildtype=plain -Dwrap_mode=nodownload
Python system: Linux
The Meson build system
Version: 0.60.2
Source dir: /build/gnome-shell-extension-tweaks-system-menu-git/src/tweaks-system-menu
Build dir: /build/gnome-shell-extension-tweaks-system-menu-git/src/build
Build type: native build
Project name: tweaks-system-menu
Project version: 16
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: x86_64
Host machine cpu: x86_64
Target machine cpu family: x86_64
Target machine cpu: x86_64
Running command: /usr/bin/test -f src/prefs.js
--- stdout ---

--- stderr ---

Running command: /usr/bin/test -f src/stylesheet.css
--- stdout ---

--- stderr ---

Running command: /usr/bin/test -f schemas/org.gnome.shell.extensions.tweaks-system-menu.gschema.xml
--- stdout ---

--- stderr ---

Program js78 found: YES (/usr/bin/js78)
Program js68 found: NO
Program js60 found: NO
Program js52 found: NO
Running command: /usr/bin/sh -c echo $HOME
--- stdout ---
/build

--- stderr ---

Running command: /usr/bin/git describe --tags --long --always
--- stdout ---
v16-0-ge97809c

--- stderr ---

Configuring metadata.json using configuration
Program sh found: YES (/usr/bin/sh)
Adding test "Checking syntax of src/extension.js"
Adding test "Checking syntax of src/prefs.js"
Running command: /usr/bin/test -d po
--- stdout ---

--- stderr ---

Program /build/gnome-shell-extension-tweaks-system-menu-git/src/tweaks-system-menu/meson-gse/meson-scripts/install-po found: YES (/build/gnome-shell-extension-tweaks-system-menu-git/src/tweaks-system-menu/meson-gse/meson-scripts/install-po)
Build targets in project: 11

tweaks-system-menu 16

  User defined options
    auto_features: enabled
    buildtype    : plain
    libexecdir   : lib
    prefix       : /usr
    sbindir      : bin
    wrap_mode    : nodownload
    b_lto        : true
    b_pie        : true

Found ninja-1.10.2 at /usr/bin/ninja
Failed to guess install tag for /usr/share/gnome-shell/extensions/tweaks-system-menu@extensions.gnome-shell.fifi.org/schemas/org.gnome.shell.extensions.tweaks-system-menu.gschema.xml
Failed to guess install tag for /usr/share/gnome-shell/extensions/tweaks-system-menu@extensions.gnome-shell.fifi.org/extension.js
Failed to guess install tag for /usr/share/gnome-shell/extensions/tweaks-system-menu@extensions.gnome-shell.fifi.org/prefs.js
Failed to guess install tag for /usr/share/gnome-shell/extensions/tweaks-system-menu@extensions.gnome-shell.fifi.org/metadata.json
Failed to guess install tag for /usr/share/gnome-shell/extensions/tweaks-system-menu@extensions.gnome-shell.fifi.org/convenience.js
Failed to guess install tag for /usr/share/gnome-shell/extensions/tweaks-system-menu@extensions.gnome-shell.fifi.org/logger.js
Failed to guess install tag for /usr/share/gnome-shell/extensions/tweaks-system-menu@extensions.gnome-shell.fifi.org/schemas/org.gnome.shell.extensions.tweaks-system-menu.gschema.xml
Failed to guess install tag for /usr/share/gnome-shell/extensions/tweaks-system-menu@extensions.gnome-shell.fifi.org/extension.js
Failed to guess install tag for /usr/share/gnome-shell/extensions/tweaks-system-menu@extensions.gnome-shell.fifi.org/prefs.js
Failed to guess install tag for /usr/share/gnome-shell/extensions/tweaks-system-menu@extensions.gnome-shell.fifi.org/metadata.json
Failed to guess install tag for /usr/share/gnome-shell/extensions/tweaks-system-menu@extensions.gnome-shell.fifi.org/convenience.js
Failed to guess install tag for /usr/share/gnome-shell/extensions/tweaks-system-menu@extensions.gnome-shell.fifi.org/logger.js
eli-schwartz commented 2 years ago

https://github.com/F-i-f/tweaks-system-menu/blob/a976528e1ecf66dd0e1c81c0fefbfd5ca0f67d39/meson-gse/po/meson.build#L17-L19

https://github.com/F-i-f/tweaks-system-menu/blob/master/meson-gse/meson-scripts/install-po

@F-i-f

I don't understand the purpose of this script. It seems to be perfectly identical to not using the script, and instead just leaving install: true as the default.

Whatever the purpose of this script is, it should not be using meson --internal ... commands as those are not public API and the name --internal is specifically intended to warn people against using it, because it is after all "internal" implementation details.

I would prefer to avoid renaming that to meson --do-not-use-this-in-scripts ..., but if you think that that would be clearer... ;)

Current versions of meson refactored this internal implementation detail from a script to generating build.ninja rules and installing the same way custom_target() gets installed, i.e. it runs more predictably and efficiently and gets tracked by ninja uninstall. The removal of the python functions in mesonbuild/scripts/gettext.py is not considered a breaking change.

It's not clear to me why you don't want to use the builtin installation method?

F-i-f commented 2 years ago

The builtin install for po files was broken at some point in the past, which is why a manual install was performed instead. I'll correct this.

eli-schwartz commented 2 years ago

Huh, which version was broken? And how was it broken?

Maybe that's something I fixed while reworking its internals. :D

F-i-f commented 2 years ago

meson before 0.50.0 couldn't override the destination directory of the po files, and was always installing into the system po directory. That didn't work for building Gnome Shell extensions that need to install po files in alternate locations. The meson build scripts used to only require meson 0.44.0, and was invoking meson --internal directly to work around the issue. That broke in meson 0.60.0. I've fixed the issue by requiring meson 0.50.0 (instead of 0.44.0) and relying upon the builtin po installer.

eli-schwartz commented 2 years ago

Ah, indeed... Glad to see everything works out, anyway.

If it hadn't then we could always add new options to handle interesting use cases ;)