[MacPorts] #16900: guide: return values for tcl extensions such as existsuser and adduser
#16900: guide: return values for tcl extensions such as existsuser and adduser ---------------------------------+------------------------------------------ Reporter: dweber@macports.org | Owner: markd@macports.org Type: defect | Status: new Priority: Normal | Milestone: Website & Documentation Component: guide | Version: 1.6.0 Keywords: | Port: ---------------------------------+------------------------------------------ Can we update the guide to indicate the return values for many of the tcl extensions listed here: http://guide.macports.org/#reference.tcl-extensions For example, there is no indication that {{{existsuser}}} returns the UID for a user that exists - what does it return when no user exists - 0? Also, it would be helpful to know whether {{{adduser}}} skips, replaces, or updates specific fields for any user that already exists. Does {{{adduser}}} provide any return values to indicate success or failure (or otherwise - like UID)? Thanks, Darren -- Ticket URL: <http://trac.macports.org/ticket/16900> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16900: guide: return values for tcl extensions such as existsuser and adduser ----------------------------------+----------------------------------------- Reporter: dweber@macports.org | Owner: markd@macports.org Type: defect | Status: new Priority: Normal | Milestone: Website & Documentation Component: guide | Version: 1.6.0 Resolution: | Keywords: Port: | ----------------------------------+----------------------------------------- Comment(by blb@macports.org): existsuser description improved in r40978. -- Ticket URL: <http://trac.macports.org/ticket/16900#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16900: guide: return values for tcl extensions such as existsuser and adduser ----------------------------------+----------------------------------------- Reporter: dweber@macports.org | Owner: markd@macports.org Type: defect | Status: new Priority: Normal | Milestone: Website & Documentation Component: guide | Version: 1.6.0 Resolution: | Keywords: Port: | ----------------------------------+----------------------------------------- Comment(by dweber@macports.org): If it's of any interest, I created a small test port to investigate how the system manages the postgres user account. This could be used as a template to adapt and extend it for use with any port that requires user or group management. I would love some further explanation of how the tcl extensions work and a short note on the general utilities availabe on OSX for management of users (eg, command line utilities would be most useful as 'see also' items in the guide). {{{ PortSystem 1.0 name adduser version 0.1 categories test description test tcl extensions fetch {} checksum {} extract {} use_configure no build {} destroot {} set usr postgres set grp postgres post-destroot { # Check if the user and group already exist and replace them? set uid [existsuser ${usr}] set gid [existsgroup ${grp}] ui_msg "${uid}:${gid}" if {!${uid}} { ui_msg "Creating user:\t ${usr}" } else { ui_msg "User ${usr} exists,\t uid=${uid}" } if {!${gid}} { ui_msg "Creating group:\t ${grp}" } else { ui_msg "Group ${grp} exists,\t gid=${gid}" } } }}} -- Ticket URL: <http://trac.macports.org/ticket/16900#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16900: guide: return values for tcl extensions such as existsuser and adduser -----------------------+--------------------- Reporter: dweber@… | Owner: markd@… Type: defect | Status: new Priority: Normal | Milestone: Component: guide | Version: 1.6.0 Resolution: | Keywords: Port: | -----------------------+--------------------- Comment (by egall@…): I think #38440 might be related to and/or a duplicate of this ticket. -- Ticket URL: <https://trac.macports.org/ticket/16900#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
#16900: guide: return values for tcl extensions such as existsuser and adduser --------------------------+-------------------------------- Reporter: dweber@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: guide | Version: Resolution: | Keywords: Port: | --------------------------+-------------------------------- Changes (by mf2k@…): * owner: markd@… => macports-tickets@… * version: 1.6.0 => * type: defect => enhancement Comment: markd has retired. See #44782. -- Ticket URL: <https://trac.macports.org/ticket/16900#comment:5> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts