[MacPorts] #17579: With archive mode enabled, any command tries to create the directory if it doesn't exist
#17579: With archive mode enabled, any command tries to create the directory if it doesn't exist ---------------------------------+------------------------------------------ Reporter: blb@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Low | Milestone: MacPorts base bugs Component: base | Version: 1.8.0 Keywords: archive permissions | Port: ---------------------------------+------------------------------------------ If you enable archive mode ({{{portarchivemode yes}}} in macports.conf), and the packages directory (${prefix}/var/macports/packages) doesn't yet exist, every port command will fail if not run as root, like 'port info': {{{ $ /mp/bin/port info bind9 portarchivepath /mp/var/macports/packages does not exist and could not be created: can't create directory "/mp/var/macports/packages": permission denied while executing "mportinit ui_options global_options global_variations" Error: /mp/bin/port: Failed to initialize MacPorts, portarchivepath /mp/var/macports/packages does not exist and could not be created: can't create directory "/mp/var/macports/packages": permission denied }}} Since this is being done in [browser:trunk/base/src/macports1.0/macports.tcl#L553 mportinit] it will always be hit when port runs; perhaps this should be created when necessary in package1.0/portarchive.tcl? -- Ticket URL: <http://trac.macports.org/ticket/17579> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17579: With archive mode enabled, any command tries to create the directory if it doesn't exist ---------------------------------+------------------------------------------ Reporter: blb@… | Owner: snc@… Type: defect | Status: assigned Priority: Low | Milestone: MacPorts Future Component: base | Version: 1.8.0 Keywords: archive permissions | Port: ---------------------------------+------------------------------------------ Changes (by snc@…): * cc: snc@… (removed) * owner: macports-tickets@… => snc@… * status: new => assigned -- Ticket URL: <http://trac.macports.org/ticket/17579#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17579: With archive mode enabled, any command tries to create the directory if it doesn't exist -------------------------------+-------------------------------------------- Reporter: blb@… | Owner: snc@… Type: defect | Status: closed Priority: Low | Milestone: MacPorts Future Component: base | Version: 1.8.0 Resolution: fixed | Keywords: archive permissions Port: | -------------------------------+-------------------------------------------- Changes (by snc@…): * status: assigned => closed * resolution: => fixed Comment: Fixed in r60447. Thanks! -- Ticket URL: <http://trac.macports.org/ticket/17579#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17579: With archive mode enabled, any command tries to create the directory if it doesn't exist -------------------------------+-------------------------------------------- Reporter: blb@… | Owner: snc@… Type: defect | Status: closed Priority: Low | Milestone: MacPorts 1.9.0 Component: base | Version: 1.8.0 Resolution: fixed | Keywords: archive permissions Port: | -------------------------------+-------------------------------------------- Changes (by jmr@…): * milestone: MacPorts Future => MacPorts 1.9.0 -- Ticket URL: <http://trac.macports.org/ticket/17579#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17579: With archive mode enabled, any command tries to create the directory if it doesn't exist -------------------------------+-------------------------------------------- Reporter: blb@… | Owner: snc@… Type: defect | Status: closed Priority: Low | Milestone: MacPorts 1.9.0 Component: base | Version: 1.8.0 Resolution: fixed | Keywords: archive permissions Port: | -------------------------------+-------------------------------------------- Comment(by jmr@…): Wait, how does creating the directory in archive_init stop mportinit from failing? -- Ticket URL: <http://trac.macports.org/ticket/17579#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17579: With archive mode enabled, any command tries to create the directory if it doesn't exist -------------------------------+-------------------------------------------- Reporter: blb@… | Owner: snc@… Type: defect | Status: closed Priority: Low | Milestone: MacPorts 1.9.0 Component: base | Version: 1.8.0 Resolution: fixed | Keywords: archive permissions Port: | -------------------------------+-------------------------------------------- Comment(by snc@…): For me, when testing, the problem went away by placing it there. For example, if the directory doesn't exist, calling `port search NAME` would fail. Placing a test to create it before it gets to the error is handled by archive_init. -- Ticket URL: <http://trac.macports.org/ticket/17579#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17579: With archive mode enabled, any command tries to create the directory if it doesn't exist -------------------------------+-------------------------------------------- Reporter: blb@… | Owner: snc@… Type: defect | Status: reopened Priority: Low | Milestone: MacPorts 1.9.0 Component: base | Version: 1.8.0 Resolution: | Keywords: archive permissions Port: | -------------------------------+-------------------------------------------- Changes (by jmr@…): * status: closed => reopened * resolution: fixed => Comment: Still fails with latest trunk: {{{ % /opt/mptest/bin/port info zlib portarchivepath /opt/mptest/var/macports/packages does not exist and could not be created: can't create directory "/opt/mptest/var/macports/packages": permission denied while executing "mportinit ui_options global_options global_variations" Error: /opt/mptest/bin/port: Failed to initialize MacPorts, portarchivepath /opt/mptest/var/macports/packages does not exist and could not be created: can't create directory "/opt/mptest/var/macports/packages": permission denied }}} -- Ticket URL: <http://trac.macports.org/ticket/17579#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17579: With archive mode enabled, any command tries to create the directory if it doesn't exist -------------------------------+-------------------------------------------- Reporter: blb@… | Owner: snc@… Type: defect | Status: new Priority: Low | Milestone: MacPorts 1.9.0 Component: base | Version: 1.8.0 Resolution: | Keywords: archive permissions Port: | -------------------------------+-------------------------------------------- Changes (by snc@…): * status: reopened => new Comment: Looking again I do see that was silly of me. I see two options: using warnings and disabling archivemode, or using the alternate build prefix. Any preference on which we fail to? -- Ticket URL: <http://trac.macports.org/ticket/17579#comment:9> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17579: With archive mode enabled, any command tries to create the directory if it doesn't exist -------------------------------+-------------------------------------------- Reporter: blb@… | Owner: snc@… Type: defect | Status: new Priority: Low | Milestone: MacPorts 1.9.0 Component: base | Version: 1.8.0 Resolution: | Keywords: archive permissions Port: | -------------------------------+-------------------------------------------- Comment(by snc@…): In r60789 I've rolled back the changes from r60447, and I've added a permissions message in r60791. -- Ticket URL: <http://trac.macports.org/ticket/17579#comment:10> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17579: With archive mode enabled, any command tries to create the directory if it doesn't exist -------------------------------+-------------------------------------------- Reporter: blb@… | Owner: snc@… Type: defect | Status: closed Priority: Low | Milestone: MacPorts 1.9.0 Component: base | Version: 1.8.0 Resolution: fixed | Keywords: archive permissions Port: | -------------------------------+-------------------------------------------- Changes (by jmr@…): * status: new => closed * resolution: => fixed Comment: r66775 -- Ticket URL: <http://trac.macports.org/ticket/17579#comment:11> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts