Skip to contentSkip to conversation

package_manager: Fix apt-ftparchive index creation problems

PATCH In review Richard Purdie 3 participants 3 messages Mar 26, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package_manager: Fix apt-ftparchive index creation problems

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

---

meta/lib/oe/package_manager.py +6 -7
index 692528d..824af00 100644
@@ -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
 
Acked-by on v1 1/1
#1 lore raw

Hello

My fault sorry. I dont have a running system on master. I tried to port the patch that I tested on dora.

Thanks Richard

Quoted 41 lines · Richard Purdie

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

---

meta/lib/oe/package_manager.py +6 -8
index 692528d..824af00 100644
@@ -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
 
 
 
--

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Signature · 1 line
Ricardo Ribalda
#2 lore raw

Hello Ricardo,

Quoted 2 lines · Ricardo Ribalda Delgado

My fault sorry. I dont have a running system on master. I tried to port the patch that I tested on dora.

Please try the patches in master before sending them, specially when it changes a so core feature like this one.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750