• 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
..
google/protobuf Loading commit data...
Makefile Loading commit data...
autofs.proto Loading commit data...
binfmt-misc.proto Loading commit data...
cgroup.proto Loading commit data...
core-aarch64.proto Loading commit data...
core-arm.proto Loading commit data...
core-ppc64.proto Loading commit data...
core-x86.proto Loading commit data...
core.proto Loading commit data...
cpuinfo.proto Loading commit data...
creds.proto Loading commit data...
eventfd.proto Loading commit data...
eventpoll.proto Loading commit data...
ext-file.proto Loading commit data...
fdinfo.proto Loading commit data...
fh.proto Loading commit data...
fifo.proto Loading commit data...
file-lock.proto Loading commit data...
fown.proto Loading commit data...
fs.proto Loading commit data...
fsnotify.proto Loading commit data...
ghost-file.proto Loading commit data...
inventory.proto Loading commit data...
ipc-desc.proto Loading commit data...
ipc-msg.proto Loading commit data...
ipc-sem.proto Loading commit data...
ipc-shm.proto Loading commit data...
ipc-var.proto Loading commit data...
mm.proto Loading commit data...
mnt.proto Loading commit data...
netdev.proto Loading commit data...
ns.proto Loading commit data...
opts.proto Loading commit data...
packet-sock.proto Loading commit data...
pagemap.proto Loading commit data...
pipe-data.proto Loading commit data...
pipe.proto Loading commit data...
pstree.proto Loading commit data...
regfile.proto Loading commit data...
remap-file-path.proto Loading commit data...
rlimit.proto Loading commit data...
rpc.proto Loading commit data...
sa.proto Loading commit data...
seccomp.proto Loading commit data...
siginfo.proto Loading commit data...
signalfd.proto Loading commit data...
sk-inet.proto Loading commit data...
sk-netlink.proto Loading commit data...
sk-opts.proto Loading commit data...
sk-packet.proto Loading commit data...
sk-unix.proto Loading commit data...
stats.proto Loading commit data...
sysctl.proto Loading commit data...
tcp-stream.proto Loading commit data...
time.proto Loading commit data...
timer.proto Loading commit data...
timerfd.proto Loading commit data...
tty.proto Loading commit data...
tun.proto Loading commit data...
userns.proto Loading commit data...
utsns.proto Loading commit data...
vma.proto Loading commit data...