Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Better handling of nodist packages.

  • Loading branch information...
commit cca04df9113ccde9f70dcfe0f7b35a264862a4cb 1 parent 23f4fb5
Dag Wieers authored

Showing 2 changed files with 14 additions and 20 deletions. Show diff stats Hide diff stats

  1. +2 2 dar-build
  2. +12 18 dar-functions
4 dar-build
@@ -109,7 +109,7 @@ for arg in $PKGS; do
109 109 fi
110 110
111 111 for exclude_dist in $EXCLUDE_DIST; do
112   - if [ "$exclude_dist" == "$DISTNAME" -o "$exclude_dist" == "$DISTNICK" ]; then
  112 + if [ "$exclude_dist" == "$DISTNAME" -o "$exclude_dist" == "$DISTNICK" -o "$DISTNAME" == "nodist" ]; then
113 113 warning "Distribution $DISTNAME/$DISTARCH is excluded for package $app. Aborting."
114 114 continue 2
115 115 fi
@@ -118,7 +118,7 @@ for arg in $PKGS; do
118 118 if [ "$EXCLUSIVE_DIST" ]; then
119 119 EXCLUSIVE=0
120 120 for exclusive_dist in $EXCLUSIVE_DIST; do
121   - if [ "$exclusive_dist" == "$DISTNAME" -o "$exclusive_dist" == "$DISTNICK" ]; then
  121 + if [ "$exclusive_dist" == "$DISTNAME" -o "$exclusive_dist" == "$DISTNICK" -o "$DISTNAME" == "nodist" ]; then
122 122 EXCLUSIVE=1
123 123 fi
124 124 done
30 dar-functions
@@ -206,7 +206,7 @@ function set_dists {
206 206 fi
207 207 if [ "$(metaconf Dist)" == "nodist" ]; then
208 208 NODIST="nodist"
209   - DISTS="$(echo "$DISTS" | cut -f1)"
  209 + DISTS="$(echo $DISTS | cut -f1)"
210 210 fi
211 211 if [ -z "$DISTS" ]; then DISTS="$DEFAULT_DISTS"; fi
212 212 }
@@ -373,7 +373,7 @@ function build_tree_apt {
373 373
374 374 ### FIXME: This should not be done hardcoded, rather have a list of archs inside the dist-config
375 375 ### FIXME: And iterate through that list
376   - for disttag in $DISTTAG; do
  376 + for disttag in $DISTTAG nodist 0; do
377 377 for tag in $TAGS; do
378 378
379 379 case "$DISTARCH" in
@@ -384,10 +384,7 @@ function build_tree_apt {
384 384 -o -name "*.$tag.$disttag.athlon.rpm" \
385 385 -o -name "*.$disttag.$tag.noarch.rpm" \
386 386 -o -name "*.$disttag.$tag.i?86.rpm" \
387   - -o -name "*.$disttag.$tag.athlon.rpm" \
388   - -o -name "*.0.$tag.noarch.rpm" \
389   - -o -name "*.0.$tag.i?86.rpm" \
390   - -o -name "*.0.$tag.athlon.rpm" \) \
  387 + -o -name "*.$disttag.$tag.athlon.rpm" \) \
391 388 -exec ln -f {} $FTPDIR/$DISTPATH/RPMS.$REPO/ \;
392 389 # echo $PACKAGEDIR/*/*.$tag.$disttag.{noarch,i386,i586,i686,athlon}.rpm | xargs -n 1 | xargs -i ln -f {} $FTPDIR/$DISTPATH/RPMS.$REPO/ &>/dev/null # Backward compatibility
393 390 # echo $PACKAGEDIR/*/*.{$disttag,0}.$tag.{noarch,i386,i586,i686,athlon}.rpm | xargs -n 1 | xargs -i ln -f {} $FTPDIR/$DISTPATH/RPMS.$REPO/ &>/dev/null
@@ -401,9 +398,7 @@ function build_tree_apt {
401 398 -name "*.$tag.$disttag.noarch.rpm" \
402 399 -o -name "*.$tag.$disttag.$DISTARCH.rpm" \
403 400 -o -name "*.$disttag.$tag.noarch.rpm" \
404   - -o -name "*.$disttag.$tag.$DISTARCH.rpm" \
405   - -o -name "*.0.$tag.noarch.rpm" \
406   - -o -name "*.0.$tag.$DISTARCH.rpm" \) \
  401 + -o -name "*.$disttag.$tag.$DISTARCH.rpm" \) \
