Remove trailing slash in $packaging_dir.
authorHuang Hao <hao.h.huang@intel.com>
Mon, 26 Nov 2012 03:24:49 +0000 (11:24 +0800)
committerHuang Hao <hao.h.huang@intel.com>
Mon, 26 Nov 2012 06:35:41 +0000 (14:35 +0800)
Build will fail if pass --packaging-dir=xxx/ to depanneur

Change-Id: I99695c57241f576c8dab262a7ffb135858a9dd70

gitbuildsys/cmd_export.py

index 054d1fa336f7639b0e4b6fcb1632caac1f58deea..478910be884e3fb1d46db8b21b838d57470ab85c 100644 (file)
@@ -60,8 +60,10 @@ def get_packaging_dir(args):
     Determine the packaging dir to be used
     """
     if args.packaging_dir:
-        return args.packaging_dir
-    return configmgr.get('packaging_dir', 'general')
+        path = args.packaging_dir
+    else:
+        path = configmgr.get('packaging_dir', 'general')
+    return path.rstrip(os.sep)
 
 def transform_var_format_from_shell_to_python(whole):
     '''replace string like ${xxx} with %(xxx)s'''