Openembedded Devel Discussions
 help / color / mirror / Atom feed
* A patch of git.py
@ 2008-10-07 11:36 Julian Chu
  0 siblings, 0 replies; only message in thread
From: Julian Chu @ 2008-10-07 11:36 UTC (permalink / raw)
  To: bitbake-dev; +Cc: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 158 bytes --]

Hi, 
        The attachment is a patch.

        Which fix an error of git.py which may cause error when symbolic link inside the directory.

-Ju1ian


[-- Attachment #2: 0001-git.py-Let-prunedir-can-make-a-difference-between.patch --]
[-- Type: text/x-diff, Size: 979 bytes --]

From b6722b83362e246f51a8397a94d21601176bc6d6 Mon Sep 17 00:00:00 2001
From: Julian_Chu <julian_chu@openmoko.com>
Date: Tue, 7 Oct 2008 19:19:34 +0800
Subject: [PATCH] git.py : Let prunedir can make a difference between real dir and symbolic link

---
 lib/bb/fetch/git.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/lib/bb/fetch/git.py b/lib/bb/fetch/git.py
index 774bd1a..37a84dd 100644
--- a/lib/bb/fetch/git.py
+++ b/lib/bb/fetch/git.py
@@ -34,7 +34,10 @@ def prunedir(topdir):
         for name in files:
             os.remove(os.path.join(root, name))
         for name in dirs:
-            os.rmdir(os.path.join(root, name))
+            if os.path.islink(os.path.join(root, name)):
+                os.remove(os.path.join(root, name))
+            else:
+                os.rmdir(os.path.join(root, name))
 
 class Git(Fetch):
     """Class to fetch a module or modules from git repositories"""
-- 
1.5.5.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2008-10-07 11:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-07 11:36 A patch of git.py Julian Chu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox