~lattis/muon

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
5 3

[PATCH 0/2] version-guess: misc improvements

Details
Message ID
<D1BBHNTFZL6X.21QDCK6W97MND@gmail.com>
DKIM signature
pass
Download raw message
Hi,

Patch 1/2 checks for and returns early if a null pointer is supplied as
input, thus preventing a crash / undefined behavior while dereferencing
it in the code following.

Patch 2/2 sets the version to 'unknown' as required by meson
documentation.

Thanks!

Seedo Paul (2):
  guess: return early if source string is null
  external_program: use 'unknown' as fallback version

 src/functions/external_program.c | 4 +++-
 src/guess.c                      | 4 ++++
 2 files changed, 7 insertions(+), 1 deletion(-)


base-commit: 20cafd21421d417b8964723b4c06cfa28d857814
-- 
2.45.1

[PATCH 1/2] guess: return early if source string is null

Details
Message ID
<D1BBHNTG0MQ8.1N873I3WORF7H@gmail.com>
In-Reply-To
<D1BBHNTFZL6X.21QDCK6W97MND@gmail.com> (view parent)
DKIM signature
pass
Download raw message
Patch: +4 -0
---
 src/guess.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/guess.c b/src/guess.c
index af28a7fd..aed63c3b 100644
--- a/src/guess.c
+++ b/src/guess.c
@@ -15,6 +15,10 @@ guess_version(struct workspace *wk, const char *src, obj *res)
	uint32_t dots = 0, ver_len = 0, new_len, new_dots;
	const char *p, *ver = NULL;

	if (!src) {
		return false;
	}

	for (p = src; *p; ++p) {
		new_len = 0;
		new_dots = 0;
-- 
2.45.1

[PATCH 2/2] external_program: use 'unknown' as fallback version

Details
Message ID
<D1BBHNTG10VH.CSTLCQZ4GPRA@gmail.com>
In-Reply-To
<D1BBHNTFZL6X.21QDCK6W97MND@gmail.com> (view parent)
DKIM signature
pass
Download raw message
Patch: +3 -1
---
 src/functions/external_program.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/functions/external_program.c b/src/functions/external_program.c
index c8fcce60..5c749225 100644
--- a/src/functions/external_program.c
+++ b/src/functions/external_program.c
@@ -27,7 +27,9 @@ find_program_guess_version(struct workspace *wk, obj cmd_array, obj *ver)
	join_args_argstr(wk, &argstr, &argc, args);

	if (run_cmd(&cmd_ctx, argstr, argc, NULL, 0) && cmd_ctx.status == 0) {
		guess_version(wk, cmd_ctx.out.buf, ver);
		if (!guess_version(wk, cmd_ctx.out.buf, ver)) {
			*ver = make_str(wk, "unknown");
		}
	}

	run_cmd_ctx_destroy(&cmd_ctx);
-- 
2.45.1
Details
Message ID
<qhktvug7x6wr7x6umknicmjeokieeqdlq2mumqkr6vsipusgvm@ktn55bmb3mdf>
In-Reply-To
<D1BBHNTFZL6X.21QDCK6W97MND@gmail.com> (view parent)
DKIM signature
pass
Download raw message
Thanks for these patches, I've applied all of them.  How complete does
this make the python module?  What more is missing?

Thanks,
Stone

Re: [PATCH 2/2] external_program: use 'unknown' as fallback version

Details
Message ID
<D1EOACLFMVC9.2KM2E1NP6UD9Z@gmail.com>
In-Reply-To
<D1BBHNTG10VH.CSTLCQZ4GPRA@gmail.com> (view parent)
DKIM signature
pass
Download raw message
Hi,

Other unimplemented methods / options:

The main missing methods are `dependency()` and`extension_modules()`.
Except for two additional kwargs, `dependency()` takes the same kwargs 
as the standard `dependency()` function and returns a `python_dependency`
(that exposes the same methods as `dep` object). `extension_modules()`
has more or less the same semantics as the function `shared_module()`. 
Since both of these methods have considerable overlap with their existing 
standard function counterparts, I am unsure how best to implement them. 
Is it possible to "offload" part of a module to meson script? Any ideas 
/ help welcome.


- `install_sources()`: this works mostly similiar to `install_data()`. I
  will send a patch implementing this soon (mostly copy pasted from
  `install_data()` implementation.)
- Global option `python.bytecompile` is accepted, but does nothing
  currently.
- Additional kwargs for some methods.

Thanks!
Seedo

Re: [PATCH 2/2] external_program: use 'unknown' as fallback version

Details
Message ID
<bhrvln74wv6c2gwqldd7v4koz2poqgi7c6lrwjas7v4rjmpxdq@oyhzkct5owpx>
In-Reply-To
<D1EOACLFMVC9.2KM2E1NP6UD9Z@gmail.com> (view parent)
DKIM signature
pass
Download raw message
Great news, I'm happy the python module is coming along.

> Is it possible to "offload" part of a module to meson script?

Not currently, but this would probably be easy to implement.  I'll think
about it.

Stone
Reply to thread Export thread (mbox)