Skip to content

Commit

Permalink
Rework protobuf output. Expose eix-internal storage instead of simpli…
Browse files Browse the repository at this point in the history
…fication
  • Loading branch information
vaeth committed May 10, 2020
1 parent b6a9a84 commit c51427c
Show file tree
Hide file tree
Showing 7 changed files with 221 additions and 155 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
/doc/eix-*.txt
/doc/eix-*.xsd

*.pb.cc
*.pb.h

/manpage/*-eix.1

/po/*
Expand Down
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# ChangeLog for eix - Ebuild IndeX for portage

*eix-0.34.1
Martin Väth <martin at mvath.de>:
- Rework protobuf output: Expose the actual eix-internal storage for
masks and stability instead of the simplification for xml. This is
an exceptional change since I suppose that the proto from eix-0.34.0
was not used yet. In future, presumably only predicates will be added
to the output without changing the tag numbers.

*eix-0.34.0
Martin Väth <martin at mvath.de>:
- Support Google's protobuf output with --proto, currently untested.
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ dnl each item is listed in a separate line with indent level increased;
dnl in such a case the opening/closing braces are isolated.
dnl 2. The AC_INIT macro must be in one line since it is parsed by
dnl primitive scripts.
AC_INIT([eix], [0.34.0], [https://github.com/vaeth/eix/issues/], [eix], [https://github.com/vaeth/eix/])
AC_INIT([eix], [0.34.1], [https://github.com/vaeth/eix/issues/], [eix], [https://github.com/vaeth/eix/])
AC_PREREQ([2.64])

m4_ifdef([AC_CONFIG_MACRO_DIR],
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project('eix', 'cpp',
version : '0.34.0',
version : '0.34.1',
license : 'GPLv2',
default_options : [
'prefix=/usr',
Expand Down
113 changes: 66 additions & 47 deletions src/output/eix.proto
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,19 @@ message EixOutput {
repeated string iuse_plus = 8;
repeated string iuse_minus = 9;
string required_use = 10;
repeated Property property = 11;
repeated Restrict restrict = 12;
repeated MaskType mask_type = 13;
repeated UnmaskType unmask_type = 14;
repeated Lines mask_reason = 15;
string keywords = 16;
string effective_keywords = 17; // if different from keywords
string depend = 18;
string rdepend = 19;
string pdepend = 20;
string bdepend = 21;
Properties properties = 11;
Restrictions restrictions = 12;
MaskFlags local_mask_flags = 13;
KeyFlags local_key_flags = 14;
MaskFlags system_mask_flags = 15;
KeyFlags system_key_flags = 16;
repeated Lines mask_reason = 17;
string keywords = 18;
string effective_keywords = 19; // if different from keywords
string depend = 20;
string rdepend = 21;
string pdepend = 22;
string bdepend = 23;
}

message Repository {
Expand All @@ -60,48 +62,65 @@ message EixOutput {
repeated string line = 1;
}

enum MaskType {
UNKNOWN_MASK = 0;
NO_MASK = 1;
PROFILE = 2;
HARD = 3;
PACKAGE_MASK = 4;
KEYWORD = 5;
MINUS_KEYWORD = 6;
ALIEN_STABLE = 7;
ALIEN_UNSTABLE = 8;
MINUS_UNSTABLE = 9;
MINUS_ASTERISK = 10;
MISSING_KEYWORDS = 11;
message MaskFlags {
enum MaskFlag {
UNKNOWN = 0;
MASK_PACKAGE = 1;
MASK_SYSTEM = 2;
MASK_PROFILE = 3;
IN_PROFILE = 4;
WORLD = 5;
WORLD_SETS = 6;
MARKED = 7;
}

repeated MaskFlag mask_flag = 1;
}

enum UnmaskType {
UNKNOWN_UMASK = 0;
NO_UMASK = 1;
PACKAGE_UNMASK = 2;
PACKAGE_KEYWORDS = 3;
message KeyFlags {
enum KeyFlag {
UNKNOWN = 0;
STABLE = 1;
ARCHSTABLE = 2;
ARCHUNSTABLE = 3;
ALIENSTABLE = 4;
ALIENUNSTABLE = 5;
MINUSKEYWORD = 6;
MINUSUNSTABLE = 7;
MINUSASTERISK = 8;
}

repeated KeyFlag key_flag = 1;
}

enum Property {
UNKNOwN_PROPERTY = 0;
INTERACTIVE = 1;
LIVE = 2;
VIRTUAL = 3;
SET = 4;
message Properties {
enum Property {
UNKNOwN = 0;
INTERACTIVE = 1;
LIVE = 2;
VIRTUAL = 3;
SET = 4;
}

repeated Property property = 1;
}

enum Restrict {
UNKNOwN_RESTRICT = 0;
BINCHECKS = 1;
STRIP = 2;
TEST = 3;
USERPRIV = 4;
INSTALLSOURCES = 5;
FETCH = 6;
MIRROR = 7;
PRIMARYURI = 8;
BINDIST = 9;
PARALLEL = 10;
message Restrictions {
enum Restrict {
UNKNOwN = 0;
BINCHECKS = 1;
STRIP = 2;
TEST = 3;
USERPRIV = 4;
INSTALLSOURCES = 5;
FETCH = 6;
MIRROR = 7;
PRIMARYURI = 8;
BINDIST = 9;
PARALLEL = 10;
}

repeated Restrict restrict = 1;
}

repeated Category category = 1;
Expand Down
Loading

0 comments on commit c51427c

Please sign in to comment.