Re: [PATCH 1/2] libselinux, libsemanage: fall back to gcc in exception.sh

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 15, 2016 at 12:06 AM, William Roberts <bill.c.roberts@xxxxxxxxx> wrote:
On Mon, Nov 14, 2016 at 3:00 PM, Nicolas Iooss <nicolas.iooss@xxxxxxx> wrote:
> The SWIG wrapper already includes the header files using #include (look at
> the beginning of libselinux/src/selinuxswig_python.i [1] for example). The
> script exception.h reads the header files (through gcc -aux-info) to
> generate some SWIG code for almost every interface returning an integer
> (this code converts a negative return value to the raising of a Python
> OSError exception).
>
> In SWIG documentation [2] I have not found a way to automatically apply a
> %exception block to all functions matched by the pattern "it returns an
> integer". As you seem to believe I missed something,

I don't think you did.

could you please
> explain how you would proceed here?

Yeah that script is just generating a bunch of interface code, I would
just remove that script
and write it by hand. The only downfall is that you would have to add
a stub if you add something
to the header file, but I don't consider that a downside, I prefer to
be explicit. Especially
considering they already had to put a function in the script to skip.
I don't think the script provides
much value.

This kind of question is about the way maintainers want to manage the maintenance and development of the code. I understand the need to keep things simple, but how replacing the script with a "static file" (selinuxswig_python_exception.i, or its integration into selinuxswig_python.i) would keep working on the project simple or make it more complex is something I do not know.
An alternative approach would be something like projects using autotools do: keep the script in the git tree but package releases with selinuxswig_python_exception.i (and semanage...exception.i) so that end users do not have to build it.

Nicolas

_______________________________________________
Selinux mailing list
Selinux@xxxxxxxxxxxxx
To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx.
To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.

[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux