org.oe.dev package.bbclass: remove directories named in FILES from image after file
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hello Phil,
What's the idea behind this change? How would if handle non-empty
dirs?
This is a forwarded message
From: pb commit <[email protected]>
To: [email protected]
Date: Sunday, January 28, 2007, 11:18:34 PM
Subject: [oe-commits] org.oe.dev package.bbclass: remove directories named in FILES from image after file
===8<==============Original message text=============== package.bbclass: remove directories named in FILES from image after file migration
Author: [email protected]
Branch: org.openembedded.dev
Revision: e03e452c09311f78ce177e8febeb9963f30bc1ef
ViewMTN: http://monotone.openembedded.org/revision.psp?id=e03e452c09311f78ce177e8febeb9963f30bc1ef
Files:
1
classes/package.bbclass
Diffs:
#
# mt diff -r27b46e6b2f1768296232a9d2ce04946cd1d5514e -re03e452c09311f78ce177e8febeb9963f30bc1ef
#
#
#
# patch "classes/package.bbclass"
# from [e59caa16e5f65d4574477c54a942e64e26296223]
# to [edf00c41e2683d3180be274fedde142ed3837c83]
#
============================================================
--- classes/package.bbclass e59caa16e5f65d4574477c54a942e64e26296223
+++ classes/package.bbclass edf00c41e2683d3180be274fedde142ed3837c83
@@ -387,6 +387,7 @@ python populate_packages () {
bb.mkdirhier(root)
filesvar = bb.data.getVar('FILES', localdata, 1) or ""
files = filesvar.split()
+ cleandirs = []
for file in files:
if os.path.isabs(file):
file = '.' + file
@@ -395,6 +396,7 @@ python populate_packages () {
newfiles = [ os.path.join(file,x) for x in os.listdir(file) ]
if newfiles:
files += newfiles
+ cleandirs = [file] + cleandirs
continue
globbed = glob.glob(file)
if globbed:
@@ -409,6 +411,8 @@ python populate_packages () {
ret = bb.movefile(file,fpath)
if ret is None or ret == 0:
raise bb.build.FuncFailed("File population failed")
+ for dir in cleandirs:
+ os.rmdir(dir)
del localdata
os.chdir(workdir)_______________________________________________
Openembedded-commits mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-commits
===8<===========End of original message text===========
Signature · 2 lines
Best regards, Paul mailto:[email protected]
There shouldn't be any non-empty dirs. If you're encountering some, that must be a bug. Do you have a testcase?
p.
Quoted 74 lines · Paul Sokolovsky
Hello Phil,
What's the idea behind this change? How would if handle non-empty
dirs?This is a forwarded message
From: pb commit <[email protected]>
To: [email protected]
Date: Sunday, January 28, 2007, 11:18:34 PM
Subject: [oe-commits] org.oe.dev package.bbclass: remove directories named in FILES from image after file===8<==============Original message text=============== package.bbclass: remove directories named in FILES from image after file migration
Author: [email protected]
Branch: org.openembedded.dev
Revision:e03e452c09311f78ce177e8febeb9963f30bc1ef
ViewMTN: http://monotone.openembedded.org/revision.psp?id=e03e452c09311f78ce177e8febeb9963f30bc1ef
Files:
1
classes/package.bbclass
Diffs:#
# mt diff -r27b46e6b2f1768296232a9d2ce04946cd1d5514e -re03e452c09311f78ce177e8febeb9963f30bc1ef # # # # patch "classes/package.bbclass" # from [e59caa16e5f65d4574477c54a942e64e26296223] # to [edf00c41e2683d3180be274fedde142ed3837c83] # ============================================================package.bbclass edf00c41e2683d3180be274fedde142ed3837c83 renamed from package.bbclass e59caa16e5f65d4574477c54a942e64e26296223 +4
-0@@ -387,6 +387,7 @@ python populate_packages () { bb.mkdirhier(root) filesvar = bb.data.getVar('FILES', localdata, 1) or "" files = filesvar.split() + cleandirs = [] for file in files: if os.path.isabs(file): file = '.' + file@@ -395,6 +396,7 @@ python populate_packages () { newfiles = [ os.path.join(file,x) for x in os.listdir(file) ] if newfiles: files += newfiles + cleandirs = [file] + cleandirs continue globbed = glob.glob(file) if globbed:@@ -409,6 +411,8 @@ python populate_packages () { ret = bb.movefile(file,fpath) if ret is None or ret == 0: raise bb.build.FuncFailed("File population failed") + for dir in cleandirs: + os.rmdir(dir) del localdata os.chdir(workdir)_______________________________________________
Openembedded-commits mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-commits===8<===========End of original message text===========
Hello Phil,
Quoted 2 lines · you
There shouldn't be any non-empty dirs. If you're encountering some, that must be a bug. Do you have a testcase?
Sure: I create a new .bb and just debug packaging. I'd prefer it
didn't throw Python exception in my face ;-). Or: I'm sure there're few .bb which don't package all the stuff which is installed by "make install". One such example is busybox, which creates hoards of symlinks, but we don't packages (all of) them, instead relying on update-alternatives.
Quoted 19 lines
p.
Quoted 16 lines · Paul Sokolovsky
Hello Phil,
What's the idea behind this change? How would if handle non-empty
dirs?This is a forwarded message
From: pb commit <[email protected]>
To: [email protected]
Date: Sunday, January 28, 2007, 11:18:34 PM
Subject: [oe-commits] org.oe.dev package.bbclass: remove directories named in FILES from image after file===8<==============Original message text=============== package.bbclass: remove directories named in FILES from image after file migration
[]
Signature · 2 lines
Best regards, Paul mailto:[email protected]
Quoted 7 lines · Paul Sokolovsky
Hello Phil,
Quoted 2 lines · you
There shouldn't be any non-empty dirs. If you're encountering some, that must be a bug. Do you have a testcase?
Quoted 6 lines
Sure: I create a new .bb and just debug packaging. I'd prefer it
didn't throw Python exception in my face ;-). Or: I'm sure there're few .bb which don't package all the stuff which is installed by "make install". One such example is busybox, which creates hoards of symlinks, but we don't packages (all of) them, instead relying on update-alternatives.
I just built busybox 1.2.1 and didn't see any problem. Can you be more specific about what exactly is going wrong for you?
p.