[MacPorts] #18304: MacPorts doesn't build port "nice" if build.cmd contains a space
#18304: MacPorts doesn't build port "nice" if build.cmd contains a space -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: MacPorts Future Component: base | Version: 1.7.0 Keywords: | Port: -------------------------------------+-------------------------------------- MacPorts can build ports "nice" so that they allow other CPU-intensive processes to take precedence. When this feature was added to MacPorts, it broke some ports, such as ocaml, because of the way they were setting build.cmd; see #16091. The solution to that ticket was to disable the nice build in this case, but I think we can do better and enable nice builds even in this case. -- Ticket URL: <http://trac.macports.org/ticket/18304> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18304: MacPorts doesn't build port "nice" if build.cmd contains a space -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: MacPorts Future Component: base | Version: 1.7.0 Keywords: | Port: -------------------------------------+-------------------------------------- Comment(by perry@…): I've attached a patch that seems to work for tmux (uses an "uncreative" build.cmd) and ocaml (uses a "creative" build.cmd). {{{ ---> Building tmux DEBUG: Executing org.macports.build (tmux) DEBUG: Environment: CPATH='/opt/local/include' LIBRARY_PATH='/opt/local/lib' MACOSX_DEPLOYMENT_TARGET='10.5' DEBUG: Assembled command: 'cd "/opt/local/var/macports/build /_Users_perry_src_macports-trunk_dports_sysutils_tmux/work/tmux-0.9" && /usr/bin/nice -n 20 /usr/bin/make -j1 all' ---> Building ocaml DEBUG: Executing org.macports.build (ocaml) DEBUG: port disallows a parallel build DEBUG: Environment: CPATH='/opt/local/include' LIBRARY_PATH='/opt/local/lib' MACOSX_DEPLOYMENT_TARGET='10.5' DEBUG: Assembled command: 'cd "/opt/local/var/macports/build /_Users_perry_src_macports-trunk_dports_lang_ocaml/work /ocaml-3.11.1" && unset LD_PREBIND LD_PREBIND_ALLOW_OVERLAP && /usr/bin/nice -n 20 /usr/bin/make world.opt' }}} -- Ticket URL: <http://trac.macports.org/ticket/18304#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18304: MacPorts doesn't build port "nice" if build.cmd contains a space -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: MacPorts Future Component: base | Version: 1.7.0 Keywords: haspatch | Port: -------------------------------------+-------------------------------------- Changes (by perry@…): * keywords: => haspatch -- Ticket URL: <http://trac.macports.org/ticket/18304#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18304: MacPorts doesn't build port "nice" if build.cmd contains a space -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: MacPorts Future Component: base | Version: 1.7.0 Keywords: haspatch | Port: -------------------------------------+-------------------------------------- Comment(by perry@…): I've updated the patch to make it a tad smarter than before. Does this look good enough where I can commit it to trunk? -- Ticket URL: <http://trac.macports.org/ticket/18304#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18304: MacPorts doesn't build port "nice" if build.cmd contains a space --------------------------------------+------------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: enhancement | Status: closed Priority: Normal | Milestone: MacPorts 1.9.0 Component: base | Version: 1.7.0 Resolution: fixed | Keywords: haspatch Port: | --------------------------------------+------------------------------------- Changes (by raimue@…): * status: new => closed * resolution: => fixed * milestone: MacPorts Future => MacPorts 1.9.0 Comment: Committed a completely different approach for this by using setpriority(2) in proc system instead of `/usr/bin/nice`. This works now correctly with any shell command. Fixed in r65076. -- Ticket URL: <http://trac.macports.org/ticket/18304#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts