diff options
author | linimon <linimon@FreeBSD.org> | 2009-11-08 08:27:14 +0800 |
---|---|---|
committer | linimon <linimon@FreeBSD.org> | 2009-11-08 08:27:14 +0800 |
commit | d0245073f5fbcdf2499efc4785475d57b53fc56c (patch) | |
tree | 4d12441e4dbf21e05e304e5447996b2573154fb3 /Tools | |
parent | 03120eeae2c33844d1ada7fc48870720dd00cfb6 (diff) | |
download | freebsd-ports-gnome-d0245073f5fbcdf2499efc4785475d57b53fc56c.tar.gz freebsd-ports-gnome-d0245073f5fbcdf2499efc4785475d57b53fc56c.tar.zst freebsd-ports-gnome-d0245073f5fbcdf2499efc4785475d57b53fc56c.zip |
Allow for the possibility of powerpc builds. Since these are not yet
set up, add error handling to gracefully handle missing directories.
Diffstat (limited to 'Tools')
-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: |