# Take the Slackware x86 ChangeLog entries and produce a list of update candidates # for KDE on ARM. # # Stuart Winter # 2-Feb-2011 ################################################################################################## # Process: # - Add all of the new ChangeLog entries to slackwarearm-current/ChangeLog.txt, prefixed with + # (this is from the output of a diff between the old vs new ChangeLog) # - Run this script! ################################################################################################## source /usr/share/slackdev/buildkit.sh export CWD=$SLACKSOURCE/kde CHANGELOG=~/ac/ChangeLog.txt rm -f /tmp/kde*-new-* # Return a package name that has been stripped of the dirname portion # and any of the valid extensions (only): pkgbase() { # basename + strip extensions .tbz, .tgz, .tlz and .txz echo "$1" | sed 's?.*/??;s/\.t[bglx]z$//' } # Strip version, architecture and build from the end of the name package_name() { pkgbase $1 | sed 's?-[^-]*-[^-]*-[^-]*$??' } # Ensure that the R2B markers are present, as that indicates Sud has been run # and that we've had a manual check through the list. if [ "$( grep -E '^**R2B|^**R2B' ${CHANGELOG} | xargs )" != "**R2B **R2B" ]; then printf "\nERROR: r2b markers are not present within ${CHANGELOG}, or perhaps less than or more than one set?\n" exit 1 fi # Find packages between the R2B markers, filtering out any 'Removed' packages # (as these are handled by 'Sud'): ( sed -n '/^**R2B/,/^**R2B/p' $CHANGELOG | sed -e 's?_KDEMOD_ ??g' | grep -E "^\+kde/.*t[bglx]z:" | sed 's?^+??g'| grep -v "\:[[:space:]]\{2,\}Removed\.$" | cut -d/ -f2 | while read line ; do pkg=$( package_name $( echo $line | awk -F: '{print $1}' ) ) # Ensure it's one of the KDE mainstream package, not one of the other 'KDE' packages within the source/kde directory: if [ ! -d $PORTSRC/source/kde/$pkg ]; then echo $line | grep -q "Upgraded" && tag=Upgraded echo $line | grep -q "Added" && tag=Added echo $line | grep -q "Rebuilt" && tag=Rebuilt echo " \"${pkg} ${tag:0:1}\" \\" >> /tmp/kde-new-$tag else # Call it out separately echo $pkg >> /tmp/kde-new-noncore fi done ) cat << EOF Slackware KDE series packages ============================== Added ----- $( [ -s /tmp/kde-new-Added ] && sort /tmp/kde-new-Added | uniq ) Upgraded -------- $( [ -s /tmp/kde-new-Upgraded ] && sort /tmp/kde-new-Upgraded | uniq ) Rebuilt ------- $( [ -s /tmp/kde-new-Rebuilt ] && sort /tmp/kde-new-Rebuilt | uniq ) Combined list ------------- $( [ -s /tmp/kde-new-Added ] && sort /tmp/kde-new-Added | uniq ) $( [ -s /tmp/kde-new-Upgraded ] && sort /tmp/kde-new-Upgraded | uniq ) $( [ -s /tmp/kde-new-Rebuilt ] && sort /tmp/kde-new-Rebuilt | uniq ) Non-KDE core list ----------------- $( [ -s /tmp/kde-new-noncore ] && sort /tmp/kde-new-noncore | uniq ) EOF