How get all depend for component from DU2

  1. You should create a clean zone.

  2. And use this script to get all the dependencies for building a specific component:

Β 

#!/bin/bash >packages function get_depends() { [ -z "$(grep -f packages <<< $1)" ] && apt-get --dry-run build-dep $1 2>/dev/null | grep Inst | awk '{print $2}' && echo $pkg >> packages } function all_dep() { for pkg in $@; do echo $pkg all_dep $(get_depends $pkg) done } all_dep adduser >/dev/null cat packages

At the end of the script, you will get all the dependencies in a sheet named components (packages)

Next, the received data should be given to the apt-get show command and checked for their presence in the illumos section

Β 

#!/bin/bash while read pkg; do if [[ -z "$(apt-cache show $pkg | grep 'Section: illumos')" ]]; then apt-cache show $pkg | grep 'Package:\|Source:' | sed 's/^.*: //; s/([^()]*)//g' | tr '\n' ' ' | ./scr.awk >> file echo "add $pkg\n" fi done

add script awk for create table

Β 

#!/usr/bin/awk -f BEGIN { format = "%-30s %-20s\n"} { if (length($2) =="") {printf format, $1, $2=" "} else {printf format, $1, $2 } }

download all pkg from list

Β 

while read pkg; do
sudo apt-get download $pkg
done < packages