[oe-commits] org.oe.dev stage-manager: Remove PATCHTOOL setting, it breaks things. Add code to notice files which have been removed. Don't try and set the timestamps of symlinks
rpurdie commit
oe at amethyst.openembedded.net
Mon Mar 17 08:57:53 UTC 2008
stage-manager: Remove PATCHTOOL setting, it breaks things. Add code to notice files which have been removed. Don't try and set the timestamps of symlinks
Author: rpurdie at openembedded.org
Branch: org.openembedded.dev
Revision: 1c81f55c067f96a737e8f54d256a02f24f13f8ae
ViewMTN: http://monotone.openembedded.org/revision/info/1c81f55c067f96a737e8f54d256a02f24f13f8ae
Files:
1
packages/stage-manager/files/stage-manager
packages/stage-manager/stagemanager-native_0.0.1.bb
Diffs:
#
# mt diff -r60b5bf916fc1013726982ded5d07256271806ef0 -r1c81f55c067f96a737e8f54d256a02f24f13f8ae
#
#
#
# patch "packages/stage-manager/files/stage-manager"
# from [fb9aad832b3e02894ec5c57f49b3de656987cd54]
# to [6f689ff44492001adb3e74e40736f5092991c835]
#
# patch "packages/stage-manager/stagemanager-native_0.0.1.bb"
# from [3c3bbddbeddf23d86eb06dd0518a8e7c5185345c]
# to [61aafb37d4ed9a5018bb80fde5447804ffe644fb]
#
============================================================
--- packages/stage-manager/files/stage-manager fb9aad832b3e02894ec5c57f49b3de656987cd54
+++ packages/stage-manager/files/stage-manager 6f689ff44492001adb3e74e40736f5092991c835
@@ -33,6 +33,7 @@ def read_cache(cachefile):
cache[data[0]] = {}
cache[data[0]]['ts'] = int(data[1])
cache[data[0]]['size'] = int(data[2])
+ cache[data[0]]['seen'] = False
return cache
def mkdirhier(dir):
@@ -77,13 +78,14 @@ if __name__ == "__main__":
if os.access(options.cachefile, os.F_OK):
cache = read_cache(options.cachefile)
- found = False
+ found_difference = False
def updateCache(path, fstamp):
cache[path] = {}
cache[path]['ts'] = fstamp[stat.ST_MTIME]
cache[path]['size'] = fstamp[stat.ST_SIZE]
- found = True
+ cache[path]['seen'] = True
+ found_difference = True
def copyfile(path):
if options.copydir:
@@ -94,11 +96,13 @@ if __name__ == "__main__":
def copydir(path, fstamp):
if options.copydir:
copypath = os.path.join(options.copydir, path.replace(options.parentdir, '', 1))
+ if os.path.exists(copypath):
+ os.system("rm -rf " + copypath)
if os.path.islink(path):
os.symlink(os.readlink(path), copypath)
else:
mkdirhier(copypath)
- os.utime(copypath, (fstamp[stat.ST_ATIME], fstamp[stat.ST_MTIME]))
+ os.utime(copypath, (fstamp[stat.ST_ATIME], fstamp[stat.ST_MTIME]))
for root, dirs, files in os.walk(options.parentdir):
for f in files:
@@ -115,6 +119,7 @@ if __name__ == "__main__":
print "file %s changed" % path
updateCache(path, fstamp)
copyfile(path)
+ cache[path]['seen'] = True
for d in dirs:
path = os.path.join(root, d)
fstamp = os.lstat(path)
@@ -127,13 +132,23 @@ if __name__ == "__main__":
print "dir %s changed" % path
updateCache(path, fstamp)
copydir(path, fstamp)
+ cache[path]['seen'] = True
+ todel = []
+ for path in cache:
+ if not cache[path]['seen']:
+ print "%s removed" % path
+ found_difference = True
+ todel.append(path)
+
if options.update:
print "Updating"
+ for path in todel:
+ del cache[path]
mkdirhier(os.path.split(options.cachefile)[0])
write_cache(options.cachefile, cache)
- if found:
+ if found_difference:
sys.exit(5)
sys.exit(0)
============================================================
--- packages/stage-manager/stagemanager-native_0.0.1.bb 3c3bbddbeddf23d86eb06dd0518a8e7c5185345c
+++ packages/stage-manager/stagemanager-native_0.0.1.bb 61aafb37d4ed9a5018bb80fde5447804ffe644fb
@@ -1,5 +1,5 @@ DESCRIPTION = "Helper script for package
DESCRIPTION = "Helper script for packaged-staging.bbclass"
-PR = "r7"
+PR = "r8"
SRC_URI = "file://stage-manager"
LICENSE = "GPLv2"
@@ -10,7 +10,6 @@ PACKAGE_DEPENDS = " "
DEPENDS = " "
PACKAGE_DEPENDS = " "
-PATCHTOOL = ""
INHIBIT_DEFAULT_DEPS = "1"
do_install() {
@@ -19,5 +18,5 @@ do_stage() {
}
do_stage() {
-:
+ :
}
More information about the Openembedded-commits
mailing list