[oe-commits] Ricardo Ribalda Delgado : package_manager: Use apt-ftparchive for deb packages
git at git.openembedded.org
git at git.openembedded.org
Tue Mar 18 10:23:31 UTC 2014
Module: openembedded-core.git
Branch: master-next
Commit: 712c01469cd3173c07c1904659817c2d40c3dd2b
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=712c01469cd3173c07c1904659817c2d40c3dd2b
Author: Ricardo Ribalda Delgado <ricardo.ribalda at gmail.com>
Date: Mon Mar 17 09:30:37 2014 +0000
package_manager: Use apt-ftparchive for deb packages
Use apt-ftparchive to create a Release file compatible with SecureApt.
apt-ftparchive is also a more efficient replacement of
dpkg-scanpackages:
root at neopili:~/curro/qtec/qt5022/build-qt5022-cesium/build/tmp/deploy/deb/bobcat
_64# time PSEUDO_UNLOAD=1 apt-ftparchive packages . >/tmp/kkk
real 0m26.873s
user 0m20.968s
sys 0m1.212s
root at neopili:~/curro/qtec/qt5022/build-qt5022-cesium/build/tmp/deploy/deb/bobcat
_64# time PSEUDO_UNLOAD=1 dpkg-scanpackages . >/tmp/kkk
dpkg-scanpackages: info: Wrote 6022 entries to output Packages file.
real 0m59.721s
user 0m16.668s
sys 0m11.164s
apt-ftparchive is not compatible with libpseudo. The calls to ftw()
returns the path in absolute format instead of relative. This
produces
wrong Packages and Release files.
ie:
MD5Sum:
d20227a958f6870137ce0e41b7b84307 1453
/home/ricardo/curro/qtec/qt5022/build-qt5022-cesium/build/tmp/deploy/deb/all/Release
This is why it is called with PSEUDO_UNLOAD.
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda at gmail.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/lib/oe/package_manager.py | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 1279b50..ec96bb3 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -180,7 +180,7 @@ class DpkgIndexer(Indexer):
if sdk_pkg_archs is not None:
arch_list += sdk_pkg_archs.split()
- dpkg_scanpackages = bb.utils.which(os.getenv('PATH'), "dpkg-scanpackages")
+ apt_ftparchive = bb.utils.which(os.getenv('PATH'), "apt-ftparchive")
gzip = bb.utils.which(os.getenv('PATH'), "gzip")
index_cmds = []
@@ -190,11 +190,17 @@ 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))
+
+ index_cmds.append("cd %s; %s Packages -c > Packages.gz" %
+ (arch_dir, gzip))
+
with open(os.path.join(arch_dir, "Release"), "w+") as release:
release.write("Label: %s" % arch)
- index_cmds.append("cd %s; %s . | %s > Packages.gz" %
- (arch_dir, dpkg_scanpackages, gzip))
+ index_cmds.append("cd %s; PSEUDO_UNLOAD=1 %s release >> Release" %
+ (arch_dir, apt_ftparchive))
deb_dirs_found = True
More information about the Openembedded-commits
mailing list