[elbe-devel] [PATCH 2/2] elbeproject: dont try to move origfiles downloaed via origtargz

Torben Hohn torben.hohn at linutronix.de
Thu Jul 22 17:25:23 CEST 2021


origtargz downloads orig files to ".." They are already in the right spot.

When moving them onto themselves, that produces errors.

Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
 elbepack/elbeproject.py | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
index 8617d80f9..ae0a2d089 100644
--- a/elbepack/elbeproject.py
+++ b/elbepack/elbeproject.py
@@ -774,15 +774,16 @@ class ElbeProject:
         if "3.0 (quilt)" in formatfile and not self.orig_files:
             do("cd %s; origtargz --download-only --tar-only" % pdebuilder_current)
             self.orig_files = glob.glob("%s/../%s*.orig.*" % (pdebuilder_current, src_pkg_name))
-        try:
-            for orig_fname in self.orig_files:
-                    ofname = os.path.join(self.builddir, orig_fname)
-                    do('mv "%s" "%s"' % (ofname,
-                                         os.path.join(self.builddir,
-                                                      "pdebuilder")))
-        finally:
-            self.orig_fname = None
-            self.orig_files = []
+        else:
+            try:
+                for orig_fname in self.orig_files:
+                        ofname = os.path.join(self.builddir, orig_fname)
+                        do('mv "%s" "%s"' % (ofname,
+                                             os.path.join(self.builddir,
+                                                          "pdebuilder")))
+            finally:
+                self.orig_fname = None
+                self.orig_files = []
 
         try:
             if cross:
-- 
2.20.1



More information about the elbe-devel mailing list