Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

files installed by modules are not tracked #1601

Open
keszybz opened this issue Apr 10, 2017 · 11 comments
Open

files installed by modules are not tracked #1601

keszybz opened this issue Apr 10, 2017 · 11 comments
Labels

Comments

@keszybz
Copy link
Contributor

keszybz commented Apr 10, 2017

After ninja-build install, ninja-build uninstall I see

$ find /var/tmp/inst7 -type f
/var/tmp/inst7/usr/share/locale/be/LC_MESSAGES/systemd.mo
/var/tmp/inst7/usr/share/locale/be@latin/LC_MESSAGES/systemd.mo
...
/var/tmp/inst7/usr/share/locale/zh_TW/LC_MESSAGES/systemd.mo

All other installed files seem to be removed, so it seems only i18n does not support that.

@TingPing TingPing changed the title failed installed with i18n.gettext are not removed on uninstall files installed with i18n.gettext are not removed on uninstall Apr 10, 2017
@inigomartinez
Copy link
Contributor

Files installed by gnome.yelp aren't also installed. Neither files installed by i18n.gettext nor gnome.yelp are present in the meson-logs/install-log.txt file.

@TingPing
Copy link
Member

Yes any custom installation provided by modules is not currently tracked, we need to add some helper function to do so.

@raveit65
Copy link

raveit65 commented May 7, 2019

I like to push the report again.
We see that problem with several packages, currently we are switching MATE desktop to use meson build system.
mate-desktop/mate-backgrounds#22 (comment)
and
mate-desktop/mate-desktop#333 (comment)
Would be nice if this can be fixed.
Thanks.

@ericonr
Copy link
Contributor

ericonr commented Dec 16, 2020

@TingPing what sort of help is necessary for this to happen? I can try to add the feature.

@dcbaker
Copy link
Member

dcbaker commented Dec 16, 2020

There's several lists in the Build class (mesonbuild/build.py), which is in the ModuleState, man, data, and headers which modules need to update. There's code in the mesonbuild/interpreter.py that does a bunch of the front end parsing and updates these. I'm not sure exactly what it would look like, but that's where I'd start.

@andy5995
Copy link
Contributor

Anyone have suggestions as to user-friendly ways to uninstall the mo files? I was thinking of generating an uninstall_langs shell script, based on an .in file that contains variables which get replaced by the paths to the mo files.

@andy5995
Copy link
Contributor

Anyone have suggestions as to user-friendly ways to uninstall the mo files? I was thinking of generating an uninstall_langs shell script, based on an .in file that contains variables which get replaced by the paths to the mo files.

if get_option('nls')
  ul = configuration_data()
  ul.set('LOCALEDIR', localedir)
  ul.set('MESON_SOURCE_ROOT', meson.source_root())
  ul.set('MESON_PROJECT_NAME', meson.project_name())
  configure_file(input : 'uninstall_langs.sh.in',
                 output : 'uninstall_langs.sh',
                 configuration : ul)
endif
#!/bin/sh

LINGUAS=$(cat @MESON_SOURCE_ROOT@/po/LINGUAS)

for lang in $LINGUAS; do
  file="@LOCALEDIR@/$lang/LC_MESSAGES/@MESON_PROJECT_NAME@.mo"
  if test -f "$file"; then
    echo "removing $file"
    /bin/rm "$file"
  else
    echo "$file does not exist"
  fi
done

@eli-schwartz
Copy link
Member

Just realized that this ticket existed, but I fixed it for i18n (not gnome.yelp) in #9074

@keszybz
Copy link
Contributor Author

keszybz commented Aug 27, 2021

Yep, it's fixed. Thanks!

@keszybz keszybz closed this as completed Aug 27, 2021
@ericonr
Copy link
Contributor

ericonr commented Aug 27, 2021

Some maintainer might want to reopen this issue or create a similar one for gnome.yelp and any other module. Those still need to be fixed.

@xclaesse xclaesse reopened this Aug 27, 2021
pabloyoyoista added a commit to pabloyoyoista/meson that referenced this issue Dec 11, 2021
This is basically a rewrite of the gnome.yelp target to remove the
ad-hoc script, which generates multiple issues, including meson
not knowing which files were installed.

Closes mesonbuild#7653
Closes mesonbuild#9539
Closes mesonbuild#6916
Closes mesonbuild#2775
Closes mesonbuild#7034
Closes mesonbuild#1052

Related mesonbuild#9105
Related mesonbuild#1601
eli-schwartz pushed a commit to pabloyoyoista/meson that referenced this issue Jan 2, 2022
This is basically a rewrite of the gnome.yelp target to remove the
ad-hoc script, which generates multiple issues, including meson
not knowing which files were installed.

Closes mesonbuild#7653
Closes mesonbuild#9539
Closes mesonbuild#6916
Closes mesonbuild#2775
Closes mesonbuild#7034
Closes mesonbuild#1052

Related mesonbuild#9105
Related mesonbuild#1601
Dudemanguy pushed a commit to Dudemanguy/meson that referenced this issue Jan 21, 2022
This is basically a rewrite of the gnome.yelp target to remove the
ad-hoc script, which generates multiple issues, including meson
not knowing which files were installed.

Closes mesonbuild#7653
Closes mesonbuild#9539
Closes mesonbuild#6916
Closes mesonbuild#2775
Closes mesonbuild#7034
Closes mesonbuild#1052

Related mesonbuild#9105
Related mesonbuild#1601
@Volker-Weissmann
Copy link
Contributor

Some maintainer might want to reopen this issue or create a similar one for gnome.yelp and any other module. Those still need to be fixed.

26c1869 fixed this for gnome.yelp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants