diff options
author | Mark Linimon <linimon@FreeBSD.org> | 2009-11-08 00:27:14 +0000 |
---|---|---|
committer | Mark Linimon <linimon@FreeBSD.org> | 2009-11-08 00:27:14 +0000 |
commit | 661c4bdb3ab7bc9e6ab80b54ba2b9507f2602b01 (patch) | |
tree | a8729b3543340cfff80dc5e855ecfbc109868628 | |
parent | Allow for the possibility of powerpc builds. (diff) |
Allow for the possibility of powerpc builds. Since these are not yet
set up, add error handling to gracefully handle missing directories.
Notes
Notes:
svn path=/head/; revision=243953
-rwxr-xr-x | Tools/portbuild/scripts/zbackup | 10 | ||||
-rw-r--r-- | Tools/portbuild/scripts/zexpire | 10 |
2 files changed, 16 insertions, 4 deletions
diff --git a/Tools/portbuild/scripts/zbackup b/Tools/portbuild/scripts/zbackup index 18f806fddbb6..6937980e8e25 100755 --- a/Tools/portbuild/scripts/zbackup +++ b/Tools/portbuild/scripts/zbackup @@ -10,7 +10,8 @@ from signal import * # List of filesystems to backup backuplist=["a", "a/nfs", "a/src", "a/local", "a/ports", "a/portbuild", "a/portbuild/amd64", "a/portbuild/i386", - "a/portbuild/sparc64", "a/portbuild/ia64"] + "a/portbuild/ia64", "a/portbuild/powerprc", + "a/portbuild/sparc64"] # Directory to store backups backupdir="/dumpster/pointyhat/backup" @@ -52,7 +53,12 @@ for fs in backuplist: dir = backupdir + "/" + fs mkdirp(dir) - snaplist = [snap[0] for snap in zfs.getallsnaps(fs) if snap[0].isdigit()] + snaplist = None + try: + snaplist = [snap[0] for snap in zfs.getallsnaps(fs) if snap[0].isdigit()] + except zfs.NoSuchFS: + print "no such fs %s, skipping" % fs + continue dofull = 0 diff --git a/Tools/portbuild/scripts/zexpire b/Tools/portbuild/scripts/zexpire index 672c997dcd01..cb599468b093 100644 --- a/Tools/portbuild/scripts/zexpire +++ b/Tools/portbuild/scripts/zexpire @@ -13,8 +13,9 @@ expirelist=(("a", 14), ("a/portbuild", 14), ("a/portbuild/amd64", 14), ("a/portbuild/i386", 14), - ("a/portbuild/sparc64", 14), ("a/portbuild/ia64", 14), + ("a/portbuild/powerpc", 14), + ("a/portbuild/sparc64", 14), ("a/snap", 7), ("a/snap/ports", 7), ("a/snap/src-5", 7), @@ -28,7 +29,12 @@ expirelist=(("a", 14), now = datetime.datetime.now() for (fs, maxage) in expirelist: - snapdata = zfs.getallsnaps(fs) + try: + snapdata = zfs.getallsnaps(fs) + except zfs.NoSuchFS: + print "no such fs %s, skipping" % fs + continue + snaps = (i[0] for i in snapdata) for snap in snaps: |