Richard Purdie <richard.pur...@linuxfoundation.org> escreveu no dia segunda, 4/10/2021 à(s) 15:11:
> On Sun, 2021-10-03 at 22:38 +0100, Jose Quaresma wrote: > > When we can't update the access and modified times of sstate siginfo > > it is useful to infor the user about that. > > > > Signed-off-by: Jose Quaresma <quaresma.j...@gmail.com> > > --- > > meta/classes/sstate.bbclass | 12 ++++++++++-- > > 1 file changed, 10 insertions(+), 2 deletions(-) > > > > diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass > > index 92a73114bb..2deecd8777 100644 > > --- a/meta/classes/sstate.bbclass > > +++ b/meta/classes/sstate.bbclass > > @@ -720,11 +720,15 @@ def sstate_package(ss, d): > > try: > > os.utime(siginfo, None) > > except PermissionError: > > + bb.warn("Cannot sets the access and modified times of > sstate siginfo %s, no access rights" % siginfo) > > pass > > except OSError as e: > > # Handle read-only file systems gracefully > > import errno > > - if e.errno != errno.EROFS: > > + if e.errno == errno.EROFS: > > + bb.warn("Cannot sets the access and modified times of > sstate siginfo %s, read-only file system" % siginfo) > > + pass > > + else: > > raise e > > > > return > > @@ -1165,11 +1169,15 @@ python sstate_eventhandler() { > > try: > > os.utime(siginfo, None) > > except PermissionError: > > + bb.warn("Cannot sets the access and modified times of > sstate siginfo %s, no access rights" % siginfo) > > pass > > except OSError as e: > > # Handle read-only file systems gracefully > > import errno > > - if e.errno != errno.EROFS: > > + if e.errno == errno.EROFS: > > + bb.warn("Cannot sets the access and modified times > of sstate siginfo %s, read-only file system" % siginfo) > > + pass > > + else: > > raise e > > > > > > I'm not sure we can do this as there are some cases where this is > unavoidable by > people's state setups and we wouldn't want to show warnings in those cases. > > (e.g. think of a shared sstate dir between multiple users where the objects > remain owned by the user that created them). > > > Cheers, > > Richard > > > Hi Richard, I understand the exception for the use cases but I think it would be useful to show this to the users. Will it be more appropriate perhaps to log this as debug messages? I have a final question that I don't understand clearly. Can the omission of these timestamps updates on siginfo invalidate the use of the sstate-cache for that task, bitbake-dumpsig can complain about that? -- Best regards, José Quaresma
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#156620): https://lists.openembedded.org/g/openembedded-core/message/156620 Mute This Topic: https://lists.openembedded.org/mt/86052256/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-