Browse Source

Clifford Wolf:


			
			
				rocklinux
			
			
		
Clifford Wolf 20 years ago
parent
commit
2ecab0d39d
2 changed files with 15 additions and 7 deletions
  1. +7
    -3
      scripts/Build-Target
  2. +8
    -4
      scripts/Create-PkgQueue

+ 7
- 3
scripts/Build-Target

@ -34,17 +34,19 @@
config=default
build_only_this_job=
stages=0123456789
daemon_mode=0
options="$*"
while [ "$1" ] ; do
case "$1" in
-cfg) config=$2 ; shift ; shift ;;
-stages) stages=$2 ; shift ; shift ;;
-job) build_only_this_job=$2 ; shift ; shift ;;
-daemon) daemon_mode=1 ; shift ;;
-nodaemon) daemon_mode=0 ; shift ;;
*) echo "Usage: $0 [ -daemon ] [ -cfg <config> ]" \
"[ -job <stage>-<package> ]"
"[ -stages <list> ] [ -job <stage>-<package> ]"
echo
echo " Compile/build all packages for a given configuration and store them as tar"
echo " balls suitable for distribution."
@ -55,6 +57,7 @@ while [ "$1" ] ; do
echo
echo " -cfg <config> the build configuration to use; defaults to 'default'"
echo " -daemon run as daemon in the background"
echo " -stages <list> only build the stages listed in the parameter"
echo " -job <stage>-<package> build only one job: the given package"
echo " in the given stage"
exit 1 ;;
@ -162,7 +165,8 @@ in the right way, the nodes will automatically start building the jobs.
done
if [ "$newqueue" = 1 ] ; then
./scripts/Create-PkgQueue -cfg $config \
./scripts/Create-PkgQueue \
-cfg $config -stages $stages \
$nobrokendeps | sort -r -n -k2 | \
if [ $ROCKCFG_PARALLEL_MAX -gt 0 ]
then head -n $ROCKCFG_PARALLEL_MAX
@ -217,7 +221,7 @@ fi
else
while
next="`./scripts/Create-PkgQueue \
-cfg "$config" -single $nobrokendeps`"
-cfg "$config" -stages $stages -single $nobrokendeps`"
[ "$next" ]
do
pkgloop_package $next

+ 8
- 4
scripts/Create-PkgQueue

@ -26,12 +26,15 @@ config=default
logdir=""
single=0
debug=0
stages=0123456789
nobrokendeps=0
while [ "$1" ] ; do
case "$1" in
-cfg)
config=$2 ; shift ; shift ;;
-stages)
stages=$2 ; shift ; shift ;;
-single)
single=1 ; shift ;;
-logdir)
@ -41,8 +44,8 @@ while [ "$1" ] ; do
-nobrokendeps)
nobrokendeps=1 ; shift ;;
*)
echo "Usage: $0 [ -cfg config ] [ -single ] \\"
echo " ${0//?/ } [ -logdir logdir ] [ -debug ]"
echo "Usage: $0 [ -cfg config ] [ -stages <list> ] [ -single ] \\"
echo " ${0//?/ } [ -logdir <logdir> ] [ -debug ]"
exit 1 ;;
esac
done
@ -52,7 +55,7 @@ done
gawk '
function check_package() {
split(pkgline, a); dep=a[2];
if ( a[1] != "X" || ! index(a[2], stagelevel) ) return;
if ( a[1] != "X" || !index(a[2], stagelevel) ) return;
repository = a[4];
package = a[5];
@ -178,7 +181,7 @@ BEGIN {
stage01_not_present=0;
stage9_no_deps=9;
nobrokendeps='$nobrokendeps';
nobrokendeps='$nobrokendeps'; stages="'$stages'";
config="'$config'"; single='$single'; debug='$debug';
logdir="'"${logdir:-build/$ROCKCFG_ID/var/adm/logs}"'";
@ -191,6 +194,7 @@ BEGIN {
close(depdb_file);
for (stagelevel=0; stagelevel<=9; stagelevel++) {
if ( !index(stages, stagelevel) ) continue;
while ( (getline pkgline < packages_file) > 0 ) {
check_package();
}

Loading…
Cancel
Save