]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
package_manager: Fix apt-ftparchive index creation problems
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 26 Mar 2014 11:40:50 +0000 (11:40 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 26 Mar 2014 12:15:12 +0000 (12:15 +0000)
a) There were missing parameters to the release and package commands (".")

b) The commands need to be executed as one block since they build upon each other

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/package_manager.py

index 692528db1665392bed2604385b4f17f4f4489fad..824af00f54537f653783fb4c134589ef1ef9e31c 100644 (file)
@@ -192,17 +192,16 @@ class DpkgIndexer(Indexer):
             if not os.path.isdir(arch_dir):
                 continue
 
-            index_cmds.append("cd %s; PSEUDO_UNLOAD=1 %s packages > Packages" %
-                              (arch_dir, apt_ftparchive))
+            cmd = "cd %s; PSEUDO_UNLOAD=1 %s packages . > Packages;" % (arch_dir, apt_ftparchive)
 
-            index_cmds.append("cd %s; %s Packages -c > Packages.gz" %
-                              (arch_dir, gzip))
+            cmd += "%s -fc Packages > Packages.gz;" % gzip
 
             with open(os.path.join(arch_dir, "Release"), "w+") as release:
-                release.write("Label: %s" % arch)
+                release.write("Label: %s\n" % arch)
 
-            index_cmds.append("cd %s; PSEUDO_UNLOAD=1 %s release >> Release" %
-                              (arch_dir, apt_ftparchive))
+            cmd += "PSEUDO_UNLOAD=1 %s release . >> Release" % apt_ftparchive
+            
+            index_cmds.append(cmd)
 
             deb_dirs_found = True