summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-01-12 11:09:05 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-01-12 11:09:05 +0000
commitf8c85545530d5e71f0b99377d7186eff73a27b89 (patch)
tree025d39afe858e1a8d8ae6c11cbab3ae31f9effd2
parent2efa08e45f04e32478fac57b131254787fe7af13 (diff)
Fix the annoying base-files autorebuild bug.
When checking file mtimes in directories, timestamp.pl was following symlinks. This broke on base-files, because there are symlinks to /tmp and to /proc/mounts in the build directory. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6084 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--include/package.mk2
-rw-r--r--package/base-files/Makefile1
-rwxr-xr-xscripts/timestamp.pl5
3 files changed, 4 insertions, 4 deletions
diff --git a/include/package.mk b/include/package.mk
index 1b69cf25d..ffab228aa 100644
--- a/include/package.mk
+++ b/include/package.mk
@@ -21,7 +21,7 @@ define Build/DefaultTargets
ifeq ($(DUMP),)
ifeq ($(CONFIG_AUTOREBUILD),y)
_INFO:=
- ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) .),$(PKG_BUILD_DIR))
+ ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) . $(PKG_FILE_DEPEND)),$(PKG_BUILD_DIR))
_INFO+=$(subst $(TOPDIR)/,,$(PKG_BUILD_DIR))
$(PKG_BUILD_DIR)/.prepared: package-clean
endif
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index 14917f683..33e6522e7 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -13,6 +13,7 @@ PKG_NAME:=base-files
PKG_RELEASE:=8
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)
+PKG_FILE_DEPEND:=$(PLATFORM_DIR)
REV:=$(shell LANG=C svn info | awk '/^Revision:/ { print$$2 }' )
ifeq ($(REV),)
diff --git a/scripts/timestamp.pl b/scripts/timestamp.pl
index a3aa50cb0..a4c5cae01 100755
--- a/scripts/timestamp.pl
+++ b/scripts/timestamp.pl
@@ -17,9 +17,8 @@ sub get_ts($$) {
while (<FIND>) {
chomp;
my $file = $_;
- open FILE, "<$file";
- my @stat = stat FILE;
- close FILE;
+ next if -l $file;
+ my @stat = stat $file;
if ($stat[9] > $ts) {
$ts = $stat[9];
$fn = $file;