mesonbuild / mesonbuild/meson

pkgconfig.generate() produces different files the second time

Open
#5,488 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

module:pkgconfig
Dominant language
Python
Stars
6.6k
Forks
1.9k
Avg merge
2d 6h
Merged PRs (30d)
33

Description

```
project('shared library test', 'c')
lib = shared_library('mylib')
pkg = import('pkgconfig')
pkg.generate(lib, filebase: 'foo')
pkg.generate(lib, filebase: 'bar')
```

Results in two different files:
```diff
$ diff -Nur foo.pc bar.pc
--- foo.pc 2019-06-13 23:24:33.150752000 +0200
+++ bar.pc 2019-06-13 23:24:33.150752000 +0200
@@ -5,5 +5,5 @@
Name: mylib
Description: shared library test: mylib
Version: undefined
-Libs: -L${libdir} -lmylib
+Requires: foo
Cflags: -I${includedir}
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the two pkgconfig.generate() calls shown in the report and compare foo.pc with bar.pc. Trace the pkgconfig.generate entry point and its handling of repeated generation; done means equivalent inputs produce consistent, correct package files rather than changing the second output.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.