Hi! On Sat, 2026-03-14 at 02:17:47 +0900, Simon Richter wrote: > Package: dpkg > Version: 1.22.21 > Severity: wishlist > X-Debbugs-Cc: [email protected]
> I just got an error message > > dpkg-source: error: '!nogui' is not a valid build profile restriction > formula > > I guess it is complaining about the debian/control file, but it would be > nice to know whether it is complaining about a Build-Profiles: line, a > restriction on a build dependency, ... > > That error message could be a bit clearer on what is the actual problem > here. I think there are two problems with that error message. One is that as you point out, it is not clear what is the context for the error (location of the problem). The problem is that the Perl code needs exceptions to be able to bubble up the lower errors (w/o the end formatting) to be able to inject the outer context. This also affects the recent email parsing code, and also older reports such as the invalid deprecated dependency version relations. I've got some code to add exception support, but currently this is going to be non-ideal to use, as the code would need to rely on eval in every such case. Where in the future it will be possible to use the newly introduced try/catch builtins. I might still merge that, need to ponder about it. The second is that the message is not very clear on why the profile is invalid, because the parser is just a regex. So it only gets a boolean result. To make this more descriptive it would need to be changed from a regex parser, which would imply way more code, where I'm not sure it's worth it. Thanks, Guillem

