- Timestamp:
- 03/23/2023 05:38:51 PM (19 months ago)
- Branches:
- ablfs-more, trunk
- Children:
- 4dfe8f9
- Parents:
- 42dfc6e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BLFS/gen_pkg_book.sh
r42dfc6e r1bf09c1 298 298 echo -e "done\n" 299 299 300 if [ -n "$DEP_CHECK" ]; then 301 if (( ${#TARGET[*]} != 1 )); then 302 printf "\nWARNING: If dependencies are checked, only one package\n" 303 printf " shoud be selected. Not generating check code.\n" 304 exit 305 fi 306 307 LIST_LFS="$(xsltproc $ListLFS $LFS_FULL)" 308 LIST_NEEDED="$(echo $FULL_LIST)" 309 LIST_INSTALLED="$(porg -a | sed 's/-[[:digit:]].*//')" 310 LIST_UNNEEDED= 311 for p in $LIST_INSTALLED; do 312 case " $LIST_LFS " in *" $p "*) continue ;; esac 313 case " $LIST_NEEDED " in *" $p "*) continue ;; esac 314 LIST_UNNEEDED="$LIST_UNNEEDED $p" 315 done 316 cat >head.tmp <<EOF 317 #!/bin/bash 318 set -e 319 320 # Remove all unneeded packages 321 VERSIONED_LIST= 322 for p in $LIST_UNNEEDED; do 323 VERSIONED_LIST="\$VERSIONED_LIST \$(porg \$p)" 324 porg -rb \$p 325 done 326 327 # Function to restore packages 328 restore_pack { 329 for p in \$VERSIONED_LIST; do 330 porgball -e -l /var/lib/packages/\${p}.porg.tar.gz 331 done 332 } 333 334 trap restore_pack ERR 335 336 EOF 337 cat >tail.tmp <<EOF 338 restore_pack 339 exit 340 EOF 341 342 sed -e "1,2d" -e '$d' scripts/*${TARGET} >script.tmp 343 cat head.tmp script.tmp tail.tmp >scripts/*${TARGET} 344 rm *.tmp 345 fi 300 346 #clean_configuration
Note:
See TracChangeset
for help on using the changeset viewer.