All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Sokolovsky <pmiscml@gmail.com>
To: Phil Blundell <pb@reciva.com>
Cc: openembedded-devel@lists.openembedded.org
Subject: [oe-commits] org.oe.dev package.bbclass: remove directories named in FILES from image after file
Date: Sun, 28 Jan 2007 23:30:41 +0200	[thread overview]
Message-ID: <492827442.20070128233041@gmail.com> (raw)
In-Reply-To: <E1HBHQ2-0002RA-CZ@linuxtogo.org>

Hello Phil,

      What's the idea behind this change? How would if handle non-empty
dirs?


This is a forwarded message
From: pb commit <openembedded-commits@lists.openembedded.org>
To: openembedded-commits@lists.openembedded.org
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: pb@openembedded.org
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
Openembedded-commits@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-commits

===8<===========End of original message text===========



-- 
Best regards,
 Paul                            mailto:pmiscml@gmail.com




       reply	other threads:[~2007-01-28 21:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1HBHQ2-0002RA-CZ@linuxtogo.org>
2007-01-28 21:30 ` Paul Sokolovsky [this message]
2007-01-28 22:09   ` [oe-commits] org.oe.dev package.bbclass: remove directories named in FILES from image after file Phil Blundell
2007-01-28 22:14     ` Paul Sokolovsky
2007-01-28 22:22       ` Phil Blundell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=492827442.20070128233041@gmail.com \
    --to=pmiscml@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    --cc=pb@reciva.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.