fixes for package_foo
cover fixes for package_foo
The following changes since commit 1a2311c8fa9a3703568cd390c44639fe3335023e:
build-appliance-image: Update to master head revision (2016-10-11 23:43:20 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib rbt/package
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/package
Robert Yang (2):
package_tar: avoid chdir warnings and restore cwd after packaging package_ipk/rpm/deb: remove unneeded dir settings
meta/classes/package_deb.bbclass | 1 - meta/classes/package_ipk.bbclass | 1 - meta/classes/package_rpm.bbclass | 1 - meta/classes/package_tar.bbclass | 5 +++++ 4 files changed, 5 insertions(+), 3 deletions(-)
Signature · 1 line
2.9.0
PATCH 1/2 package_tar: avoid chdir warnings and restore cwd after packaging
Fixed:
WARNING: attr-2.4.47-r0 do_package_write_tar: Task do_package_tar changed cwd to /path/to/attr/2.4.47-r0/packages-split/attr-locale-sv
--- meta/classes/package_tar.bbclass | 5 +++++ 1 file changed, 5 insertions(+)
meta/classes/package_tar.bbclass +5 -0
@@ -4,6 +4,9 @@ IMAGE_PKGTYPE ?= "tar" python do_package_tar () { import subprocess + + oldcwd = os.getcwd() + workdir = d.getVar('WORKDIR', True) if not workdir: bb.error("WORKDIR not defined, unable to package")
@@ -49,6 +52,8 @@ python do_package_tar () { ret = subprocess.call(args + [tarfn] + dlist) if ret != 0: bb.error("Creation of tar %s failed." % tarfn) + + os.chdir(oldcwd) } python () {
Signature · 1 line
2.9.0
PATCH 2/2 package_ipk/rpm/deb: remove unneeded dir settings
In reply to Robert YangThere is a do_package_write_foo[cleandirs], so the do_package_write_foo[dirs] is not needed.
--- meta/classes/package_deb.bbclass | 1 - meta/classes/package_ipk.bbclass | 1 - meta/classes/package_rpm.bbclass | 1 - 3 files changed, 3 deletions(-)
meta/classes/package_deb.bbclass +0 -1
@@ -348,7 +348,6 @@ python do_package_write_deb () { bb.build.exec_func("read_subpackage_metadata", d) bb.build.exec_func("do_package_deb", d) } -do_package_write_deb[dirs] = "${PKGWRITEDIRDEB}" do_package_write_deb[cleandirs] = "${PKGWRITEDIRDEB}" do_package_write_deb[umask] = "022" addtask package_write_deb after do_packagedata do_package
meta/classes/package_ipk.bbclass +0 -1
@@ -288,7 +288,6 @@ python do_package_write_ipk () { bb.build.exec_func("read_subpackage_metadata", d) bb.build.exec_func("do_package_ipk", d) } -do_package_write_ipk[dirs] = "${PKGWRITEDIRIPK}" do_package_write_ipk[cleandirs] = "${PKGWRITEDIRIPK}" do_package_write_ipk[umask] = "022" addtask package_write_ipk after do_packagedata do_package
meta/classes/package_rpm.bbclass +0 -1
@@ -763,7 +763,6 @@ python do_package_write_rpm () { bb.build.exec_func("do_package_rpm", d) } -do_package_write_rpm[dirs] = "${PKGWRITEDIRRPM}" do_package_write_rpm[cleandirs] = "${PKGWRITEDIRRPM}" do_package_write_rpm[umask] = "022" addtask package_write_rpm after do_packagedata do_package
Signature · 1 line
2.9.0
Re: [PATCH 2/2] package_ipk/rpm/deb: remove unneeded dir settings
Quoted 3 lines · Robert Yang
There is a do_package_write_foo[cleandirs], so the do_package_write_foo[dirs] is not needed.
[dirs] changes the cwd whereas [cleandirs] doesn't, so assuming that you've verified this isn't a problem the message should explain that the tasks chdir() themselves.
Ross
Re: [PATCH 2/2] package_ipk/rpm/deb: remove unneeded dir settings
Quoted 11 lines · Ross
On 12 October 2016 at 10:19, Robert Yang <[email protected] <mailto:[email protected]>> wrote:
There is a do_package_write_foo[cleandirs], so the do_package_write_foo[dirs] is not needed.
[dirs] changes the cwd whereas [cleandirs] doesn't, so assuming that you've verified this isn't a problem the message should explain that the tasks
chdir()themselves.
Thanks, I've verified that it works well after remove the [dirs], but since it does make sense (change the cwd), so I think that we'd better not remove them and drop this patch ?
// Robert
Quoted 2 lines
Ross