Opened 10 years ago

Closed 10 years ago

#30096 closed defect (fixed)

MacPorts 2.0.0-beta3: fails to create the user 'macports' properly. (on Mac OS X 10.5)

Reported by: takanori@… Owned by: jmroot (Joshua Root)
Priority: High Milestone: MacPorts 2.0.0
Component: base Version:
Keywords: MacPorts 2.0.0-beta3 haspatch Cc:


On Mac OS X 10.5, during the install process of MacPorts, user 'macports' isn't created properly.

(As the result of the following example, user 'macports' is created, but it doesn't have PrimaryGroupID.)

 Mac OS X 10.5:
 $ sudo make install
 [ ! -f /opt/local/etc/macports/mp_version ] || rm -vf /opt/local/etc/macports/mp_version
 /usr/bin/install -c -o root -g admin -m 444 setupenv.bash  /opt/local/share/macports/
 /usr/bin/install -c -o root -g admin -m 444 macports-pubkey.pem  /opt/local/share/macports/
 Creating user "macports"
 <dscl_cmd> DS Error: -14136 (eDSRecordNotFound)
 *** Uncaught Exception: <NSInvalidArgumentException> ([DSoDataNode initWithDir:value:] value i
 s not a valid NSString nor NSData)
 /usr/bin/tclsh src/upgrade_sources_conf_default.tcl "/opt/local"
 /usr/bin/tclsh src/images_to_archives.tcl "/opt/local/share/macports/Tcl"

This is because 10.5's dseditgroup command doesn't return any error code even if the group doesn't exist.

 Mac OS X 10.5:
 $ dseditgroup -o read foobar && echo "non-exist"
 Mac OS X 10.6:
 $ dseditgroup -o read foobar && echo "non-exist"
 Group not found.

Attachments (1) (569 bytes) - added by takanori@… 10 years ago.
And, here is a suggested patch. ;-)

Download all attachments as: .zip

Change History (2)

Changed 10 years ago by takanori@…

Attachment: added

And, here is a suggested patch. ;-)

comment:1 Changed 10 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed

Thanks. r80335

Note: See TracTickets for help on using tickets.