Message ID | 1384847702-14804-1-git-send-email-kim.hansen@prevas.dk |
---|---|
State | Changes Requested |
Delegated to: | Esben Haabendal |
Headers | show |
<kim.hansen@prevas.dk> writes: > From: Kim Højgaard-Hansen <kiho@prevas.dk> > > --- > lib/bb/utils.py | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/bb/utils.py b/lib/bb/utils.py > index d5350f4..759e9b3 100644 > --- a/lib/bb/utils.py > +++ b/lib/bb/utils.py > @@ -21,6 +21,7 @@ BitBake Utility Functions > > import re, fcntl, os, string, stat, shutil, time > import sys > +import commands > import errno > import logging AFAICS, getstatusoutput is called without commands. prefix, so this import don't really fix anything. Also, I really would like to see movefile() and copyfile() from bb.utils to be dropped, and if something like that is still needed, reimplemented without calls to shell commands. Do you use these functions? /Esben
On 28/11/13 09:23, Esben Haabendal wrote: > <kim.hansen@prevas.dk> writes: > >> From: Kim Højgaard-Hansen <kiho@prevas.dk> >> >> --- >> lib/bb/utils.py | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/lib/bb/utils.py b/lib/bb/utils.py >> index d5350f4..759e9b3 100644 >> --- a/lib/bb/utils.py >> +++ b/lib/bb/utils.py >> @@ -21,6 +21,7 @@ BitBake Utility Functions >> >> import re, fcntl, os, string, stat, shutil, time >> import sys >> +import commands >> import errno >> import logging > AFAICS, getstatusoutput is called without commands. prefix, so this > import don't really fix anything. > > Also, I really would like to see movefile() and copyfile() from bb.utils > to be dropped, and if something like that is still needed, reimplemented > without calls to shell commands. > > Do you use these functions? > > /Esben oups, yes it should be prefixed with commands also. It is possible to hit that code path in a specific error case though, I hit it when testing some of the do_split scenarios. Should remember to attach the error log. Currently it will fail with a traceback when you enter that part of that code /Kim
Kim Højgaard-Hansen <kiho@prevas.dk> writes: > On 28/11/13 09:23, Esben Haabendal wrote: > > <kim.hansen@prevas.dk> writes: > > > From: Kim Højgaard-Hansen <kiho@prevas.dk> > > --- > lib/bb/utils.py | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/bb/utils.py b/lib/bb/utils.py > index d5350f4..759e9b3 100644 > --- a/lib/bb/utils.py > +++ b/lib/bb/utils.py > @@ -21,6 +21,7 @@ BitBake Utility Functions > > import re, fcntl, os, string, stat, shutil, time > import sys > +import commands > import errno > import logging > > AFAICS, getstatusoutput is called without commands. prefix, so this > import don't really fix anything. > > Also, I really would like to see movefile() and copyfile() from bb.utils > to be dropped, and if something like that is still needed, reimplemented > without calls to shell commands. > > Do you use these functions? > > /Esben > > oups, yes it should be prefixed with commands also. It is possible to hit that > code path in a specific error case though, I hit it when testing some of the > do_split scenarios. Should remember to attach the error log. Currently it will > fail with a traceback when you enter that part of that code I see. bb.utils.copyfile() is used in package.oeclass. I don't see any references to bb.utils.movefile(). Could the bb.utils.copyfile() call be replaced with a shutil.copy2() call? /Esben
diff --git a/lib/bb/utils.py b/lib/bb/utils.py index d5350f4..759e9b3 100644 --- a/lib/bb/utils.py +++ b/lib/bb/utils.py @@ -21,6 +21,7 @@ BitBake Utility Functions import re, fcntl, os, string, stat, shutil, time import sys +import commands import errno import logging
From: Kim Højgaard-Hansen <kiho@prevas.dk> --- lib/bb/utils.py | 1 + 1 file changed, 1 insertion(+)