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

qmake plugin ignores source-subdir parameter? #950

Open
LazyT opened this issue Dec 27, 2024 · 2 comments
Open

qmake plugin ignores source-subdir parameter? #950

LazyT opened this issue Dec 27, 2024 · 2 comments
Labels
Bug Something isn't working Triaged

Comments

@LazyT
Copy link

LazyT commented Dec 27, 2024

Bug Description

Looks like the "source-subdir" is being ignored for the qmake plugin (snapcraft 8.5.1) here.

It looks for the project file in the src dir, not the subdir.

Setting the "qmake-project-file" to the file doesn't work either, only including the subdir path sources/project.pro works.

Is this a bug or am I doing something wrong?

Thanks!

To Reproduce

Try to build a minimal project.

part yaml

parts:
  test:
    plugin: qmake
    source: https://<some git repo>
    source-type: git
    source-subdir: sources
    qmake-major-version: 6
    (qmake-project-file: project.pro

Relevant log output

Without qmake-project-file:
Cannot read /root/parts/test/src: file to open is a directory

With qmake-project-file:
Cannot find file: /root/parts/test/src/project.pro
@LazyT LazyT added the Bug Something isn't working label Dec 27, 2024
@lengau
Copy link
Contributor

lengau commented Jan 6, 2025

I've not reproduced this myself, but the source code makes sense that this would be the case:

str(self._part_info.part_src_dir / options.qmake_project_file)
)
else:
qmake_configure_command.append(str(self._part_info.part_src_dir))

I believe we need to change both references to part_src_dir here to reference part_build_subdir instead.

@lengau lengau added the Triaged label Jan 6, 2025
Copy link

Thank you for reporting your feedback to us!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-3857.

This message was autogenerated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Triaged
Projects
None yet
Development

No branches or pull requests

2 participants