aboutsummaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorlinimon <linimon@FreeBSD.org>2009-11-08 08:27:14 +0800
committerlinimon <linimon@FreeBSD.org>2009-11-08 08:27:14 +0800
commitd0245073f5fbcdf2499efc4785475d57b53fc56c (patch)
tree4d12441e4dbf21e05e304e5447996b2573154fb3 /Tools
parent03120eeae2c33844d1ada7fc48870720dd00cfb6 (diff)
downloadfreebsd-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-xTools/portbuild/scripts/zbackup10
-rw-r--r--Tools/portbuild/scripts/zexpire10
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: