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

Fix dependency tree in Makefile to ensure schema is built *after* it's dropped when running in parallel #787

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ZimbiX
Copy link
Collaborator

@ZimbiX ZimbiX commented Mar 17, 2023

Resolves #786.

I barely have any experience with Makefiles, but managed to figure this one out pretty quickly.

Previously, when using -j4, it was showing an error on every second run:

➜ make -j4 install
  [remove      ]
/home/brendan/.local/share/gnome-shell/extensions/system-monitor@paradoxxx.zero.gmail.com
  [extension   ] OK
Reloading extensions does not work correctly and is no longer supported
  [reload      ] OK
  [remove      ] OK
  [translate   ] ar/ ca/ cs/ de/ es_ES/ es_MX/ fa/ fi/ fr/ hu/ it/ ja/
ko/ nl_NL/ pl/ pt/ pt_BR/ ro/ ru/ sk/ tr/ uk/ zh_CN/
  [translate   ] OK
cp: cannot stat
'system-monitor@paradoxxx.zero.gmail.com/schemas/gschemas.compiled': No
such file or directory
make: *** [Makefile:162: build] Error 1

Now it works consistently:

➜ make -j4 install
  [remove      ]
/home/brendan/.local/share/gnome-shell/extensions/system-monitor@paradoxxx.zero.gmail.com
  [gschemas    ] OK
  [extension   ] OK
Reloading extensions does not work correctly and is no longer supported
  [reload      ] OK
  [remove      ] OK
  [translate   ] ar/ ca/ cs/ de/ es_ES/ es_MX/ fa/ fi/ fr/ hu/ it/ ja/
ko/ nl_NL/ pl/ pt/ pt_BR/ ro/ ru/ sk/ tr/ uk/ zh_CN/
  [translate   ] OK
  [build       ] OK
  [install     ]
/home/brendan/.local/share/gnome-shell/extensions/system-monitor@paradoxxx.zero.gmail.com
Reloading extensions does not work correctly and is no longer supported
  [reload      ] OK
  [install     ] OK

…s dropped when running in parallel

Previously showing an error on every second run:

```
➜ make -j4 install
  [remove      ]
/home/brendan/.local/share/gnome-shell/extensions/system-monitor@paradoxxx.zero.gmail.com
  [extension   ] OK
Reloading extensions does not work correctly and is no longer supported
  [reload      ] OK
  [remove      ] OK
  [translate   ] ar/ ca/ cs/ de/ es_ES/ es_MX/ fa/ fi/ fr/ hu/ it/ ja/
ko/ nl_NL/ pl/ pt/ pt_BR/ ro/ ru/ sk/ tr/ uk/ zh_CN/
  [translate   ] OK
cp: cannot stat
'system-monitor@paradoxxx.zero.gmail.com/schemas/gschemas.compiled': No
such file or directory
make: *** [Makefile:162: build] Error 1
```

Now it works consistently:

```
➜ make -j4 install
  [remove      ]
/home/brendan/.local/share/gnome-shell/extensions/system-monitor@paradoxxx.zero.gmail.com
  [gschemas    ] OK
  [extension   ] OK
Reloading extensions does not work correctly and is no longer supported
  [reload      ] OK
  [remove      ] OK
  [translate   ] ar/ ca/ cs/ de/ es_ES/ es_MX/ fa/ fi/ fr/ hu/ it/ ja/
ko/ nl_NL/ pl/ pt/ pt_BR/ ro/ ru/ sk/ tr/ uk/ zh_CN/
  [translate   ] OK
  [build       ] OK
  [install     ]
/home/brendan/.local/share/gnome-shell/extensions/system-monitor@paradoxxx.zero.gmail.com
Reloading extensions does not work correctly and is no longer supported
  [reload      ] OK
  [install     ] OK
```
@mgalgs
Copy link
Collaborator

mgalgs commented Mar 17, 2023

LGTM. I don't know why the _drop-gschemas target even exists though since it's not used anywhere else... IMO the rm should just be part of the ./$(UUID)/schemas/gschemas.compiled recipe and _drop-gschemas should just be nuked...

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

Successfully merging this pull request may close these issues.

Subsequent make install fails / succeeds. ( make -j4 )
2 participants