407 402 -exec ln -f {} $FTPDIR/$DISTPATH/RPMS.$REPO/ \;
408 403 # echo $PACKAGEDIR/*/*.$tag.$disttag.{noarch,$DISTARCH}.rpm | xargs -n 1 | xargs -i ln -f {} $FTPDIR/$DISTPATH/RPMS.$REPO/ &>/dev/null # Backward compatibility
409 404 # echo $PACKAGEDIR/*/*.{$disttag,0}.$tag.{noarch,$DISTARCH}.rpm | xargs -n 1 | xargs -i ln -f {} $FTPDIR/$DISTPATH/RPMS.$REPO/ &>/dev/null
@@ -419,8 +414,12 @@ function build_repo_apt {
419 414
420 415 echo "Building Apt repo."
421 416
  417 + if [ ! -d "$TEMPDIR/.cache/genbasedir/$DISTNICK/$REPO" ]; then
  418 + mkdir -p "$TEMPDIR/.cache/genbasedir/$DISTNICK/$REPO"
  419 + fi
  420 +
422 421 ### Build Apt repository
423   - genbasedir --flat --bloat --bz2only $FTPDIR/$DISTPATH $REPO >/dev/null
  422 + genbasedir --flat --bloat --cachedir="$TEMPDIR/.cache/genbasedir/$DISTNICK/$REPO" --bz2only $FTPDIR/$DISTPATH $REPO >/dev/null
424 423 # genbasedir --progress --flat --bloat $FTPDIR/$DISTPATH $REPO
425 424 # genbasedir --progress --hashonly $FTPDIR/$DISTPATH $REPO
426 425 }
@@ -441,7 +440,7 @@ function build_tree_yum {
441 440 ### FIXME: This should not be done hardcoded, rather have a list of archs inside the dist-config
442 441 ### FIXME: And iterate through that list
443 442 ### Hardlink files
444   - for disttag in $DISTTAG; do
  443 + for disttag in $DISTTAG nodist 0; do
445 444 for tag in $TAGS; do
446 445
447 446 case "$DISTARCH" in
@@ -452,10 +451,7 @@ function build_tree_yum {
452 451 -o -name "*.$tag.$disttag.athlon.rpm" \
453 452 -o -name "*.$disttag.$tag.noarch.rpm" \
454 453 -o -name "*.$disttag.$tag.i?86.rpm" \
455   - -o -name "*.$disttag.$tag.athlon.rpm" \
456   - -o -name "*.0.$tag.noarch.rpm" \
457   - -o -name "*.0.$tag.i?86.rpm" \
458   - -o -name "*.0.$tag.athlon.rpm" \) \
  454 + -o -name "*.$disttag.$tag.athlon.rpm" \) \
459 455 -exec ln -f {} $FTPDIR/$DISTPATH/$REPO/RPMS/ \;
460 456 # echo $PACKAGEDIR/*/*.$tag.$disttag.{noarch,i386,i586,i686,athlon}.rpm | xargs -n 1 | xargs -i ln -f {} $FTPDIR/$DISTPATH/$REPO/RPMS/ &>/dev/null # Backward compatibility
461 457 # echo $PACKAGEDIR/*/*.{$disttag,0}.$tag.{noarch,i386,i586,i686,athlon}.rpm | xargs -n 1 | xargs -i ln -f {} $FTPDIR/$DISTPATH/$REPO/RPMS/ &>/dev/null
@@ -469,9 +465,7 @@ function build_tree_yum {
469 465 -name "*.$tag.$disttag.noarch.rpm" \
470 466 -o -name "*.$tag.$disttag.$DISTARCH.rpm" \
471 467 -o -name "*.$disttag.$tag.noarch.rpm" \
472   - -o -name "*.$disttag.$tag.$DISTARCH.rpm" \
473   - -o -name "*.0.$tag.noarch.rpm" \
474   - -o -name "*.0.$tag.$DISTARCH.rpm" \) \
  468 + -o -name "*.$disttag.$tag.$DISTARCH.rpm" \) \
475 469 -exec ln -f {} $FTPDIR/$DISTPATH/$REPO/RPMS/ \;
476 470 # echo $PACKAGEDIR/*/*.$tag.$disttag.{noarch,$DISTARCH}.rpm | xargs -n 1 | xargs -i ln -f {} $FTPDIR/$DISTPATH/$REPO/RPMS/ &>/dev/null # Backward compatibility
477 471 # echo $PACKAGEDIR/*/*.{$disttag,0}.$tag.{noarch,$DISTARCH}.rpm | xargs -n 1 | xargs -i ln -f {} $FTPDIR/$DISTPATH/$REPO/RPMS/ &>/dev/null

0 comments on commit cca04df

Please sign in to comment.
Something went wrong with that request. Please try again.