Skip to content
Snippets Groups Projects

LOS-951: Remove some crap from the email list

Merged Alex Iribarren requested to merge shortlist into master
1 file
+ 17
2
Compare changes
  • Side-by-side
  • Inline
@@ -104,13 +104,28 @@ for ARCH in $CENTOS_ARCHES; do
@@ -104,13 +104,28 @@ for ARCH in $CENTOS_ARCHES; do
[ -e "$TMPDIR/.diff:$CLEANREPO:$ARCH" ] || continue
[ -e "$TMPDIR/.diff:$CLEANREPO:$ARCH" ] || continue
echo "$REPO $ARCH repository:" >> "$TMPDIR/.email"
echo "$REPO $ARCH repository:" >> "$TMPDIR/.email"
 
 
# Let's assemble the summary of packages for this repo
 
cat "$TMPDIR/.diff:$CLEANREPO:$ARCH" > "$TMPDIR/.shortlist"
# LOS-483 Do not include i686 packages in the email
# LOS-483 Do not include i686 packages in the email
head -n $MAX_PACKAGES_LIST "$TMPDIR/.diff:$CLEANREPO:$ARCH" | awk -F';' '$5~/i686/{ next; } {printf " %-50s %s-%s\n", $2, $3, $4}' >> "$TMPDIR/.email"
sed -i '/;i686/d' "$TMPDIR/.shortlist"
 
# Remove debuginfo and debugsource packages
 
sed -i '/debug\(info\|source\)/d' "$TMPDIR/.shortlist"
 
# Remove spammy packages
 
sed -i '/glibc-langpack-/d' "$TMPDIR/.shortlist"
 
# Always comes with a new kernel anyway
 
sed -i '/kernel-\(rt-\)\{0,1\}debug-/d' "$TMPDIR/.shortlist"
 
# Docs packages are boring
 
sed -i '/-docs/d' "$TMPDIR/.shortlist"
 
sed -i '/-man-pages/d' "$TMPDIR/.shortlist"
 
 
head -n $MAX_PACKAGES_LIST "$TMPDIR/.shortlist" | awk -F';' '{printf " %-50s %s-%s\n", $2, $3, $4}' >> "$TMPDIR/.email"
LINES=`wc -l "$TMPDIR/.diff:$CLEANREPO:$ARCH" | cut -d' ' -f1`
LINES=`wc -l "$TMPDIR/.diff:$CLEANREPO:$ARCH" | cut -d' ' -f1`
if [[ $LINES -gt $MAX_PACKAGES_LIST ]]; then
if [[ $LINES -gt $MAX_PACKAGES_LIST ]]; then
echo " [... truncated list (${LINES} packages) ...]" >> "$TMPDIR/.email"
echo " [... truncated list (${LINES} packages in total) ...]" >> "$TMPDIR/.email"
fi
fi
echo >> "$TMPDIR/.email"
echo >> "$TMPDIR/.email"
 
rm "$TMPDIR/.shortlist"
done
done
done
done
Loading