• Tycho Andersen's avatar
    images: rename NONE to CG_NONE · 5e1cfded
    Tycho Andersen authored
    with newer versions of protobuf, I get:
    
    ./crit
    Traceback (most recent call last):
      File "./crit", line 7, in <module>
        import pycriu
      File "/home/ubuntu/criu/crit/pycriu/__init__.py", line 2, in <module>
        import images
      File "/home/ubuntu/criu/crit/pycriu/images/__init__.py", line 2, in <module>
        from images import *
      File "/home/ubuntu/criu/crit/pycriu/images/images.py", line 52, in <module>
        from pb import *
      File "/home/ubuntu/criu/crit/pycriu/images/pb.py", line 35, in <module>
        from packet_sock_pb2 import *
      File "/home/ubuntu/criu/crit/pycriu/images/packet_sock_pb2.py", line 18, in <module>
        import sk_opts_pb2 as sk__opts__pb2
      File "/home/ubuntu/criu/crit/pycriu/images/sk_opts_pb2.py", line 23, in <module>
        serialized_pb=_b('\n\rsk-opts.proto\"\xe2\x02\n\rsk_opts_entry\x12\x11\n\tso_sndbuf\x18\x01 \x02(\r\x12\x11\n\tso_rcvbuf\x18\x02 \x02(\r\x12\x16\n\x0eso_snd_tmo_sec\x18\x03 \x02(\x04\x12\x17\n\x0fso_snd_tmo_usec\x18\x04 \x02(\x04\x12\x16\n\x0eso_rcv_tmo_sec\x18\x05 \x02(\x04\x12\x17\n\x0fso_rcv_tmo_usec\x18\x06 \x02(\x04\x12\x11\n\treuseaddr\x18\x07 \x01(\x08\x12\x13\n\x0bso_priority\x18\x08 \x01(\r\x12\x13\n\x0bso_rcvlowat\x18\t \x01(\r\x12\x0f\n\x07so_mark\x18\n \x01(\r\x12\x13\n\x0bso_passcred\x18\x0b \x01(\x08\x12\x12\n\nso_passsec\x18\x0c \x01(\x08\x12\x14\n\x0cso_dontroute\x18\r \x01(\x08\x12\x13\n\x0bso_no_check\x18\x0e \x01(\x08\x12\x14\n\x0cso_bound_dev\x18\x0f \x01(\t\x12\x11\n\tso_filter\x18\x10 \x03(\x06*6\n\x0bsk_shutdown\x12\x08\n\x04NONE\x10\x00\x12\x08\n\x04READ\x10\x01\x12\t\n\x05WRITE\x10\x02\x12\x08\n\x04\x42OTH\x10\x03')
      File "/usr/lib/python2.7/dist-packages/google/protobuf/descriptor.py", line 827, in __new__
        return _message.default_pool.AddSerializedFile(serialized_pb)
    TypeError: Couldn't build proto file into descriptor pool!
    Invalid proto descriptor for file "sk-opts.proto":
      NONE: "NONE" is already defined in file "rpc.proto".
      NONE: Note that enum values use C++ scoping rules, meaning that enum values are siblings of their type, not children of it.  Therefore, "NONE" must be unique within the global scope, not just within "sk_shutdown".
    
    this fixes that.
    Signed-off-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
    CC: Laurent Dufour <ldufour@linux.vnet.ibm.com>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
    5e1cfded
Name
Last commit
Last update
Documentation Loading commit data...
contrib Loading commit data...
coredump Loading commit data...
crit Loading commit data...
criu Loading commit data...
images Loading commit data...
lib Loading commit data...
scripts Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
INSTALL.md Loading commit data...
Makefile Loading commit data...
Makefile.install Loading commit data...
Makefile.versions Loading commit data...
README.md Loading commit data...