/
How get all depend for component from DU2
How get all depend for component from DU2
You should create a clean zone.
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
#!/bin/bash
while read pkg; do
sudo apt-get download $pkg
done < packages
, multiple selections available,
Related content
List of du2 components
List of du2 components
More like this
Build component pkg result for du2.0.2.94
Build component pkg result for du2.0.2.94
More like this
Get dependencies script for DU4
Get dependencies script for DU4
More like this
All build depends for build components from DU2
All build depends for build components from DU2
More like this
list of dependencies for components
list of dependencies for components
More like this
Build depends for DU2
Build depends for DU2
More like this