diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-07-27 20:20:28 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-07-27 20:20:28 +0000 |
commit | 75fcdeb6eeceb53af8c7194f206b0593723bef6e (patch) | |
tree | 486fc8e97b7a126575deeac76b3bf8c31a19a875 | |
parent | d427118eb3a19a002b1889b7ed634c3eb877c2b5 (diff) | |
download | portage-75fcdeb6eeceb53af8c7194f206b0593723bef6e.tar.gz portage-75fcdeb6eeceb53af8c7194f206b0593723bef6e.tar.bz2 portage-75fcdeb6eeceb53af8c7194f206b0593723bef6e.zip |
Move permissions adjustment of previously fetched files into the main fetch loop.
svn path=/main/trunk/; revision=4033
-rw-r--r-- | pym/portage.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pym/portage.py b/pym/portage.py index 4cb3716e0..e321832b5 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -1800,14 +1800,6 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks", writemsg(_("Local mirror has file: %(file)s\n" % {"file":myfile})) shutil.copyfile(mydir+"/"+myfile,destdir+"/"+myfile) break - try: - apply_secpass_permissions(os.path.join(mysettings["DISTDIR"], myfile), gid=portage_gid, - mode=0664, mask=02) - except portage_exception.FileNotFound: - pass - except portage_exception.PortageException, e: - if not os.access(os.path.join(mysettings["DISTDIR"], myfile), os.R_OK): - writemsg("!!! Failed to adjust permissions: %s\n" % str(e), noiselevel=-1) except (OSError,IOError),e: # file does not exist writemsg(_("!!! %(file)s not found in %(dir)s\n") % {"file":myfile, "dir":mysettings["DISTDIR"]}, @@ -1943,6 +1935,14 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks", raise del e else: + try: + apply_secpass_permissions( + myfile_path, gid=portage_gid, mode=0664, mask=02, + stat_cached=mystat) + except portage_exception.PortageException, e: + if not os.access(myfile_path, os.R_OK): + writemsg("!!! Failed to adjust permissions:" + \ + " %s\n" % str(e), noiselevel=-1) if myfile not in mydigests: # We don't have a digest, but the file exists. We must # assume that it is fully downloaded. |