After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 691030 - Introduce a new 'posix' module
Introduce a new 'posix' module
Status: RESOLVED WONTFIX
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-01-02 19:11 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2015-02-07 16:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Makefile-gir: Fix indentation (802 bytes, patch)
2013-01-02 19:11 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
Add a new posix library (2.42 KB, patch)
2013-01-02 19:11 UTC, Jasper St. Pierre (not reading bugmail)
reviewed Details | Review
system: Remove getuid/getgid/getpid (2.64 KB, patch)
2013-01-02 19:22 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2013-01-02 19:11:02 UTC
This is something I noticed today. gjs has internal wrappers for
these functions, but it would probably make sense to move them
into a static gir. Building a home for them is better than completing
the module, so I'm porting over the ones we have wrappers for in gjs.
Comment 1 Jasper St. Pierre (not reading bugmail) 2013-01-02 19:11:04 UTC
Created attachment 232555 [details] [review]
Makefile-gir: Fix indentation
Comment 2 Jasper St. Pierre (not reading bugmail) 2013-01-02 19:11:06 UTC
Created attachment 232556 [details] [review]
Add a new posix library

This is for functions that can't natively be scanned,
like getpid/getgid/getuid, but can easily be introspected.
Comment 3 Jasper St. Pierre (not reading bugmail) 2013-01-02 19:22:26 UTC
Created attachment 232560 [details] [review]
system: Remove getuid/getgid/getpid

The system module was to be intended for functions for the language
system, not for OS support. We now have the static "posix" library
to wrap calls like this.
Comment 4 Colin Walters 2013-01-02 20:12:19 UTC
Review of attachment 232556 [details] [review]:

In the big picture, we should try hard to push application API where at all possible into the GTK+ stack, not gjs.  That said, it's still true of course that 
some APIs are really JavaScript specific of course and need to live in gjs.

On these specific APIs - GCredentials already has the pid and uid.  So I think the right fix here may be to port apps over to that.  Does anyone actually need gid?  If so we could look at adding that to GCredentials.
Comment 5 Colin Walters 2013-01-02 20:12:41 UTC
Review of attachment 232555 [details] [review]:

Sure.
Comment 6 Colin Walters 2013-01-02 20:16:21 UTC
Review of attachment 232560 [details] [review]:

But this needs an analysis of who is possibly using these APIs.  Did you do that?  From a quick grep in gnome-shell and gnome-documents, it looks like they're not used...can you think of anything else?
Comment 7 Jasper St. Pierre (not reading bugmail) 2013-01-02 20:29:48 UTC
Review of attachment 232560 [details] [review]:

They were intended to be used for PolicyKit. See:

https://bugzilla.gnome.org/show_bug.cgi?id=646187
Comment 8 Jasper St. Pierre (not reading bugmail) 2013-01-02 20:30:25 UTC
As far as I'm aware, Sushi is the only other big consumer of gjs, and it's not using this either.
Comment 9 Colin Walters 2013-01-02 22:39:58 UTC
(In reply to comment #7)
> Review of attachment 232560 [details] [review]:
> 
> They were intended to be used for PolicyKit. See:
> 
> https://bugzilla.gnome.org/show_bug.cgi?id=646187

And that code is now deleted from what I can tell.  So, let's go with the third patch only?
Comment 10 Colin Walters 2013-01-02 22:40:23 UTC
Comment on attachment 232560 [details] [review]
system: Remove getuid/getgid/getpid

Looks good.
Comment 11 Jasper St. Pierre (not reading bugmail) 2013-01-02 22:56:31 UTC
It never landed.
Comment 12 Jasper St. Pierre (not reading bugmail) 2013-01-02 23:04:37 UTC
Comment on attachment 232560 [details] [review]
system: Remove getuid/getgid/getpid

Attachment 232560 [details] pushed as 83e00e8 - system: Remove getuid/getgid/getpid
Comment 13 Jasper St. Pierre (not reading bugmail) 2013-01-02 23:05:21 UTC
Attachment 232555 [details] pushed as c212cc8 - Makefile-gir: Fix indentation


Thanks for the review. Your argument makes sense, so I'll WONTFIX this one.
Comment 14 André Klapper 2015-02-07 16:47:22 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]