Parallel Port Building Script

Version 0.5.3
- Fix for when DESTDIR is set in Environment instead of /etc/make.conf


The cause was when DESTDIR is set in the environment, when I run the chroot command, DESTDIR was set in the chroot environment as well, causing the port install to attempt to be in another level of chroot.

For example if
# setenv DESTDIR /jail/php ; ./pports.sh lang/php5
is used, the port attempted to be installed in /jail/php/jail/php
 

Attachments

  • pports-0.5.3.sh.txt
    6.9 KB · Views: 265
In honor of AngelescuO, I have added error checking to the script. Now, if a build of a package fails, the script will finishing building anything in progress, then terminate, alerting the user to which port(s) had errors during building.
 

Attachments

  • pports-0.5.5.sh.txt
    6.2 KB · Views: 206
As I told you that script it's amazing.
Please take a look at the attached files.
I have discoveed another bug .
Running pports.sh with -b or without it sometimes if the ports options were not configured pports stall because it waits for answer for dialog ( make configure ) .

So when pports.sh it's called without -b it will rmconfig-recursively all ports options and after that recreates recursive all ports options and calls make -C portsname without BATCH flag.

When called with -b it configures only main port not and launches make -C ports with BATCH flag.
@AngelescuO:

The script is working as designed, and the code patch you provided will actually cause the script to hang.

What happens is that the script will prompt the installer for the configuration of the specified ports, if one does not exist (make -C $port config-conditional) The only difference that the Batch -b flag does is that this step is skipped.

When the packages are being built, they are all done BATCH style, with make -C $port -D BATCH package, so will not prompt the user for the configuration.

With your code, the port will prompt everyone for the configurations, and if the -b flag is not specified, the script will hang on the configuration pages.

Where were you seeing my script get hung on configurations?

Thanks for your interest.
 
Sorry,

I have sent you an bad file.
You have right with to not use make -C portsname without BATCH flag.
I don't agree with the way of configuring packages.

I expect to do an make config-recursive when not using -b flag.
When building using make config-recursive main port's option are set and also for depends.
Using BATCH flag all ports will be compiled with chosen options.

I expect to use make config when using -b flag.
When building using only make config will create only main port's options and since the packages are built with -BATCH flag the depends are built with default options.

In both cases previous config options are overwritten.

If we'll use config-conditional main port options file is created first time and it will be reused if we need to rebuild.

Greetings,
PS: The way of configure packages it's a taste matter.
 
Updated Script to version 0.5.6, to fix a bug with error checking.

Ports tended to exit with an error status, even when installed correctly, so I am now checking whether it is installed.

Also, for AngelescuO, I am now running config instead of config-conditional.

I suggest adding any package you want to configure to the command line, otherwise it will use the defaults as you noticed.

Enjoy!
 

Attachments

  • pports-0.5.6.sh.txt
    6.3 KB · Views: 197
Minor bug fixes in Error checking

This is probably the last version of this script, I want to start integrating it into Ports tree soon.
 

Attachments

  • pports-0.5.7.sh.txt
    6.3 KB · Views: 306
Hi,

I have done tests and it works great.
An idea/suggestion.
Can you add conflict resolution in it ?
Something like searching in all depends ,finding conflicts and printing them to screen before starting an build.
As an example ntfsprogs conflict with fusefs-ntfs. If I choose both the build will fail.
If the conflict will be printed to screen before starting the build it will be excellent.

Thank you.
 
0.5.7 doesnt work for me

cakersq said:
Minor bug fixes in Error checking

This is probably the last version of this script, I want to start integrating it into Ports tree soon.

Tried out version 0.5.7 on FreeBSD 8.2 amd64 and just got this:

Code:
Gathering dependencies .... etc etc
....
[  1/327] Building devel/libtool
[  2/327] Building devel/m4

Error building port(s):
devel/m4 Error Level 1
When I try to make and install devel/m4 manually it just works
 
Thanks cakersq - this script has been a big help with getting a new 8 core server built faster. Nice to be able to give it VirtualBox, VNC, and X11 components, deal with a few screens, and then just watch it keep the load as high as possible.

Can't wait to see where this and the parallel build support coming into ports will go over the next few months.
 
Back
Top