Patchwork package_manager: Fix apt-ftparchive index creation problems

login
register
mail settings
Submitter Richard Purdie
Date March 26, 2014, 11:40 a.m.
Message ID <1395834050.24890.87.camel@ted>
Download mbox | patch
Permalink /patch/69259/
State New
Headers show

Comments

Richard Purdie - March 26, 2014, 11:40 a.m.
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>
---
Ricardo Ribalda Delgado - March 26, 2014, 1:19 p.m.
Acked-by: Ricardo Ribalda <Ricardo.Ribalda@gmail.com>

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


On Wed, Mar 26, 2014 at 12:40 PM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> 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>
> ---
> diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
> index 692528d..824af00 100644
> --- a/meta/lib/oe/package_manager.py
> +++ b/meta/lib/oe/package_manager.py
> @@ -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
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
Otavio Salvador - March 26, 2014, 2:34 p.m.
Hello Ricardo,

On Wed, Mar 26, 2014 at 10:19 AM, Ricardo Ribalda Delgado
<ricardo.ribalda@gmail.com> wrote:
> 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.

Patch

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 692528d..824af00 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -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