Commit f71341bb authored by Holger Levsen's avatar Holger Levsen
Browse files

reproducible Debian cdebootstrap test: remove unreproducible logfiles as well



Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
parent c1bd3041
...@@ -64,22 +64,27 @@ for LOOP in "first" "second" ; do ...@@ -64,22 +64,27 @@ for LOOP in "first" "second" ; do
case ${TOOL} in case ${TOOL} in
mmdebstrap) sudo $REALTOOL $SUITE > $BUILDDIR/$SUBDIR/${TOOL}/${SUITE}.tar mmdebstrap) sudo $REALTOOL $SUITE > $BUILDDIR/$SUBDIR/${TOOL}/${SUITE}.tar
;; ;;
debootstrap) sudo $REALTOOL $SUITE $BUILDDIR/$SUBDIR/${TOOL}/${SUITE} debootstrap|cdebootstrap)
sudo $REALTOOL $SUITE $BUILDDIR/$SUBDIR/${TOOL}/${SUITE}
for LOGFILE in /var/log/bootstrap.log /var/log/dpkg.log /var/log/alternatives.log ; do for LOGFILE in /var/log/bootstrap.log /var/log/dpkg.log /var/log/alternatives.log ; do
if [ -f $LOGFILE ] ; then
output_echo "Warning: modifying $TOOL result, deleting unreproducible logfile $LOGFILE" output_echo "Warning: modifying $TOOL result, deleting unreproducible logfile $LOGFILE"
sudo rm -rf --one-file-system $BUILDDIR/$SUBDIR/${TOOL}/${SUITE}/$LOGFILE sudo rm -rf --one-file-system $BUILDDIR/$SUBDIR/${TOOL}/${SUITE}/$LOGFILE
else
output_echo "Warning: shall remove $LOGFILE but it does not exist. Maybe $TOOL was improved."
fi
done done
for FILE in /etc/machine-id /var/cache/ldconfig/aux-cache ; do for FILE in /etc/machine-id /var/cache/ldconfig/aux-cache ; do
if [ -f $LOGFILE ] ; then
output_echo "Warning: modifying $TOOL result, deleting unreproducible file $FILE because it will be created as needed" output_echo "Warning: modifying $TOOL result, deleting unreproducible file $FILE because it will be created as needed"
sudo rm -rf --one-file-system $BUILDDIR/$SUBDIR/${TOOL}/${SUITE}/$FILE sudo rm -rf --one-file-system $BUILDDIR/$SUBDIR/${TOOL}/${SUITE}/$FILE
else
output_echo "Warning: shall remove $FILE but it does not exist. Maybe $TOOL was improved."
fi
done done
sudo tar --mtime="@$SOURCE_DATE_EPOCH" --clamp-mtime -C $BUILDDIR/$SUBDIR/${TOOL}/ -cf $BUILDDIR/$SUBDIR/${TOOL}/${SUITE}.tar ${SUITE} sudo tar --mtime="@$SOURCE_DATE_EPOCH" --clamp-mtime -C $BUILDDIR/$SUBDIR/${TOOL}/ -cf $BUILDDIR/$SUBDIR/${TOOL}/${SUITE}.tar ${SUITE}
sudo rm -rf --one-file-system $BUILDDIR/$SUBDIR/${TOOL}/${SUITE} sudo rm -rf --one-file-system $BUILDDIR/$SUBDIR/${TOOL}/${SUITE}
;; ;;
cdebootstrap) sudo $REALTOOL $SUITE $BUILDDIR/$SUBDIR/${TOOL}/${SUITE}
sudo tar --mtime="@$SOURCE_DATE_EPOCH" --clamp-mtime -C $BUILDDIR/$SUBDIR/${TOOL}/ -cf $BUILDDIR/$SUBDIR/${TOOL}/${SUITE}.tar ${SUITE}
sudo rm -rf --one-file-system $BUILDDIR/$SUBDIR/${TOOL}/${SUITE}
;;
*) output_echo "Failure: ${TOOL} is unsupported." *) output_echo "Failure: ${TOOL} is unsupported."
exit 1 exit 1
;; ;;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment