diff --git a/ChangeLog b/ChangeLog index 7ea6dc82..59934c85 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ *eix-0.36.6 Martin Väth : + - Support *.gpkg.tar (BINPKG_FORMAT=gpkg), see + https://github.com/vaeth/eix/issues/104 - Let eix-layman without arguments display the help text *eix-0.36.5 diff --git a/manpage/de-eix.1.in b/manpage/de-eix.1.in index a52749d4..d8d49b26 100644 --- a/manpage/de-eix.1.in +++ b/manpage/de-eix.1.in @@ -635,12 +635,15 @@ Findet nur Pakete aus der world-Datei. Findet nur Pakete aus world_set. .TP .BR --binary -Findet nur Pakete mit einer Binärdatei (*.tbz2 oder *.xpak) in PKGDIR. +Findet nur Pakete mit einer Binärdatei (*.tbz2, *.gpkg.tar oder *.xpak) in PKGDIR. Die Version des Binärfiles muss mit mindestens einer vorhandenen oder einer installierten Version übereinstimmen. (Falls keine Version vorhanden ist, kann das Paket ebenfalls nicht gefunden werden). -Nur die reine Existenz einer entsprechenden Datei mit *.tbz2 oder *.xpak wird überprüft: +Nur die reine Existenz einer entsprechenden Datei mit *.tbz2, *.gpkg.tar oder *.xpak wird überprüft: Ob Portage die Datei tatsächlich benutzen kann, hängt auch von Meta-Daten innerhalb dieser Datei ab (wie etwa USE settings), was von eix nicht beachtet wird. .TP +.BI --multi-binary NR +Findet nur Pakete mit einer Version, die mindest I Dateien hat, die auf B<--binary> zutreffen. +.TP .B --nonvirtual Findet nur Pakete mit mindestens einer Version aus dem Hauptbaum oder einem nicht-virtuellen Overlay. .TP @@ -1103,12 +1106,12 @@ Dies ist Version 3.14p, die in den Slot "GNAT-3.14p" installiert wird. .B 2.0.0_rc1-r6 Dies ist Version 2.0.0_rc1-r6, und der SLOT ist leer oder "0". .TP -.B 1.0*ilvs^fmpbstuidP{tbz2,pak:2} +.B 1.0*ilvs^fmpbstuidP{tbz2,gpkg:3,pak:2} Dies ist Version 1.0, und gesetzt sind PROPERTIES="interactive live virtual set" sowie RESTRICT="fetch mirror primaryuri binchecks strip test userpriv installsources bindist parallel". -Darüberhinaus existiert eine *.tbz2 und zwei *.xpak-Dateien -(Binärpakete ohne bzw. mit FEATURES==binpkg-multi-instance) +Darüberhinaus existiert eine *.tbz2, drei *.gpkg.tar und zwei *.xpak-Dateien +(Binärpakete ohne bzw. mit FEATURES=binpkg-multi-instance bzw, FEATURES=gpkg) für diese Version in B. .TP .B 5.0-r3(5.0R3)^f " oder " 5.0-r3:5.0R3^f @@ -1390,20 +1393,32 @@ lokelen bzw. Standard-Konfiguration) die entsprechend Stabilitätseigenschaft ha .TP .B isbinary Dies darf nur in I im Zusammenhang von Versionsausgaben benutzt werden. -Dies ist 1 oder leer, je nachdem ob eine entsprechende Datei mit *.tbz2 oder *.xpak für die Version existiert. +Dies ist 1 oder leer, je nachdem ob eine entsprechende Datei mit *.tbz2, *.gpkg.tar oder *.xpak für die Version existiert. .TP .B istbz Dies darf nur in I im Zusammenhang von Versionsausgaben benutzt werden. Dies ist 1 oder leer, je nachdem ob eine entsprechende Datei mit *.tbz2 für die Version existiert. .TP +.B isgpkg +Dies darf nur in I im Zusammenhang von Versionsausgaben benutzt werden. +Dies ist 1 oder leer, je nachdem ob mindestens eine entsprechende Datei mit *.gpkg.tar für die Version existiert. +.TP .B ispak Dies darf nur in I im Zusammenhang von Versionsausgaben benutzt werden. -Dies ist 1 oder leer, je nachdem ob eine entsprechende Datei mit *.xpak für die Version existiert. +Dies ist 1 oder leer, je nachdem ob mindestens eine entsprechende Datei mit *.xpak für die Version existiert. +.TP +.B ismultigpkg +Dies darf nur in I im Zusammenhang von Versionsausgaben benutzt werden. +Dies ist 1 oder leer, je nachdem ob mindestens zwei Dateien mit *.gpkg.tar für die Version existieren. .TP .B ismultipak Dies darf nur in I im Zusammenhang von Versionsausgaben benutzt werden. Dies ist 1 oder leer, je nachdem ob mindestens zwei Dateien mit *.xpak für die Version existieren. .TP +.B gpkgcount +Dies darf nur in I im Zusammenhang von Versionsausgaben benutzt werden. +Es enthält die Anzahl der Dateien mit *.gpkg.tar für die Version. Falls keine existiert, ist es leer. +.TP .B pakcount Dies darf nur in I im Zusammenhang von Versionsausgaben benutzt werden. Es enthält die Anzahl der Dateien mit *.xpak für die Version. Falls keine existiert, ist es leer. @@ -1482,7 +1497,7 @@ Die Namen aller lokalen Sets, zu denen das Paket gehört, durch Leerzeichen sepa Mit B können auch "system" und "profile" dabei sein. .TP .B binary -Ist 1 oder leer, je nachdem, ob mindestens eine Version (verfügbar oder installiert) eine *.tbz2 Datei besitzt. +Ist 1 oder leer, je nachdem, ob mindestens eine Version (verfügbar oder installiert) eine *.tbz2, *.gpkg.tar, oder *.xpak Datei besitzt. Vgl. die Bemerkungen zu B<--binary>. .TP .B mainrepo @@ -2391,9 +2406,9 @@ Bestimmt, ob für eix und eix-diff die Option B<--care> die Vorgabe ist. Entscheidet, ob der BUILD_TIME-Eintrag (falls existent) der Portage Datenbank benutzt werden kann anstelle des Zeitstempels des Verzeichnisses (das normalerweise die Installationszeit trägt). -Der Unterschied ist für gewöhnlich nur für Pakete wichtig, die aus einem *.tbz2 -installiert wurde, aber in den meisten Fällen ist die BUILD_TIME relevanter -(und auch verlässlicher). +Der Unterschied ist für gewöhnlich nur für Pakete wichtig, die aus einem +*.tbz2, *.gpkg.tar, oder *.xpak installiert wurden, aber in den meisten Fällen +ist die BUILD_TIME relevanter (und auch verlässlicher). Unglücklicherweise ist die BUILD_TIME nur für Pakete verfügbar, die mit >=portage-2.2_rc63 gebaut und installiert wurden. Der B Test kann herausfinden, für welche diff --git a/manpage/en-eix.1.in b/manpage/en-eix.1.in index a8320f42..4a8635a8 100644 --- a/manpage/en-eix.1.in +++ b/manpage/en-eix.1.in @@ -616,12 +616,15 @@ This only matches packages from the world file. This only matches packages from world_set. .TP .BR --binary -Only match packages with a binary file (*.tbz2 or *.xpak) in PKGDIR. +Only match packages with a binary file (*.tbz2, *.gpkg.tar, or *.xpak) in PKGDIR. The version of the binary file must either match the version of an available version or of an installed version. (However, note that if no version is available, the package cannot be found either). -Just the existence of the corresponding *.tbz2 or *.xpak file is checked: +Just the existence of the corresponding *.tbz2, *.gpkg.tar, or *.xpak file is checked: Whether portage can actually use the file depends also on metadata within that file (like USE settings) which is not considered by eix. .TP +.BI --multi-binary NR +Only match packages with a version with at least I files matching B<--binary>. +.TP .B --nonvirtual Only match packages with at least one version from the main tree or a non-virtual overlay. .TP @@ -1078,12 +1081,12 @@ This is version 3.14p which will be installed into the slot "GNAT-3.14p". .B 2.0.0_rc1-r6 This is version 2.0.0_rc1-r6, and SLOT is either empty or "0". .TP -.B 1.0*ilvs^fmpbstuidP{tbz2,pak:2} +.B 1.0*ilvs^fmpbstuidP{tbz2,gpkg:3,pak:2} This is version 1.0 which is subject to PROPERTIES="interactive live virtual set" as well as RESTRICT="fetch mirror primaryuri binchecks strip test userpriv installsources bindist parallel" -Moreover, a *.tbz2 and two *.xpak files (binary packages without or with -FEATURES=binpkg-multi-instance, respectively) exist for that version +Moreover, a *.tbz2, three *.gpkg.tar, and two *.xpak files (binary packages without or with +FEATURES=binpkg-multi-instance or BINPKG_FORMAT=gpkg, respectively) exist for that version in B. .TP .B 5.0-r3(5.0R3)^f " or " 5.0-r3:5.0R3^f @@ -1363,20 +1366,32 @@ property according to the local or default configuration, respectively. .TP .B isbinary This must occur only in I in the context of version printing. -It returns 1 or empty depending on whether there is a corresponding *.tbz2 or *.xpak file for the version. +It returns 1 or empty depending on whether there is a corresponding *.tbz2, *gpkg.tar, or *.xpak file for the version. .TP .B istbz This must occur only in I in the context of version printing. It returns 1 or empty depending on whether there is a corresponding *.tbz2 file for the version. .TP +.B isgpkg +This must occur only in I in the context of version printing. +It returns 1 or empty depending on whether there is at least one corresponding *.gpkg.tar file for the version. +.TP .B ispak This must occur only in I in the context of version printing. It returns 1 or empty depending on whether there is at least one corresponding *.xpak file for the version. .TP +.B isgpkgmulti +This must occur only in I in the context of version printing. +It returns 1 or empty depending on whether there are at least two corresponding *.gpkg.tar files for the version. +.TP .B ismultipak This must occur only in I in the context of version printing. It returns 1 or empty depending on whether there are at least two corresponding *.xpak files for the version. .TP +.B gpkgcount +This must occur only in I in the context of version printing. +It returns the number of *.gpkg.tar files for the version or empty if there are none. +.TP .B pakcount This must occur only in I in the context of version printing. It returns the number of *.xpak files for the version or empty if there are none. @@ -1458,7 +1473,7 @@ The name of all local sets to which the package belongs, separated by spaces. With B also the "system" and "profile" set names are included. .TP .B binary -Is 1 or empty, depending on whether at least one version (available or installed) has a corresponding *.tbz2 file. +Is 1 or empty, depending on whether at least one version (available or installed) has a corresponding *.tbz2, *.gpkg.tar, or *.xpak file. See the remarks for B<--binary>. .TP .B mainrepo @@ -2369,8 +2384,8 @@ If true, eix and eix-diff will use B<--care>. .BR USE_BUILD_TIME " " (true / false) Whether to use the BUILD_TIME entry (if it exists) of the portage database instead of the directory timestamp (which usually is the installation time). -The difference is usually only important for packages installed from *.tbz2 -or *.xpak files, but in most cases the build time is more relevant +The difference is usually only important for packages installed from *.tbz2, +*.gpkg.tar, or *.xpak files, but in most cases the build time is more relevant (it is also more reliable). Unfortunately, the build time is available only for packages built and emerged with >=portage-2.2_rc63; you can use B to check diff --git a/manpage/ru-eix.1.in b/manpage/ru-eix.1.in index 6efbdf48..21988871 100644 --- a/manpage/ru-eix.1.in +++ b/manpage/ru-eix.1.in @@ -613,12 +613,15 @@ This only matches packages from the world file. This only matches packages from world_set. .TP .BR --binary -Only match packages with a binary file (*.tbz2 or *.xpak) in PKGDIR. +Only match packages with a binary file (*.tbz2, *.gpkg.tar, or *.xpak) in PKGDIR. The version of the binary file must either match the version of an available version or of an installed version. (However, note that if no version is available, the package cannot be found either). -Just the existence of the corresponding *.tbz2 or *.xpak file is checked: +Just the existence of the corresponding *.tbz2, *.gpkg.tar, or *.xpak file is checked: Whether portage can actually use the file depends also on metadata within that file (like USE settings) which is not considered by eix. .TP +.BI --multi-binary NR +Only match packages with a version with at least I files matching B<--binary>. +.TP .B --nonvirtual Only match packages with at least one version from the main tree or a non-virtual overlay. .TP @@ -1075,12 +1078,12 @@ This is version 3.14p which will be installed into the slot "GNAT-3.14p". .B 2.0.0_rc1-r6 This is version 2.0.0_rc1-r6, and SLOT is either empty or "0". .TP -.B 1.0*ilvs^fmpbstuidP{tbz2,pak:2} +.B 1.0*ilvs^fmpbstuidP{tbz2,gpkg:3,pak:2} This is version 1.0 which is subject to PROPERTIES="interactive live virtual set" as well as RESTRICT="fetch mirror primaryuri binchecks strip test userpriv installsources bindist parallel" -Moreover, a *.tbz2 and two *.xpak files (binary packages without or with -FEATURES=binpkg-multi-instance, respectively) exist for that version +Moreover, a *.tbz2, three *.gpkg.tar, and two *.xpak files (binary packages without or with +FEATURES=binpkg-multi-instance or BINPKG_FORMAT=gpkg, respectively) exist for that version in B. .TP .B 5.0-r3(5.0R3)^f " or " 5.0-r3:5.0R3^f @@ -1360,20 +1363,32 @@ property according to the local or default configuration, respectively. .TP .B isbinary This must occur only in I in the context of version printing. -It returns 1 or empty depending on whether there is a corresponding *.tbz2 or *.xpak file for the version. +It returns 1 or empty depending on whether there is a corresponding *.tbz2, *.gpkg.tar, or *.xpak file for the version. .TP .B istbz This must occur only in I in the context of version printing. It returns 1 or empty depending on whether there is a corresponding *.tbz2 file for the version. .TP +.B isgpkg +This must occur only in I in the context of version printing. +It returns 1 or empty depending on whether there is at least one corresponding *.gpkg.tar file for the version. +.TP .B ispak This must occur only in I in the context of version printing. It returns 1 or empty depending on whether there is at least one corresponding *.xpak file for the version. .TP +.B isgpkgmulti +This must occur only in I in the context of version printing. +It returns 1 or empty depending on whether there are at least two corresponding *.gpkg.tar files for the version. +.TP .B ismultipak This must occur only in I in the context of version printing. It returns 1 or empty depending on whether there are at least two corresponding *.xpak files for the version. .TP +.B gpkgcount +This must occur only in I in the context of version printing. +It returns the number of *.gpkg.tar files for the version or empty if there are none. +.TP .B pakcount This must occur only in I in the context of version printing. It returns the number of *.xpak files for the version or empty if there are none. @@ -1455,7 +1470,7 @@ The name of all local sets to which the package belongs, separated by spaces. With B also the "system" and "profile" set names are included. .TP .B binary -Is 1 or empty, depending on whether at least one version (available or installed) has a corresponding *.tbz2 file. +Is 1 or empty, depending on whether at least one version (available or installed) has a corresponding *.tbz2, *.gpkg.tar, or *.xpak file. See the remarks for B<--binary>. .TP .B mainrepo @@ -2366,8 +2381,8 @@ If true, eix and eix-diff will use B<--care>. .BR USE_BUILD_TIME " " (true / false) Whether to use the BUILD_TIME entry (if it exists) of the portage database instead of the directory timestamp (which usually is the installation time). -The difference is usually only important for packages installed from *.tbz2 -or *.xpak files, but in most cases the build time is more relevant +The difference is usually only important for packages installed from *.tbz2, +*.gpkg.tar, or *.xpak files, but in most cases the build time is more relevant (it is also more reliable). Unfortunately, the build time is available only for packages built and emerged with >=portage-2.2_rc63; you can use B to check diff --git a/po/de.po b/po/de.po index 3aa72f8e..22dfab98 100644 --- a/po/de.po +++ b/po/de.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: eix\n" "Report-Msgid-Bugs-To: https://github.com/vaeth/eix/issues/\n" -"POT-Creation-Date: 2021-10-02 10:23+0200\n" -"PO-Revision-Date: 2021-10-02 10:25+0200\n" +"POT-Creation-Date: 2023-01-29 14:08+0100\n" +"PO-Revision-Date: 2023-01-29 14:30+0100\n" "Last-Translator: Martin Väth \n" "Language-Team: German\n" "Language: de\n" @@ -1701,8 +1701,8 @@ msgid "" " --selected-file Match packages of world file\n" " --selected-set Match packages of a world set\n" " --selected Match packages of @selected (world file or set)\n" -" --binary Match packages with *.tbz2 or *.xpak files\n" -" --multi-binary NR Match packages with at least NR *.tbz2 or *.xpak\n" +" --binary Match packages with *.tbz2, *.gpkg.tar, or *.xpak\n" +" --multi-binary NR Match packages with at least NR --binary files\n" " --nonvirtual Match packages from nonvirtual overlays\n" " --virtual Match packages from virtual overlays\n" " -O, --overlay Match packages from overlays\n" @@ -1887,8 +1887,8 @@ msgstr "" " --selected-file Pakete aus world-Datei\n" " --selected-set Pakete aus world_sets\n" " --selected Pakete aus @selected (world-Datei oder world_sets)\n" -" --binary Pakete mit *.tbz2 oder *.xpak\n" -" --multi-binary NR Pakate mit mindestens NR *.tbz2 oder *.xpak\n" +" --binary Pakete mit *.tbz2, *.gpkg.tar oder *.xpak\n" +" --multi-binary NR Pakate mit mindestens NR --binary Dateien\n" " --nonvirtual Pakete aus nicht-virtuellen Overlays\n" " --virtual Pakete aus virtuellen Overlays\n" " -O, --overlay Pakete aus Overlays\n" @@ -3607,9 +3607,6 @@ msgstr "" "die von KEEP_VIRTUALS gesetzten Vorgaben überschreiben." #: src/eixrc/defaults.cc -#, fuzzy -#| msgctxt "EBUILD_PORTAGE3_0_24" -#| msgid "Whether cache methods ebuild and ebuild* assume >=portage-3.0.24." msgctxt "EBUILD_PORTAGE3_0_24" msgid "" "Must be true if and only if cache methods ebuild and ebuild* are to be used\n" @@ -5342,11 +5339,21 @@ msgctxt "COLOR_TBZ" msgid "Color for tag for *.tbz2. This is only used for delayed substitution." msgstr "Farbe für Tags für *.tbz2. Dies wird nur zur verzögerten Ersetzung benutzt." +#: src/eixrc/defaults.cc +msgctxt "COLOR_GPKG" +msgid "Color for tag for *.gpkg.tar. This is only used for delayed substitution." +msgstr "Farbe für Tags für *.gpkg.tar. Dies wird nur zur verzögerten Ersetzung benutzt." + #: src/eixrc/defaults.cc msgctxt "COLOR_PAK" msgid "Color for tag for *.xpak. This is only used for delayed substitution." msgstr "Farbe für Tags für *.xpak. Dies wird nur zur verzögerten Ersetzung benutzt." +#: src/eixrc/defaults.cc +msgctxt "COLOR_GPKGCOUNT" +msgid "Color for number of *.gpkg.tar. This is only used for delayed substitution." +msgstr "Farbe für Zahl der *.gpkg.tar. Dies wird nur zur verzögerten Ersetzung benutzt." + #: src/eixrc/defaults.cc msgctxt "COLOR_PAKCOUNT" msgid "Color for number of *.xpak. This is only used for delayed substitution." @@ -5654,10 +5661,20 @@ msgctxt "TAG_TBZ" msgid "Tag for *.tbz2. This is only used for delayed substitution." msgstr "Das Tag für *.tbz2. Dies wird nur zur verzögerten Ersetzung benutzt." +#: src/eixrc/defaults.cc +msgctxt "TAG_GPKG" +msgid "Tag for *.gpkg.tar. This is only used for delayed substitution." +msgstr "Tag für *.gpkg.tar. Dies wird nur zur verzögerten Ersetzung benutzt." + #: src/eixrc/defaults.cc msgctxt "TAG_PAK" msgid "Tag for *.xpak. This is only used for delayed substitution." -msgstr "Tage für *.xpak. Dies wird nur zur verzögerten Ersetzung benutzt." +msgstr "Tag für *.xpak. Dies wird nur zur verzögerten Ersetzung benutzt." + +#: src/eixrc/defaults.cc +msgctxt "TAG_MULTIGPKG" +msgid "Tag for multiple *.gpkg.tar. This is only used for delayed substitution." +msgstr "Tag für mehrfache *.gpkg.tar. Dies wird nur zur verzögerten Ersetzung benutzt." #: src/eixrc/defaults.cc msgctxt "TAG_MULTIPAK" @@ -6290,12 +6307,12 @@ msgstr "" msgctxt "FORMAT_BINARY" msgid "" "This variable is only used for delayed substitution.\n" -"It defines the format of the PROPERTIES and RESTRICT of a version\n" -"and resets the color." +"It defines the format of the binary packages of a version and\n" +"resets the color." msgstr "" "Diese Variable wird nur zur verzögerten Ersetzung benutzt.\n" -"Sie definiert das Format für PROPERTIES und RESTRICT einer Version\n" -"und setzt die Farben zurück." +"Sie definiert das Format für Binärpakete einer Version und setzt\n" +"die Farben zurück." #: src/eixrc/defaults.cc msgctxt "FORMAT_TBZ" @@ -6306,6 +6323,15 @@ msgstr "" "Diese Variable wird nur zur verzögerten Ersetzung benutzt.\n" "Sie legt das Format für Versionen mit *.tbz2 fest." +#: src/eixrc/defaults.cc +msgctxt "FORMAT_GPKG" +msgid "" +"This variable is only used for delayed substitution.\n" +"It defines the format for versions with *.gpkg.tar." +msgstr "" +"Diese Variable wird nur zur verzögerten Ersetzung benutzt.\n" +"Sie legt das Format für Versionen mit *.gpkg.tar fest." + #: src/eixrc/defaults.cc msgctxt "FORMAT_PAK" msgid "" diff --git a/po/ru.po b/po/ru.po index 664bc5ce..6bfe4906 100644 --- a/po/ru.po +++ b/po/ru.po @@ -10,8 +10,8 @@ msgid "" msgstr "" "Project-Id-Version: eix\n" "Report-Msgid-Bugs-To: https://github.com/vaeth/eix/issues/\n" -"POT-Creation-Date: 2021-10-02 10:23+0200\n" -"PO-Revision-Date: 2021-10-02 10:09+0200\n" +"POT-Creation-Date: 2023-01-29 14:08+0100\n" +"PO-Revision-Date: 2023-01-29 14:28+0100\n" "Last-Translator: Artem Vorotnikov \n" "Language-Team: русский <>\n" "Language: ru\n" @@ -1724,8 +1724,8 @@ msgid "" " --selected-file Match packages of world file\n" " --selected-set Match packages of a world set\n" " --selected Match packages of @selected (world file or set)\n" -" --binary Match packages with *.tbz2 or *.xpak files\n" -" --multi-binary NR Match packages with at least NR *.tbz2 or *.xpak\n" +" --binary Match packages with *.tbz2, *.gpkg.tar, or *.xpak\n" +" --multi-binary NR Match packages with at least NR --binary files\n" " --nonvirtual Match packages from nonvirtual overlays\n" " --virtual Match packages from virtual overlays\n" " -O, --overlay Match packages from overlays\n" @@ -1918,8 +1918,9 @@ msgstr "" " --selected-file Найти пакеты из файла world.\n" " --selected-set Найти пакеты из набора world.\n" " --selected Найти пакеты из @selected (файл или набор world).\n" -" --binary Найти пакеты в формате *.tbz2 или *.xpak.\n" -" --multi-binary NR Найти пакеты с не менее NR *.tbz2 или *.xpak.\n" +" --binary Найти пакеты в формате *.tbz2 или *.gpkg.tar\n" +" или *.xpak.\n" +" --multi-binary NR Найти пакеты с не менее NR --binary.\n" " --nonvirtual Найти пакеты из невиртуальных оверлеев.\n" " --virtual Найти пакеты из виртуальных оверлеев.\n" " -O, --overlay Найти пакеты из оверлеев.\n" @@ -4830,11 +4831,21 @@ msgctxt "COLOR_TBZ" msgid "Color for tag for *.tbz2. This is only used for delayed substitution." msgstr "" +#: src/eixrc/defaults.cc +msgctxt "COLOR_GPKG" +msgid "Color for tag for *.gpkg.tar. This is only used for delayed substitution." +msgstr "" + #: src/eixrc/defaults.cc msgctxt "COLOR_PAK" msgid "Color for tag for *.xpak. This is only used for delayed substitution." msgstr "" +#: src/eixrc/defaults.cc +msgctxt "COLOR_GPKGCOUNT" +msgid "Color for number of *.gpkg.tar. This is only used for delayed substitution." +msgstr "" + #: src/eixrc/defaults.cc msgctxt "COLOR_PAKCOUNT" msgid "Color for number of *.xpak. This is only used for delayed substitution." @@ -5083,11 +5094,21 @@ msgctxt "TAG_TBZ" msgid "Tag for *.tbz2. This is only used for delayed substitution." msgstr "" +#: src/eixrc/defaults.cc +msgctxt "TAG_GPKG" +msgid "Tag for *.gpkg.tar. This is only used for delayed substitution." +msgstr "" + #: src/eixrc/defaults.cc msgctxt "TAG_PAK" msgid "Tag for *.xpak. This is only used for delayed substitution." msgstr "" +#: src/eixrc/defaults.cc +msgctxt "TAG_MULTIGPKG" +msgid "Tag for multiple *.gpkg.tar. This is only used for delayed substitution." +msgstr "" + #: src/eixrc/defaults.cc msgctxt "TAG_MULTIPAK" msgid "Tag for multiple *.xpak. This is only used for delayed substitution." @@ -5559,8 +5580,8 @@ msgstr "" msgctxt "FORMAT_BINARY" msgid "" "This variable is only used for delayed substitution.\n" -"It defines the format of the PROPERTIES and RESTRICT of a version\n" -"and resets the color." +"It defines the format of the binary packages of a version and\n" +"resets the color." msgstr "" #: src/eixrc/defaults.cc @@ -5570,6 +5591,13 @@ msgid "" "It defines the format for versions with *.tbz2." msgstr "" +#: src/eixrc/defaults.cc +msgctxt "FORMAT_GPKG" +msgid "" +"This variable is only used for delayed substitution.\n" +"It defines the format for versions with *.gpkg.tar." +msgstr "" + #: src/eixrc/defaults.cc msgctxt "FORMAT_PAK" msgid "" diff --git a/src/eix.cc b/src/eix.cc index a8fa8e4d..868f57e8 100644 --- a/src/eix.cc +++ b/src/eix.cc @@ -188,8 +188,8 @@ static void dump_help() { " --selected-file Match packages of world file\n" " --selected-set Match packages of a world set\n" " --selected Match packages of @selected (world file or set)\n" -" --binary Match packages with *.tbz2 or *.xpak files\n" -" --multi-binary NR Match packages with at least NR *.tbz2 or *.xpak\n" +" --binary Match packages with *.tbz2, *.gpkg.tar, or *.xpak\n" +" --multi-binary NR Match packages with at least NR --binary files\n" " --nonvirtual Match packages from nonvirtual overlays\n" " --virtual Match packages from virtual overlays\n" " -O, --overlay Match packages from overlays\n" diff --git a/src/eixrc/defaults.cc b/src/eixrc/defaults.cc index 3b741798..6fad8e82 100644 --- a/src/eixrc/defaults.cc +++ b/src/eixrc/defaults.cc @@ -1508,10 +1508,18 @@ AddOption(STRING, "COLOR_TBZ", "%{COLOR_BINARY}", P_("COLOR_TBZ", "Color for tag for *.tbz2. This is only used for delayed substitution.")); +AddOption(STRING, "COLOR_GPKG", + "%{COLOR_BINARY}", P_("COLOR_GPKG", + "Color for tag for *.gpkg.tar. This is only used for delayed substitution.")); + AddOption(STRING, "COLOR_PAK", "blue,1;%{BG0S}|59,1;%{BG1}|blue,1;%{BG2}|59,1;%{BG3}|59,1", P_("COLOR_PAK", "Color for tag for *.xpak. This is only used for delayed substitution.")); +AddOption(STRING, "COLOR_GPKGCOUNT", + "%{COLOR_PAKCOUNT}", P_("COLOR_GPKGCOUNT", + "Color for number of *.gpkg.tar. This is only used for delayed substitution.")); + AddOption(STRING, "COLOR_PAKCOUNT", "purple,1;%{BG0S}|97,1;%{BG1}|blue,1;%{BG2}|97,1;%{BG3}|97,1", P_("COLOR_PAKCOUNT", "Color for number of *.xpak. This is only used for delayed substitution.")); @@ -1689,10 +1697,18 @@ AddOption(STRING, "TAG_TBZ", "tbz2", P_("TAG_TBZ", "Tag for *.tbz2. This is only used for delayed substitution.")); +AddOption(STRING, "TAG_GPKG", + "gpkg", P_("TAG_GPKG", + "Tag for *.gpkg.tar. This is only used for delayed substitution.")); + AddOption(STRING, "TAG_PAK", "xpak", P_("TAG_PAK", "Tag for *.xpak. This is only used for delayed substitution.")); +AddOption(STRING, "TAG_MULTIGPKG", + "%{TAG_MULTIPAK}", P_("TAG_MULTIGPKG", + "Tag for multiple *.gpkg.tar. This is only used for delayed substitution.")); + AddOption(STRING, "TAG_MULTIPAK", ":", P_("TAG_MULTIPAK", "Tag for multiple *.xpak. This is only used for delayed substitution.")); @@ -2142,23 +2158,39 @@ AddOption(STRING, "FORMAT_BINARY", "<$sep>{!*sep}(%{COLOR_BINARY})\\{" "{istbz}" "%{FORMAT_TBZ}" - "{ispak}(%{COLOR_BINARY}),{}" + "{*binsep}" + "{}" + "{isgpkg}" + "{$binsep}(%{COLOR_BINARY}),{}" + "%{FORMAT_GPKG}" + "{*binsep}" "{}" - "(%{COLOR_RESET})" "{ispak}" + "{$binsep}(%{COLOR_BINARY}),{}" "%{FORMAT_PAK}" "{}" + "{!*binsep}" "(%{COLOR_BINARY})}(%{COLOR_RESET})" "{}%{}", P_("FORMAT_BINARY", "This variable is only used for delayed substitution.\n" - "It defines the format of the PROPERTIES and RESTRICT of a version\n" - "and resets the color.")); + "It defines the format of the binary packages of a version and\n" + "resets the color.")); AddOption(STRING, "FORMAT_TBZ", "(%{COLOR_TBZ})%{TAG_TBZ}(%{COLOR_RESET})", P_("FORMAT_TBZ", "This variable is only used for delayed substitution.\n" "It defines the format for versions with *.tbz2.")); +AddOption(STRING, "FORMAT_GPKG", + "(%{COLOR_GPKG})%{TAG_GPKG}" + "{ismultigpkg}" + "%{TAG_MULTIGPKG}" + "(%{COLOR_GPKGCOUNT})" + "{}" + "(%{COLOR_RESET})", P_("FORMAT_GPKG", + "This variable is only used for delayed substitution.\n" + "It defines the format for versions with *.gpkg.tar.")); + AddOption(STRING, "FORMAT_PAK", "(%{COLOR_PAK})%{TAG_PAK}" "{ismultipak}" diff --git a/src/output/formatstring-print.cc b/src/output/formatstring-print.cc index 254a733d..cb0ab141 100644 --- a/src/output/formatstring-print.cc +++ b/src/output/formatstring-print.cc @@ -478,8 +478,11 @@ class Scanner { prop_ver("virtual", &PrintFormat::VER_VIRTUAL); prop_ver("isbinary", &PrintFormat::VER_ISBINARY); prop_ver("istbz", &PrintFormat::VER_ISTBZ); + prop_ver("isgpkg", &PrintFormat::VER_ISGPKG); prop_ver("ispak", &PrintFormat::VER_ISPAK); + prop_ver("ismultigpkg", &PrintFormat::VER_ISMULTIGPKG); prop_ver("ismultipak", &PrintFormat::VER_ISMULTIPAK); + prop_ver("gpkgcount", &PrintFormat::VER_GPKGCOUNT); prop_ver("pakcount", &PrintFormat::VER_PAKCOUNT); prop_ver("restrict", &PrintFormat::VER_RESTRICT); prop_ver("restrictfetch", &PrintFormat::VER_RESTRICTFETCH); @@ -1352,18 +1355,37 @@ void PrintFormat::VER_ISTBZ(OutputString *s, Package *package) const { } } +void PrintFormat::VER_ISGPKG(OutputString *s, Package *package) const { + if(ver_version()->num_gpkg_pkg(portagesettings, package) != 0) { + s->set_one(); + } +} + void PrintFormat::VER_ISPAK(OutputString *s, Package *package) const { if(ver_version()->num_pak_pkg(portagesettings, package) != 0) { s->set_one(); } } +void PrintFormat::VER_ISMULTIGPKG(OutputString *s, Package *package) const { + if(ver_version()->num_gpkg_pkg(portagesettings, package) > 1) { + s->set_one(); + } +} + void PrintFormat::VER_ISMULTIPAK(OutputString *s, Package *package) const { if(ver_version()->num_pak_pkg(portagesettings, package) > 1) { s->set_one(); } } +void PrintFormat::VER_GPKGCOUNT(OutputString *s, Package *package) const { + ExtendedVersion::CountBinPkg count(ver_version()->num_gpkg_pkg(portagesettings, package)); + if(count != 0) { + s->assign_fast(eix::format() % count); + } +} + void PrintFormat::VER_PAKCOUNT(OutputString *s, Package *package) const { ExtendedVersion::CountBinPkg count(ver_version()->num_pak_pkg(portagesettings, package)); if(count != 0) { diff --git a/src/output/formatstring.h b/src/output/formatstring.h index 294a5348..0c50c6a3 100644 --- a/src/output/formatstring.h +++ b/src/output/formatstring.h @@ -350,8 +350,11 @@ class PrintFormat { ATTRIBUTE_NONNULL_ void VER_VIRTUAL(OutputString *s, Package *package) const; ATTRIBUTE_NONNULL_ void VER_ISBINARY(OutputString *s, Package *package) const; ATTRIBUTE_NONNULL_ void VER_ISTBZ(OutputString *s, Package *package) const; + ATTRIBUTE_NONNULL_ void VER_ISGPKG(OutputString *s, Package *package) const; ATTRIBUTE_NONNULL_ void VER_ISPAK(OutputString *s, Package *package) const; + ATTRIBUTE_NONNULL_ void VER_ISMULTIGPKG(OutputString *s, Package *package) const; ATTRIBUTE_NONNULL_ void VER_ISMULTIPAK(OutputString *s, Package *package) const; + ATTRIBUTE_NONNULL_ void VER_GPKGCOUNT(OutputString *s, Package *package) const; ATTRIBUTE_NONNULL_ void VER_PAKCOUNT(OutputString *s, Package *package) const; ATTRIBUTE_NONNULL_ const ExtendedVersion *ver_restrict(Package *package) const; ATTRIBUTE_NONNULL_ void ver_restrict(OutputString *s, Package *package, ExtendedVersion::Restrict r) const; diff --git a/src/portage/extendedversion.cc b/src/portage/extendedversion.cc index 38c05a3f..88cd491b 100644 --- a/src/portage/extendedversion.cc +++ b/src/portage/extendedversion.cc @@ -46,7 +46,8 @@ const ExtendedVersion::HaveBinPkg ExtendedVersion::HAVEBINPKG_TBZ_NO, ExtendedVersion::HAVEBINPKG_TBZ_YES, ExtendedVersion::HAVEBINPKG_TBZ, - ExtendedVersion::HAVEBINPKG_PAK; + ExtendedVersion::HAVEBINPKG_GPKG, + ExtendedVersion::HAVEBINPKG_MULTI; bool ExtendedVersion::use_src_uri; diff --git a/src/portage/extendedversion.h b/src/portage/extendedversion.h index d0a3bfec..17be8935 100644 --- a/src/portage/extendedversion.h +++ b/src/portage/extendedversion.h @@ -34,13 +34,16 @@ class ExtendedVersion : public BasicVersion { private: typedef eix::UChar HaveBinPkg; static CONSTEXPR const HaveBinPkg - HAVEBINPKG_UNKNOWN = 0x00U, - HAVEBINPKG_TBZ_NO = 0x01U, - HAVEBINPKG_TBZ_YES = 0x02U, - HAVEBINPKG_TBZ = HAVEBINPKG_TBZ_NO|HAVEBINPKG_TBZ_YES, - HAVEBINPKG_PAK = 0x04U; + HAVEBINPKG_UNKNOWN = 0x00U, + HAVEBINPKG_TBZ_NO = 0x01U, + HAVEBINPKG_TBZ_YES = 0x02U, + HAVEBINPKG_TBZ = HAVEBINPKG_TBZ_NO|HAVEBINPKG_TBZ_YES, + HAVEBINPKG_GPKG = 0x04U, + HAVEBINPKG_MULTI = 0x08U; mutable HaveBinPkg have_bin_pkg_m; // mutable: it is just a cache - mutable CountBinPkg count_pak_m; + mutable CountBinPkg count_gpkg_m, count_pak_m; + + void count_multiversions(const PortageSettings *ps, const Package *pkg) const; public: typedef uint16_t Restrict; @@ -145,6 +148,7 @@ class ExtendedVersion : public BasicVersion { bool have_bin_pkg(const PortageSettings *ps, const Package *pkg, CountBinPkg minimal) const; bool have_bin_pkg(const PortageSettings *ps, const Package *pkg) const; bool have_tbz_pkg(const PortageSettings *ps, const Package *pkg) const; + CountBinPkg num_gpkg_pkg(const PortageSettings *ps, const Package *pkg) const; CountBinPkg num_pak_pkg(const PortageSettings *ps, const Package *pkg) const; ATTRIBUTE_PURE static eix::SignedBool compare(const ExtendedVersion& left, const ExtendedVersion& right); diff --git a/src/portage/extendedversion_bin.cc b/src/portage/extendedversion_bin.cc index 91da895a..38eb0409 100644 --- a/src/portage/extendedversion_bin.cc +++ b/src/portage/extendedversion_bin.cc @@ -115,7 +115,7 @@ ExtendedVersion::Properties ExtendedVersion::calcProperties(const string& str) { } bool ExtendedVersion::have_bin_pkg(const PortageSettings *ps, const Package *pkg) const { - return (have_tbz_pkg(ps, pkg) || (num_pak_pkg(ps, pkg) != 0)); + return (have_tbz_pkg(ps, pkg) || (num_gpkg_pkg(ps, pkg) != 0) || (num_pak_pkg(ps, pkg) != 0)); } bool ExtendedVersion::have_bin_pkg(const PortageSettings *ps, const Package *pkg, CountBinPkg minimal) const { @@ -126,7 +126,11 @@ bool ExtendedVersion::have_bin_pkg(const PortageSettings *ps, const Package *pkg if(minimal == 1) { return have_bin_pkg(ps, pkg); } - CountBinPkg have(num_pak_pkg(ps, pkg)); + CountBinPkg have(num_gpkg_pkg(ps, pkg)); + if (have >= minimal) { + return true; + } + have += num_pak_pkg(ps, pkg); return ((have >= minimal) || ((have + 1 == minimal) && have_tbz_pkg(ps, pkg))); } @@ -150,20 +154,39 @@ bool ExtendedVersion::have_tbz_pkg(const PortageSettings *ps, const Package *pkg return true; } +ExtendedVersion::CountBinPkg ExtendedVersion::num_gpkg_pkg(const PortageSettings *ps, const Package *pkg) const { + if(likely((have_bin_pkg_m & HAVEBINPKG_GPKG) != HAVEBINPKG_UNKNOWN)) { + return count_gpkg_m; + } + have_bin_pkg_m |= HAVEBINPKG_GPKG; + count_multiversions(ps, pkg); + const string& s((*ps)["PKGDIR"]); + if((!s.empty()) && is_file((s + "/" + pkg ->category + "/" + pkg->name + "-" + getFull() + ".gpkg.tar").c_str())) { + ++count_gpkg_m; + } + return count_gpkg_m; +} + ExtendedVersion::CountBinPkg ExtendedVersion::num_pak_pkg(const PortageSettings *ps, const Package *pkg) const { - if(likely((have_bin_pkg_m & HAVEBINPKG_PAK) != HAVEBINPKG_UNKNOWN)) { - return count_pak_m; + count_multiversions(ps, pkg); + return count_pak_m; +} + +void ExtendedVersion::count_multiversions(const PortageSettings *ps, const Package *pkg) const { + if(likely((have_bin_pkg_m & HAVEBINPKG_MULTI) != HAVEBINPKG_UNKNOWN)) { + return; } - have_bin_pkg_m |= HAVEBINPKG_PAK; + have_bin_pkg_m |= HAVEBINPKG_MULTI; + count_gpkg_m = 0; count_pak_m = 0; const string& s((*ps)["PKGDIR"]); if(unlikely(s.empty())) { - return 0; + return; } const string pkgs = s + "/" + pkg->category + "/" + pkg->name + "/"; WordVec bin_packages; if(unlikely(!pushback_files(pkgs, &bin_packages, NULLPTR, 1, true, true))) { - return 0; + return; } const string pkg_search = pkgs + pkg->name + "-" + getFull() + "-"; for(WordVec::const_iterator it(bin_packages.begin()); @@ -175,9 +198,11 @@ ExtendedVersion::CountBinPkg ExtendedVersion::num_pak_pkg(const PortageSettings } for(; (i != name.size()) && my_isdigit(name[i]); ++i) { } + if((i + 9 == name.size()) && (strncasecmp(".gpkg.tar", name.c_str() + i, 5) == 0)) { + ++count_gpkg_m; + } if((i + 5 == name.size()) && (strncasecmp(".xpak", name.c_str() + i, 5) == 0)) { ++count_pak_m; } } - return count_pak_m; }