* [PATCH 0/3] Fix buildhistory problem
@ 2014-02-19 10:51 Laurentiu Palcu
2014-02-19 10:51 ` [PATCH 1/3] package_manager.py: fix installed package list creation for Opkg/Dpkg Laurentiu Palcu
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Laurentiu Palcu @ 2014-02-19 10:51 UTC (permalink / raw)
To: openembedded-core
Tested with all backends. Fixed some other issues in the process...
Buildhistory should be fine now.
laurentiu
The following changes since commit 54562006c1327c5b99daa4cc05a3ba7e38412da1:
image_types.bbclass: Fix tar IMAGE_CMD to not change directories (2014-02-18 08:38:52 +0000)
are available in the git repository at:
git://mirror.rb.intel.com/git.yoctoproject.org/poky-contrib lpalcu/buildhistory_fix
for you to fetch changes up to 15ce4b01408e1ec91655103191c4c9436d894597:
populate_sdk_*.bbclass: remove left over bash routines (2014-02-19 12:45:51 +0200)
----------------------------------------------------------------
Laurentiu Palcu (3):
package_manager.py: fix installed package list creation for Opkg/Dpkg
buildhistory.bbclass: fix creation of installed packages list
populate_sdk_*.bbclass: remove left over bash routines
meta/classes/buildhistory.bbclass | 21 +++++++++++++++++----
meta/classes/populate_sdk_deb.bbclass | 21 ---------------------
meta/classes/populate_sdk_ipk.bbclass | 20 --------------------
meta/lib/oe/package_manager.py | 6 ++++--
4 files changed, 21 insertions(+), 47 deletions(-)
Laurentiu Palcu (3):
package_manager.py: fix installed package list creation for Opkg/Dpkg
buildhistory.bbclass: fix creation of installed packages list
populate_sdk_*.bbclass: remove left over bash routines
meta/classes/buildhistory.bbclass | 21 +++++++++++++++++----
meta/classes/populate_sdk_deb.bbclass | 21 ---------------------
meta/classes/populate_sdk_ipk.bbclass | 20 --------------------
meta/lib/oe/package_manager.py | 6 ++++--
4 files changed, 21 insertions(+), 47 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/3] package_manager.py: fix installed package list creation for Opkg/Dpkg
2014-02-19 10:51 [PATCH 0/3] Fix buildhistory problem Laurentiu Palcu
@ 2014-02-19 10:51 ` Laurentiu Palcu
2014-02-19 10:51 ` [PATCH 2/3] buildhistory.bbclass: fix creation of installed packages list Laurentiu Palcu
2014-02-19 10:51 ` [PATCH 3/3] populate_sdk_*.bbclass: remove left over bash routines Laurentiu Palcu
2 siblings, 0 replies; 4+ messages in thread
From: Laurentiu Palcu @ 2014-02-19 10:51 UTC (permalink / raw)
To: openembedded-core
Small error in the package list creation routine. Buildhistory was
supposed to use this but was never called. Hence, it escaped tests...
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
---
meta/lib/oe/package_manager.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 6dc8fbd..a3c0a8e 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -1134,7 +1134,8 @@ class OpkgPM(PackageManager):
if format == "file":
tmp_output = ""
- for pkg, pkg_file, pkg_arch in tuple(output.split('\n')):
+ for line in output.split('\n'):
+ pkg, pkg_file, pkg_arch = line.split()
full_path = os.path.join(self.deploy_dir, pkg_arch, pkg_file)
if os.path.exists(full_path):
tmp_output += "%s %s %s\n" % (pkg, full_path, pkg_arch)
@@ -1435,7 +1436,8 @@ class DpkgPM(PackageManager):
if format == "file":
tmp_output = ""
- for pkg, pkg_file, pkg_arch in tuple(output.split('\n')):
+ for line in tuple(output.split('\n')):
+ pkg, pkg_file, pkg_arch = line.split()
full_path = os.path.join(self.deploy_dir, pkg_arch, pkg_file)
if os.path.exists(full_path):
tmp_output += "%s %s %s\n" % (pkg, full_path, pkg_arch)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] buildhistory.bbclass: fix creation of installed packages list
2014-02-19 10:51 [PATCH 0/3] Fix buildhistory problem Laurentiu Palcu
2014-02-19 10:51 ` [PATCH 1/3] package_manager.py: fix installed package list creation for Opkg/Dpkg Laurentiu Palcu
@ 2014-02-19 10:51 ` Laurentiu Palcu
2014-02-19 10:51 ` [PATCH 3/3] populate_sdk_*.bbclass: remove left over bash routines Laurentiu Palcu
2 siblings, 0 replies; 4+ messages in thread
From: Laurentiu Palcu @ 2014-02-19 10:51 UTC (permalink / raw)
To: openembedded-core
Call the new python routines to create the packages list.
[YOCTO #5831]
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
---
meta/classes/buildhistory.bbclass | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 0033b5a..ef4135b 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -311,13 +311,23 @@ def write_pkghistory(pkginfo, d):
if os.path.exists(filevarpath):
os.unlink(filevarpath)
+python buildhistory_list_installed() {
+ from oe.rootfs import list_installed_packages
+
+ pkgs_list_file = os.path.join(d.getVar('WORKDIR', True),
+ "bh_installed_pkgs.txt")
+
+ with open(pkgs_list_file, 'w') as pkgs_list:
+ pkgs_list.write(list_installed_packages(d, 'file'))
+}
+
buildhistory_get_installed() {
mkdir -p $1
# Get list of installed packages
pkgcache="$1/installed-packages.tmp"
- list_installed_packages file | sort > $pkgcache
+ cat ${WORKDIR}/bh_installed_pkgs.txt | sort > $pkgcache && rm ${WORKDIR}/bh_installed_pkgs.txt
cat $pkgcache | awk '{ print $1 }' > $1/installed-package-names.txt
if [ -s $pkgcache ] ; then
@@ -452,13 +462,16 @@ END
}
# By prepending we get in before the removal of packaging files
-ROOTFS_POSTPROCESS_COMMAND =+ "buildhistory_get_image_installed ; "
+ROOTFS_POSTPROCESS_COMMAND =+ " buildhistory_list_installed ;\
+ buildhistory_get_image_installed ; "
IMAGE_POSTPROCESS_COMMAND += " buildhistory_get_imageinfo ; "
# We want these to be the last run so that we get called after complementary package installation
-POPULATE_SDK_POST_TARGET_COMMAND_append = "buildhistory_get_sdk_installed_target ; "
-POPULATE_SDK_POST_HOST_COMMAND_append = "buildhistory_get_sdk_installed_host ; "
+POPULATE_SDK_POST_TARGET_COMMAND_append = " buildhistory_list_installed ;\
+ buildhistory_get_sdk_installed_target ; "
+POPULATE_SDK_POST_HOST_COMMAND_append = " buildhistory_list_installed ;\
+ buildhistory_get_sdk_installed_host ; "
SDK_POSTPROCESS_COMMAND += "buildhistory_get_sdkinfo ; "
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] populate_sdk_*.bbclass: remove left over bash routines
2014-02-19 10:51 [PATCH 0/3] Fix buildhistory problem Laurentiu Palcu
2014-02-19 10:51 ` [PATCH 1/3] package_manager.py: fix installed package list creation for Opkg/Dpkg Laurentiu Palcu
2014-02-19 10:51 ` [PATCH 2/3] buildhistory.bbclass: fix creation of installed packages list Laurentiu Palcu
@ 2014-02-19 10:51 ` Laurentiu Palcu
2 siblings, 0 replies; 4+ messages in thread
From: Laurentiu Palcu @ 2014-02-19 10:51 UTC (permalink / raw)
To: openembedded-core
The list_installed_packages bash routine is no longer needed here. We've
got a python replacement.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
---
meta/classes/populate_sdk_deb.bbclass | 21 ---------------------
meta/classes/populate_sdk_ipk.bbclass | 20 --------------------
2 files changed, 41 deletions(-)
diff --git a/meta/classes/populate_sdk_deb.bbclass b/meta/classes/populate_sdk_deb.bbclass
index d03b055..462525f 100644
--- a/meta/classes/populate_sdk_deb.bbclass
+++ b/meta/classes/populate_sdk_deb.bbclass
@@ -11,27 +11,6 @@ do_populate_sdk[lockfiles] += "${DEPLOY_DIR_DEB}/deb.lock"
# This will of course only work after rootfs_deb_do_rootfs or populate_sdk_deb has been called
DPKG_QUERY_COMMAND = "${STAGING_BINDIR_NATIVE}/dpkg-query --admindir=$INSTALL_ROOTFS_DEB/var/lib/dpkg"
-list_installed_packages() {
- if [ "$1" = "arch" ] ; then
- # Here we want the PACKAGE_ARCH not the deb architecture
- ${DPKG_QUERY_COMMAND} -W -f='${Package} ${PackageArch}\n'
- elif [ "$1" = "file" ] ; then
- ${DPKG_QUERY_COMMAND} -W -f='${Package} ${Package}_${Version}_${Architecture}.deb ${PackageArch}\n' | while read pkg pkgfile pkgarch
- do
- fullpath=`find ${DEPLOY_DIR_DEB} -name "$pkgfile" || true`
- if [ "$fullpath" = "" ] ; then
- echo "$pkg $pkgfile $pkgarch"
- else
- echo "$pkg $fullpath $pkgarch"
- fi
- done
- elif [ "$1" = "ver" ] ; then
- ${DPKG_QUERY_COMMAND} -W -f='${Package} ${PackageArch} ${Version}\n'
- else
- ${DPKG_QUERY_COMMAND} -W -f='${Package}\n'
- fi
-}
-
rootfs_list_installed_depends() {
# Cheat here a little bit by using the opkg query helper util
${DPKG_QUERY_COMMAND} -W -f='Package: ${Package}\nDepends: ${Depends}\nRecommends: ${Recommends}\n\n' | opkg-query-helper.py
diff --git a/meta/classes/populate_sdk_ipk.bbclass b/meta/classes/populate_sdk_ipk.bbclass
index f51a22c..4c23f05 100644
--- a/meta/classes/populate_sdk_ipk.bbclass
+++ b/meta/classes/populate_sdk_ipk.bbclass
@@ -3,26 +3,6 @@ do_populate_sdk[recrdeptask] += "do_package_write_ipk"
do_populate_sdk[lockfiles] += "${WORKDIR}/ipk.lock"
-list_installed_packages() {
- if [ "$1" = "arch" ] ; then
- opkg-cl ${OPKG_ARGS} status | opkg-query-helper.py -a
- elif [ "$1" = "file" ] ; then
- opkg-cl ${OPKG_ARGS} status | opkg-query-helper.py -f | while read pkg pkgfile pkgarch
- do
- fullpath=`find ${DEPLOY_DIR_IPK} -name "$pkgfile" || true`
- if [ "$fullpath" = "" ] ; then
- echo "$pkg $pkgfile $pkgarch"
- else
- echo "$pkg $fullpath $pkgarch"
- fi
- done
- elif [ "$1" = "ver" ] ; then
- opkg-cl ${OPKG_ARGS} status | opkg-query-helper.py -v
- else
- opkg-cl ${OPKG_ARGS} list_installed | awk '{ print $1 }'
- fi
-}
-
rootfs_list_installed_depends() {
opkg-cl ${OPKG_ARGS} status | opkg-query-helper.py
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-02-19 10:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-19 10:51 [PATCH 0/3] Fix buildhistory problem Laurentiu Palcu
2014-02-19 10:51 ` [PATCH 1/3] package_manager.py: fix installed package list creation for Opkg/Dpkg Laurentiu Palcu
2014-02-19 10:51 ` [PATCH 2/3] buildhistory.bbclass: fix creation of installed packages list Laurentiu Palcu
2014-02-19 10:51 ` [PATCH 3/3] populate_sdk_*.bbclass: remove left over bash routines Laurentiu Palcu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox