Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 176206 Details for
Bug 252243
media-libs/x264-0.0.20081006 buildpkg fails with OSError: [Errno 40] Too many levels of symbolic links: '/usr/portage/packages/media-libs/x264-0.0.20081006.tbz2'
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
avoid creating a circular symlink
circular_symlink.patch (text/plain), 1.69 KB, created by
Zac Medico
on 2008-12-23 09:46:32 UTC
(
hide
)
Description:
avoid creating a circular symlink
Filename:
MIME Type:
Creator:
Zac Medico
Created:
2008-12-23 09:46:32 UTC
Size:
1.69 KB
patch
obsolete
>Index: pym/portage/dbapi/bintree.py >=================================================================== >--- pym/portage/dbapi/bintree.py (revision 12279) >+++ pym/portage/dbapi/bintree.py (revision 12281) >@@ -322,7 +322,21 @@ > myfile = mypkg + ".tbz2" > mypath = os.path.join("All", myfile) > dest_path = os.path.join(self.pkgdir, mypath) >- if os.path.exists(dest_path): >+ >+ try: >+ st = os.lstat(dest_path) >+ except OSError: >+ st = None >+ else: >+ if stat.S_ISLNK(st.st_mode): >+ st = None >+ try: >+ os.unlink(dest_path) >+ except OSError: >+ if os.path.exists(dest_path): >+ raise >+ >+ if st is not None: > # For invalid packages, other_cat could be None. > other_cat = portage.xpak.tbz2(dest_path).getfile("CATEGORY") > if other_cat: >@@ -330,11 +344,7 @@ > other_cpv = other_cat + "/" + mypkg > self._move_from_all(other_cpv) > self.inject(other_cpv) >- """The file may or may not exist. Move it if necessary and update >- internal state for future calls to getname().""" > self._move_to_all(cpv) >- if os.path.exists(full_path): >- self.inject(cpv) > > def _ensure_dir(self, path): > """ >@@ -361,6 +371,7 @@ > for future getname() calls.""" > mycat, mypkg = catsplit(cpv) > myfile = mypkg + ".tbz2" >+ self._pkg_paths[cpv] = os.path.join("All", myfile) > src_path = os.path.join(self.pkgdir, mycat, myfile) > try: > mystat = os.lstat(src_path) >@@ -371,7 +382,7 @@ > dest_path = os.path.join(self.pkgdir, "All", myfile) > _movefile(src_path, dest_path, mysettings=self.settings) > self._create_symlink(cpv) >- self._pkg_paths[cpv] = os.path.join("All", myfile) >+ self.inject(cpv) > > def _move_from_all(self, cpv): > """Move a package from ${PKGDIR}/All/${PF}.tbz2 to
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 252243
: 176206