#!/bin/bash OVERLAYDIR="/usr/local/test_overlay" PORTAGEDIR="$(portageq get_repo_path / gentoo)" # prepare a test overlay mkdir -p ${OVERLAYDIR}/net-libs/webkit-gtk/files mkdir ${OVERLAYDIR}/{profiles,metadata} echo "test" > ${OVERLAYDIR}/profiles/repo_name echo "masters = gentoo" > ${OVERLAYDIR}/metadata/layout.conf # Fill it with a valid package cp ${PORTAGEDIR}/net-libs/webkit-gtk/webkit-gtk-2.10.4-r1.ebuild \ ${OVERLAYDIR}/net-libs/webkit-gtk/webkit-gtk-2.10.0.ebuild cp ${PORTAGEDIR}/net-libs/webkit-gtk/files/webkit-gtk-2.8.5* \ ${OVERLAYDIR}/net-libs/webkit-gtk/files/ # create the Manifest file (send output to /dev/null) ebuild ${OVERLAYDIR}/net-libs/webkit-gtk/webkit-gtk-2.10.0.ebuild manifest \ >/dev/null # Look at the timestamp of the Manifest file ls -l ${OVERLAYDIR}/net-libs/webkit-gtk/Manifest stat -c %y ${OVERLAYDIR}/net-libs/webkit-gtk/Manifest # wait some minutes sleep 2m # Now rename the ebuild mv -v ${OVERLAYDIR}/net-libs/webkit-gtk/webkit-gtk-2.10.{0,2}.ebuild # Re-create the Manifest file (send output to /dev/null again) ebuild ${OVERLAYDIR}/net-libs/webkit-gtk/webkit-gtk-2.10.2.ebuild manifest \ >/dev/null # Look at the timestamp of the updated Manifest file ls -l ${OVERLAYDIR}/net-libs/webkit-gtk/Manifest stat -c %y ${OVERLAYDIR}/net-libs/webkit-gtk/Manifest # boom!