2
# Copyright (C) 2017 Canonical, Ltd.
3
# Author: Emily Ratliff <emily.ratliff@canonical.com>
6
# This script attempts to retrieve the package list from the latest
9
TMPSNAPDIR=$(mktemp -d -t snap-XXXXXX)
10
outfile=$TMPSNAPDIR/ubuntu-core-supported.txt
12
cat > "$outfile" << EOM
13
# Source packages on this list are used to build Ubuntu Core.
14
# This package list is generated by
15
# $ \$UCT/scripts/get-core-package-list
19
unsquashfs -d $TMPSNAPDIR -f core_*.snap -ef /usr/share/snappy/dpkg.list
20
#grep "^ii" $TMPSNAPDIR/usr/share/snappy/dpkg.list | awk '{print $2}' >> $TMPSNAPDIR/tmp-ubuntu-core-supported.txt
21
grep "^ii" $TMPSNAPDIR/usr/share/snappy/dpkg.list | while read _ binpkg _ _
23
echo "binary package: $binpkg"
24
dpkg-query --show -f '${source:Package}\n' $binpkg >> $TMPSNAPDIR/tmp-outfile.txt
26
sort $TMPSNAPDIR/tmp-outfile.txt | uniq >> $outfile
27
echo "You can find your package list in $outfile"
28
echo "Any package failures that were noted on screen should be resolved by hand."