if not os.path.exists(myportdir+"/CVS"):
#initial checkout
print ">>> Starting initial cvs checkout with "+syncuri+"..."
- if os.path.exists(myportdir):
- print "!!! existing '%s' directory; exiting." % myportdir
- sys.exit(1)
if os.path.exists(cvsdir+"/gentoo-x86"):
print "!!! existing",cvsdir+"/gentoo-x86 directory; exiting."
sys.exit(1)
+ try:
+ os.rmdir(myportdir)
+ except OSError, e:
+ if e.errno != errno.ENOENT:
+ sys.stderr.write(
+ "!!! existing '%s' directory; exiting.\n" % myportdir)
+ sys.exit(1)
+ del e
if portage.spawn("cd "+cvsdir+"; cvs -z0 -d "+cvsroot+" co -P gentoo-x86",settings,free=1):
print "!!! cvs checkout error; exiting."
sys.exit(1)