summaryrefslogtreecommitdiffstats
path: root/pym/portage_file.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-07-15 19:09:11 +0000
committerZac Medico <zmedico@gentoo.org>2006-07-15 19:09:11 +0000
commit35e09c1a73bd5865a708a4c45c9c48e5f70a6f13 (patch)
treed082b9f138493df31d15f59179e7c3e062553dc8 /pym/portage_file.py
parentcec85000de0626c5a3298de9d40f481982251b5a (diff)
downloadportage-35e09c1a73bd5865a708a4c45c9c48e5f70a6f13.tar.gz
portage-35e09c1a73bd5865a708a4c45c9c48e5f70a6f13.tar.bz2
portage-35e09c1a73bd5865a708a4c45c9c48e5f70a6f13.zip
Remove the portage_file module for bug #133591.
svn path=/main/trunk/; revision=3892
Diffstat (limited to 'pym/portage_file.py')
-rw-r--r--pym/portage_file.py62
1 files changed, 0 insertions, 62 deletions
diff --git a/pym/portage_file.py b/pym/portage_file.py
deleted file mode 100644
index 711ba098b..000000000
--- a/pym/portage_file.py
+++ /dev/null
@@ -1,62 +0,0 @@
-# portage_data.py -- Calculated/Discovered Data Values
-# Copyright 1998-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-
-import os
-import portage_data
-import portage_exception
-from portage_localization import _
-
-def normpath(mypath):
- newpath = os.path.normpath(mypath)
- if len(newpath) > 1:
- if newpath[:2] == "//":
- newpath = newpath[1:]
- return newpath
-
-
-def makedirs(path, perms=0755, uid=None, gid=None, must_chown=False):
- old_umask = os.umask(0)
- if(uid is None):
- uid = portage_data.portage_uid
- if(gid is None):
- gid = portage_data.portage_gid
- if not path:
- raise portage_exception.InvalidParameter, _("Invalid path: type: '%(type)s' value: '%(path)s'") % {"path": path, "type": type(path)}
- if(perm > 1535) or (perm == 0):
- raise portage_exception.InvalidParameter, _("Invalid permissions passed. Value is octal and no higher than 02777.")
-
- mypath = normpath(path)
- dirs = string.split(path, "/")
-
- mypath = ""
- if dirs and dirs[0] == "":
- mypath = "/"
- dirs = dirs[1:]
- for x in dirs:
- mypath += x+"/"
- if not os.path.exists(mypath):
- os.mkdir(mypath, perm)
- try:
- os.chown(mypath, uid, gid)
- except SystemExit, e:
- raise
- except:
- if must_chown:
- os.umask(old_umask)
- raise
- portage_util.writemsg(_("Failed to chown: %(path)s to %(uid)s:%(gid)s\n") % {"path":mypath,"uid":uid,"gid":gid})
-
- os.umask(old_umask)
-
-
-
-
-
-
-
-
-
-