summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2015-02-03 06:27:49 -0800
committerPatrick Ohly <patrick.ohly@intel.com>2015-02-03 06:30:47 -0800
commitf118cfa23bc5f18773cb17ae8ea498d204459489 (patch)
treeb0581ecc62a2f1e87551dce5199b69c176e6535d
parent4a7b826daea8373bbc2845a49a33fc5be24af5b8 (diff)
downloadtizen-distro-f118cfa23bc5f18773cb17ae8ea498d204459489.tar.gz
tizen-distro-f118cfa23bc5f18773cb17ae8ea498d204459489.tar.bz2
tizen-distro-f118cfa23bc5f18773cb17ae8ea498d204459489.zip
package_rpm.bbclass: support packaging of symlinks to directories
os.walk() returns symlinks to directories in the "dirs" lists, but then never enters them by default. As a result, the old code applied neither the directory handling (because that is active once a directory gets entered) nor the file handling and thus never packaged such symlinks. The fix is simple: find such special directory entries and move them to the "files" list. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
-rw-r--r--meta/classes/package_rpm.bbclass7
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 92ddf7a30f..6483e961f7 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -197,6 +197,13 @@ python write_specfile () {
if path.endswith("DEBIAN") or path.endswith("CONTROL"):
continue
+ # Treat all symlinks to directories as normal files.
+ # os.walk() lists them as directories.
+ for i, entry in enumerate(dirs):
+ if os.path.islink(os.path.join(rootpath, entry)):
+ del dirs[i]
+ files.append(entry)
+
# Directory handling can happen in two ways, either DIRFILES is not set at all
# in which case we fall back to the older behaviour of packages owning all their
# directories