GNOME/Pattern Review/HowToCreate
From openSUSE
< GNOME | Pattern Review
This will explain how the Pattern_Review page was created, in case we want to do it again in the future.
Prerequisites;
1. Must have a local copy of the Factory tree
Steps;
1. Download patterns-openSUSE source rpm
- wget http://download.opensuse.org/distribution/SL-OSS-factory/inst-source/suse/src/patterns-openSUSE-*
2. Install the rpm
- rpm -i patterns-openSUSE-xx.x-xx.src.rpm
3. Go to the source directory and unpack the tarball
- cd /usr/src/packages/SOURCES
- tar -xvf patterns-openSUSE-data.tar.bz2
4. Go to the toinstall directory
- cd patterns-openSUSE-data/toinstall
5. Copy&Paste this content, save it, modify DIST= to point to your tree
#!/bin/bash
DIST="/data/software/opensuse/distribution/SL-OSS-factory/inst-source/suse"
cat rest_cd_gnome/requires|awk '/^[a-zA-Z0-9]/ {print $0}' >/tmp/requires.txt
cat gnome/recommends >>/tmp/requires.txt 2>/dev/null
for i in `cat /tmp/requires.txt|sort|uniq`; do
if [ $i = "base" -o $i = "default" -o $i = "enhanced_base" -o $i = "non_oss" -o $i = "non_oss_java" -o $i = "yast2_basis" -o $i = "yast2_install_wf" ]; then
# echo "Skipping $i for now..."
SKIP=$i
else
echo '{|border="1" cellpadding="5" cellspacing="0" align="center" width="100%"'
echo '|-'
echo "! style=\"background:#d9e5bf\" width=\"15%\"| Pattern: $i"
echo "! style=\"background:#d9e5bf\" width=\"30%\"| Package"
echo "! style=\"background:#d9e5bf\" width=\"10%\"| Size"
echo '! style="background:#d9e5bf;" | Comments'
echo '|-'
PARSE=`cat $i/sel`
PKGS=`cat ../data/$PARSE|awk '/^[a-zA-Z0-9]/ {print $0"\n"}'|sort`
for x in $PKGS; do
SEARCH=`zcat $DIST/setup/descr/packages.en.gz |awk '/^=Pkg: '$x'\ .*/ { if($3 !~ /^[0-9]/) {print $2$3} else {print $2}}'|uniq`
ONDISK=`find $DIST/ -name $SEARCH-[0-9]*.*.rpm`
for tmp in $ONDISK; do
tmp2=$tmp
done
ONDISK=$tmp2
SIZE=`rpm -qi -p $ONDISK 2>/dev/null|awk '/^Size/ {print $3}'`
if [ xyz$SIZE = xyz"" ]; then
echo "|$x|| || ||"
else
echo "|$x||`basename $ONDISK 2>/dev/null`||$SIZE||"
fi
echo "|-"
ONDISK=""
SIZE=""
tmp=""
tmp2=""
done
echo "|}"
echo ""
echo ""
fi
done
6. Run the script
- sh <path>/<scriptname>

