# app-portage/eix ... usage, examples, etc

## khayyam

This thread is intended as a dumping ground for app-portage/eix usage, examples, tips ... as per the request in Help!! Good blog/guide to Gentoo tools? eix, qlist, etc.??

List all installed packages that are ~arch keyworded 

```
# eix --only-names --installed-unstable
```

List all packages installed from the 'foo' overlay

```
# eix --only-names --installed-from-overlay foo
```

List all packages installed with USE="ssl"

```
# eix --only-names --installed-with-use ssl
```

List the currently installed version of 'firefox'

```
# eix --format '<installedversions:NAMEVERSION>' firefox
```

Show a 'compact' listing for the package 'zsh' (-e, 'exact' is used so that the pattern doesn't match other packages, like 'app-shells/zsh-completions', that includes the string 'zsh')

```
# eix -ec zsh
```

Show all installed packages

```
# EIX_LIMIT_COMPACT=0 eix -Ic --only-names
```

Show all installed packages, ordered by, and including, install date

```
# eix-installed-after -de0
```

best ... khay

----------

## khayyam

Have 'eix-sync' also 'sync' the overlays defined in repos-conf/* (so, layman installed overlays, etc) and so all repos are updated. This means you need only call 'eix-sync' rather than 'emerge --sync && layman -s', etc.

```
*
```

You can also have it run 'egencache' and update 'metadata' for these overlays ...

```
@StatusInfo 'Updating metadata for foo overlay'

@egencache --repo=foo-overlay --update --update-use-local-desc
```

Note that 'eix-sync' will run 'eix-update' and 'eix-diff' along with sync'ing the repos ... so the eix database is updated, and a 'diff' is provided of the tree.

best ... khay

----------

## khayyam

Find 'obsolete' (or, rather, redundant) package.{use,{un,}mask,accept_keywords} entries:

```
# eix-test-obsolete
```

best ... khay

----------

## khayyam

Find all 'bin' packages (this was initially posted in Finding binary packages?)

```
# EIX_LIMIT=0 eix */*-bin
```

You could similarly use a wildcard to match other partial strings, ie app-vim/*-syntax, or to list all packages in a category, ie 'www-client/*', or 'app-vim/*'.

best ... khay

----------

## khayyam

Similar to the above 'installed-with-use' example there is also 'installed-without-use'. This can be used to find all packages with a useflag disabled, eg:

```
# eix --only-names --installed-without-use gnutls
```

best ... khay

----------

## khayyam

Query portage variables, like PORTDIR, PORTDIR_OVERLAY, DISTDIR, ACCEPT_KEYWORDS, etc. Somewhat easier to remember than 'portageq get_repo_path $(portageq envvar EROOT) gentoo', or running 'emerge --info' for, say, getting USE.

Show PORTDIR

```
# eix --print PORTDIR
```

Show useflags

```
# eix --print USE
```

List all locations/paths for repo's

```
# for i in PORTDIR{,_OVERLAY} ; do eix --print $i ; done
```

best ... khay

----------

## swimmer

WOW this is very useful indeed!!!

Thanks a lot khayyam  :Smile: 

----------

## khayyam

 *swimmer wrote:*   

> WOW this is very useful indeed!!! Thanks a lot khayyam :)

 

swimmer ... finally, someone commented ;) You're welcome, more to follow.

best ... khay

----------

## Tony0945

 *khayyam wrote:*   

> Have 'eix-sync' also 'sync' the overlays defined in repos-conf/* (so, layman installed overlays, etc) and so all repos are updated. This means you need only call 'eix-sync' rather than 'emerge --sync && layman -s', etc.
> 
> ```
> *
> ```
> ...

 

I was going to post a question about how to do this!  Many thanks, khay! And many thanks for your tireless work here.

----------

## Yamakuzure

Good list!

The eix-installed-after script might be helpful, too, like doing

```
eix-installed-after -b sys-devel/gcc-5.3.0
```

which actually shows everything that was installed *before* gcc-5.3.0.

----------

## mv

 *Yamakuzure wrote:*   

> The eix-installed-after script might be helpful, too

 

I already posted this on another place, but the main purpose of the eix-installed-after script is to serve as an example: It is relatively exhaustively commented so that hopefully it is useful for many who want to use eix for a non-trivial task.

----------

## khayyam

 *Yamakuzure wrote:*   

> The eix-installed-after script might be helpful, too, like doing
> 
> ```
> eix-installed-after -b sys-devel/gcc-5.3.0
> ```
> ...

 

Yamakuzure ... hmmm, I must be living in some alternate time dimension ;)

```
# eix-installed-after -b sys-devel/gcc-4.9.0 | tail -n 1

media-libs/harfbuzz

# qlop -lC | tail -n 1

Mon Mar  7 14:05:30 2016 >>> media-libs/harfbuzz-1.1.3
```

... so, that is not "before", however, stranger still, if I provide category/package (sans 'version') then, I get something altogether different ... but still not "before".

```
# eix-installed-after -b sys-devel/gcc | tail -n 1

x11-wm/i3

# eix-installed-after -b sys-devel/gcc | head -n 1

sys-apps/findutils

# qlop -lC | grep -B1 sys-devel/gcc

Tue Feb 19 11:15:49 2013 >>> dev-libs/mpc-1.0.1

Tue Feb 19 12:25:28 2013 >>> sys-devel/gcc-4.6.3

--

Sat Sep 14 14:43:10 2013 >>> net-libs/libssh-0.5.5

Sat Sep 14 21:31:28 2013 >>> sys-devel/gcc-4.6.3

--

Sun Oct  6 14:54:25 2013 >>> sys-apps/groff-1.22.2

Mon Oct  7 22:44:29 2013 >>> sys-devel/gcc-4.7.3-r1

--

Sun Jan 26 14:38:32 2014 >>> media-video/mpv-9999

Tue Jan 28 04:09:27 2014 >>> sys-devel/gcc-4.7.3-r1

--

Fri Oct 31 12:48:27 2014 >>> sys-devel/crossdev-20140917

Mon Nov  3 16:27:10 2014 >>> sys-devel/gcc-4.8.3

--

Sat Apr 18 12:05:19 2015 >>> sys-apps/pv-1.6.0

Sat Apr 18 14:11:05 2015 >>> sys-devel/gcc-4.8.4

--

Sun Sep 20 16:35:01 2015 >>> sys-devel/binutils-2.25.1-r1

Sun Sep 20 21:25:20 2015 >>> sys-devel/gcc-4.8.5

--

Tue Oct  6 10:56:40 2015 >>> net-wireless/wpa_supplicant-2.5

Tue Oct  6 20:47:43 2015 >>> sys-devel/gcc-4.9.3
```

Unless I misunderstand the terms 'before', and 'after', then I'm not sure what 'eix-installed-after' is doing. Also, if the script can output both 'before' and 'after' it should be called 'eix-installed-order', or in my case 'eix-installed-timewarp' ;) That is one of the frustrating things about eix, its a really useful tool but the way it works, or is expected to work, often leaves me with more questions than answers.

best ... khay

----------

## mv

 *khayyam wrote:*   

>  *Yamakuzure wrote:*   The eix-installed-after script might be helpful, too, like doing
> 
> ```
> eix-installed-after -b sys-devel/gcc-5.3.0
> ```
> ...

 

Yes, I didn't realize: Either you must specify option -v in addition or use the syntax

```
eix-installed-after -b sys-devel/gcc:5.3
```

 *Quote:*   

> Also, if the script can output both 'before' and 'after' it should be called 'eix-installed-order

 

Maybe, but this would hide the "default" mode of output (which I considered the most useful one, because it sometimes happens that you installed a "bad" package causing possible breakage for subsequently installed packages - so you can easily list them).

You get your "eix-installed-ordered" behaviour with option -f.

What the script actually does is simply to output all packages ordered according to install date, but to start (or with option -b: stop) this list only when the output matches the argument.

With other options (like -l -e or -F) you can check for the timestamp instead of the output text (hence avoiding the "problem" that the argument must match the output format).

 *Quote:*   

> That is one of the frustrating things about eix

 

You are welcome to submit patches (or if you cannot do it suggestions for improvement).

 (And in contrast to some systemd developers, I really mean this - there is really not much feedback to eix.)

----------

## khayyam

 *mv wrote:*   

> [...] Either you must specify option -v in addition or use the syntax
> 
> ```
> eix-installed-after -b sys-devel/gcc:5.3
> ```
> ...

 

mv ... what I didn't say above is that I'd tried various designators, including the slot, and these also don't provide 'before':

```
# eix-installed-after -b sys-devel/gcc:4.9 | awk 'NR==1; END{print}'

sys-apps/findutils

x11-wm/i3

# qlop -Cl | grep -B1 sys-devel/gcc-4.9

Tue Oct  6 10:56:40 2015 >>> net-wireless/wpa_supplicant-2.5

Tue Oct  6 20:47:43 2015 >>> sys-devel/gcc-4.9.3
```

... and as you can see in the above 'qlop -Cl' output wpa_supplicant was installed 'before' gcc:4.9.

 *mv wrote:*   

>  *khayyam wrote:*   Also, if the script can output both 'before' and 'after' it should be called 'eix-installed-order 
> 
> Maybe, but this would hide the "default" mode of output [...]

 

I don't see why 'installed-order' hides anything, in fact, its more explanatory. Also, you could still default to 'after'.

 *mv wrote:*   

>  *khayyam wrote:*   That is one of the frustrating things about eix 
> 
> You are welcome to submit patches (or if you cannot do it suggestions for improvement). (And in contrast to some systemd developers, I really mean this - there is really not much feedback to eix.)

 

I don't doubt your sincerity ITR, the problem is I wouldn't know where to start, I find a lot of the man page completely opaque, and difficult to get to grips with, and I'm generally fairly good with such things. So, I've never really got a sufficient grasp so as to be in the position of looking and specific things which might be improved ... a veritable chicken & egg problem. That is in no way a discredit to the work you put in, its just as I see it, eix just seems over-engineered, and over-burdened in terms of syntax. That's partly the result of the complexity, or over-complexity, of portage, but it does make it less of a go-to tool. I'd imagine the great majority of people who use it are simply using as a replacement for 'emerge --search'. Anyhow, here is probably not the best place for such a discussion, this is a tips and examples thread, so probably enough said.

best ... khay

----------

## mv

 *khayyam wrote:*   

>  *mv wrote:*   [...] Either you must specify option -v in addition or use the syntax
> 
> ```
> eix-installed-after -b sys-devel/gcc:5.3
> ```
> ...

 

I had previously posted only from my memory - I had no gentoo machine accessible. Now I checked, and it seems what I posted was correct with 2 inaccuracies:

1. The slot sys-devel/gcc:5.3 does not exist. It should be e.g. sys-devel/gcc:5

2. The output format plays no role (the script is more clever than I remembered); when you want to specify the format sys-devel/gcc-5.3.0 you can use the option -V

 *Quote:*   

> # qlop -Cl | grep -B1 sys-devel/gcc-4.9
> 
> Tue Oct  6 10:56:40 2015 >>> net-wireless/wpa_supplicant-2.5
> 
> Tue Oct  6 20:47:43 2015 >>> sys-devel/gcc-4.9.3

 

Maybe there is a misunderstanding what is meant by the "emerge time" of a package: It means the (latest) build time of the installed package (stored in BUILD_TIME in /var/db/pkg).

(If you should have set the eix variables USE_BUILD_TIME to false, it is the mtime-timestamp of the corresponding /var/db/pkg directory - which is usually roughly the same).

In your case, you have perhaps emerged wpa_supplicant later on again, so that the above time stored in emerge.log has become irrelevant.

(There might also be other reasons, e.g. if you installed from a prebuilt binary package.)

 *Quote:*   

> I'd imagine the great majority of people who use it are simply using as a replacement for 'emerge --search'.

 

Or to check which versions are available/masked/installed. I also use it for this mainly. Only in very rare cases, some script can really profit from the other features. But these cases happen occasionally.

About renaming eix-installed-after: Maybe you are right that the name was chosen unfortunate. However, I am hesitating to rename it now when perhaps some users have scripts referring to that name. And using symlinks (two names) would only increase confusion.

----------

## ShadowCat8

Greetings khayyam,

And, thanks again for this thread...  VERY helpful!  

But, now I have a question regarding eix and slotted installs (e.g. python):

When I run the following command:

```
NAMEVERSION="<category>/<name>,<version>" eix '-I*' --format '<installedversions:NAMEVERSION>,<licenses>\n'
```

it looks good until I get to the following:

```
...

dev-lang/perl,5.24.1-r2,|| ( Artistic GPL-1+ )

dev-lang/python,2.7.12dev-lang/python,3.4.5dev-lang/python,3.5.3,PSF-2

dev-lang/python-exec,2.4.4,BSD-2

dev-libs/boost,1.62.0-r1,Boost-1.0

...
```

Is there any way to break out the slotteds each to their own line?

TIA for your assistance.

----------

## mv

 *ShadowCat8 wrote:*   

> Is there any way to break out the slotteds each to their own line?

 

Not sure what you mean. Perhaps

```
NAMEVERSION='<category>/<name>,<version>,<licenses>\n' eix '-I*' --format '<installedversions:NAMEVERSION>'
```

Be aware, however, that eix stores only one license per package (that of the latest available version), so the information will not be correct if different slots have different licenses.

Simliar problem happens with other metadata too, e.g. descriptions.

----------

## ShadowCat8

@mv: Thanks for the reply.

What I mean is the one line above with dev-lang/python writing all 3 slotted versions to one line...  e.g.:

```
dev-lang/python,2.7.12dev-lang/python,3.4.5dev-lang/python,3.5.3,PSF-2
```

And, I already tried your suggestion and it comes out like this:

```
dev-lang/python,2.7.12,PSF-2dev-lang/python,3.4.5,PSF-2dev-lang/python,3.5.3,PSF-2
```

which is better, but it still puts all slotted versions on one line.

So, is there a way to put the slotted installs each on their own line?

TIA.

----------

## pjp

 :Question: 

```
NAMEVERSION="<category>/<name>,<version>\n"
```

----------

## steveL

 *pjp wrote:*   

> :?: 
> 
> ```
> NAMEVERSION="<category>/<name>,<version>\n"
> ```
> ...

 Use single-quotes, or the shell will interpret backslashes (eg to avoid \$expansion), resulting in a plain 'n'.

Bash allows eg: $'\t' or $'\n' escapes as well (should the underlying tool not interpret standard C escape sequences.)

----------

## mv

 *ShadowCat8 wrote:*   

> And, I already tried your suggestion and it comes out like this:
> 
> ```
> dev-lang/python,2.7.12,PSF-2dev-lang/python,3.4.5,PSF-2dev-lang/python,3.5.3,PSF-2
> ```
> ...

 

It shouldn't. As SteveL already pointed out, perhaps you have used the wrong quotation marks when copying my suggestion.

----------

## proteusx

With 0.33.0 I get this:

```
# eix-installed-after -de0

/usr/bin/eix-installed-after: line 19: ReadFunctions: command not found

/usr/bin/eix-installed-after: line 23: ReadVar: command not found

/usr/bin/eix-installed-after: line 24: EIX_INSTALLED_AFTER: unbound variable
```

----------

## pjp

 *steveL wrote:*   

>  *pjp wrote:*   :?: 
> 
> ```
> NAMEVERSION="<category>/<name>,<version>\n"
> ```
> ...

  Thanks, I just referenced the earlier example.

There must be some handling for that issue as it seems to work with either " or ': 

```
$ NAMEVERSION="<category>/<name>,<version>\n" eix -s python '-I*' --format '<installedversions:NAMEVERSION>,<licenses>\n'

app-eselect/eselect-python,20160516

,GPL-2

dev-lang/python,2.7.12

dev-lang/python,3.4.5

,PSF-2

dev-lang/python-exec,2.4.4

,BSD-2

virtual/python-ipaddress,1.0-r1

,
```

 

```
$ NAMEVERSION='<category>/<name>,<version>\n' eix -s python '-I*' --format '<installedversions:NAMEVERSION>,<licenses>\n'

app-eselect/eselect-python,20160516

,GPL-2

dev-lang/python,2.7.12

dev-lang/python,3.4.5

,PSF-2

dev-lang/python-exec,2.4.4

,BSD-2

virtual/python-ipaddress,1.0-r1

,
```

----------

## Ant P.

 *proteusx wrote:*   

> With 0.33.0 I get this:
> 
> ```
> # eix-installed-after -de0
> 
> ...

 

Some Gentoo developers keep breaking the eix package because they have a grudge against its author. Of course, it's us users getting the shaft every time they pull an infantile stunt like this. The solution is to use the un-"enhanced" eix ebuild from the mv overlay.

----------

## steveL

 *Ant P. wrote:*   

> Some Gentoo developers keep breaking the eix package because they have a grudge against its author. Of course, it's us users getting the shaft every time they pull an infantile stunt like this. The solution is to use the un-"enhanced" eix ebuild from the mv overlay.

 Ouch; that bug and the meson one are just embarrassing.

As for mgorny pulling a QA power-play.. his scripting has always been utterly shite (in my professional opinion.)

----------

## ShadowCat8

@pjp: Thanks...  Your post clued me in to what I needed.

```
linux # NAMEVERSION='<category>/<name>,<version>,<licenses>\n' eix -s python '-I*' --format '<installedversions:NAMEVERSION>'

app-admin/python-updater,0.14,GPL-2

app-eselect/eselect-python,20160516,GPL-2

dev-lang/python,2.7.12,PSF-2

dev-lang/python,3.4.5,PSF-2

dev-lang/python,3.5.3,PSF-2

dev-lang/python-exec,2.4.4,BSD-2

dev-python/pythonmagick,0.9.17,GPL-3

virtual/python-greenlet,1.0,

linux #
```

Now, the full list is ready to be put into a spreadsheet (as a CSV) and sent off for the audit.    :Razz: 

Thanks again.

----------

## MMMMM

Hi,

I recently found this tool and it helped me to clean up my config. Really good!

Now, for some reason I have this in my package.use as 1st line:

 *Quote:*   

> */* abi_x86_32

 

(I remember that I was forced to do so.)

When I check now with:

 *Quote:*   

> REDUNDANT_IF_IN_USE="-some" REDUNDANT_IF_DOUBLE_USE=some="some" eix-test-obsolete

 

It catches a lot because this is valid for all packages in tree, not only the installed ones.

How can I fix this? Can eix-test-obsolete ignore this line somehow?

I can modify for checking manually and back after checking, but this is not the way I'd like to have it.

Best Regards, Micha.

----------

## Tony0945

 *MMMMM wrote:*   

> Now, for some reason I have this in my package.use as 1st line:
> 
>  *Quote:*   */* abi_x86_32 
> 
> (I remember that I was forced to do so.)
> ...

 

Try adding ABI_X86="64 32" to /etc/portage/make.conf and commenting out the "*/* abi_x86_32" line in package.use

I'm assuming you are supporting both 64 and 32 bit. If it's a pure 32 bit machine neither should be needed if you have selected an x86 profile. Or more accurately, the x86 profile does it for you.

----------

## MMMMM

Tony0945,

no it is a 64 bit machine. Maybe it has something to with 2015-01-28-cpu_flags_x86-introduction which is removed now.

Can't remember. Sometimes I am forced to change something in my config by gentoo.

Edit: Maybe multilib was the reason.

----------

## Tony0945

IIRC, there was a lot of confusion when those flags were first created.

What I suggested is what I have on my multilib boxes. The pure 32 has nothing but the x32 profile setting.

Could you post the results of "eselect profile list"?

Or just try my suggestion, using # to comment so you can easily undo it.

----------

## MMMMM

I have  [19] default/linux/amd64/17.0/desktop/plasma (stable).

I'd like to have my system a bit cleaner and less workarounds.

What do you suggest?

```
eselect profile list

Available profile symlink targets:

  [1]   default/linux/amd64/13.0 (stable)

  [2]   default/linux/amd64/13.0/selinux (dev)

  [3]   default/linux/amd64/13.0/desktop (stable)

  [4]   default/linux/amd64/13.0/desktop/gnome (stable)

  [5]   default/linux/amd64/13.0/desktop/gnome/systemd (stable)

  [6]   default/linux/amd64/13.0/desktop/plasma (stable)

  [7]   default/linux/amd64/13.0/desktop/plasma/systemd (stable)

  [8]   default/linux/amd64/13.0/developer (stable)

  [9]   default/linux/amd64/13.0/no-multilib (stable)

  [10]  default/linux/amd64/13.0/systemd (stable)

  [11]  default/linux/amd64/13.0/x32 (dev)

  [12]  default/linux/amd64/17.0 (stable)

  [13]  default/linux/amd64/17.0/selinux (stable)

  [14]  default/linux/amd64/17.0/hardened (stable)

  [15]  default/linux/amd64/17.0/hardened/selinux (stable)

  [16]  default/linux/amd64/17.0/desktop (stable)

  [17]  default/linux/amd64/17.0/desktop/gnome (stable)

  [18]  default/linux/amd64/17.0/desktop/gnome/systemd (stable)

  [19]  default/linux/amd64/17.0/desktop/plasma (stable) *

  [20]  default/linux/amd64/17.0/desktop/plasma/systemd (stable)

  [21]  default/linux/amd64/17.0/developer (stable)

  [22]  default/linux/amd64/17.0/no-multilib (stable)

  [23]  default/linux/amd64/17.0/no-multilib/hardened (stable)

  [24]  default/linux/amd64/17.0/no-multilib/hardened/selinux (stable)

  [25]  default/linux/amd64/17.0/systemd (stable)

  [26]  default/linux/amd64/17.0/x32 (dev)

  [27]  default/linux/amd64/17.1 (exp)

  [28]  default/linux/amd64/17.1/selinux (exp)

  [29]  default/linux/amd64/17.1/hardened (exp)

  [30]  default/linux/amd64/17.1/hardened/selinux (exp)

  [31]  default/linux/amd64/17.1/desktop (exp)

  [32]  default/linux/amd64/17.1/desktop/gnome (exp)

  [33]  default/linux/amd64/17.1/desktop/gnome/systemd (exp)

  [34]  default/linux/amd64/17.1/desktop/plasma (exp)

  [35]  default/linux/amd64/17.1/desktop/plasma/systemd (exp)

  [36]  default/linux/amd64/17.1/developer (exp)

  [37]  default/linux/amd64/17.1/no-multilib (exp)

  [38]  default/linux/amd64/17.1/no-multilib/hardened (exp)

  [39]  default/linux/amd64/17.1/no-multilib/hardened/selinux (exp)

  [40]  default/linux/amd64/17.1/systemd (exp)

  [41]  hardened/linux/amd64 (stable)

  [42]  hardened/linux/amd64/selinux (stable)

  [43]  hardened/linux/amd64/no-multilib (stable)

  [44]  hardened/linux/amd64/no-multilib/selinux (stable)

  [45]  hardened/linux/amd64/x32 (dev)

  [46]  default/linux/musl/amd64 (exp)

  [47]  hardened/linux/musl/amd64 (exp)

  [48]  default/linux/musl/amd64/x32 (exp)

  [49]  hardened/linux/musl/amd64/x32 (exp)

  [50]  default/linux/amd64/17.0/musl (exp)

  [51]  default/linux/amd64/17.0/musl/hardened (exp)

  [52]  default/linux/amd64/17.0/musl/hardened/selinux (exp)

  [53]  default/linux/uclibc/amd64 (exp)

  [54]  hardened/linux/uclibc/amd64 (exp)

```

----------

## krinn

You have just set in package.use for any packages, enable abi_x86_32 ; that's just what your */* abi_x86_32 do.

Like Tony0945 told you, it could be made with ABI="64 32"

So the package.use for abi_x86_32 is redundant ; that's just exactly what you have been told by the program  :Smile: 

----------

## Tony0945

It looks like the plasma profile doesn't set ABI.

Just put it in the make.conf

----------

## MMMMM

Hi,

ABI="64 32" is wrong.

ABI_X86="64 32" is correct.

Thank you very much!

----------

## sdauth

Hello,

I need help to print SRC_URI for packages in my localrepo.

This is the command I tried, but it doesn't return SRC_URI, only category/name-version (eg. games-emulation/pcsx2-1.7.0_p20211017: )

```
NAMEVERSION="<category>/<name>-<version>: <srcuri>" eix -cn '-I*' --format '<installedversions:NAMEVERSION>\n' --installed-from-overlay localrepo
```

Thanks

----------

## pjp

My first thought is to see if the information is in the database, although I don't know sqlite well enough to quickly check directly.

Using standard query commands, I would expect those to correctly include that information if it was available. I'm not seeing any packages with SRC_URI populated. The man page does offer a compile time option "--without-src-uri-default", but I don't see that in the ebuild, which seems to imply that it should be "with" src-uri.

```
$ eix -v --installed-from-overlay gentoo net-misc/openssh |grep -E 'SRC_URI|Homepage'

                          SRC_URI:   

     Homepage:            https://www.openssh.com/
```

----------

## Anon-E-moose

grep -r SRC_URI /usr/local/portage --include="*.ebuild" 

modify data from there.

Edit to add: if one wanted installed pkgs, then I'd go against /var/db/pkg/* data

using repository to check for which repo and pull SRC-URI from the copy of the ebuild.

----------

## sdauth

@pjp : I tried the same command but SRC_URI is empty as well.

When I run : eix --dump | grep 'SRC_URI'

```
# Usage of SRC_URI roughly doubles disk resp. memory requirements.

SRC_URI="true"

# If false, SRC_URI is never output.

PRINT_SRC_URI="true"

[...]
```

So it should be working (I don't have sqlite enabled for eix), I guess I have the eix command line wrong somehow. It works with <eapi> instead of <srcuri> and the eix man has similar explanation on how to use it so I don't know what's wrong.

@Anon-E-moose: This works but I wanted to see if I can have that information with eix directly.  To see if it is able to replace ${P} "${PN} etc.. values directly.

----------

## Anon-E-moose

eix data seems inconsistent, at least for things like src-uri, which it claims to be able to track, it seems to be confused between src-uri and homepage

Edit to add: odd behavior

```
eix --only-in-overlay local -I -lv
```

gives you the src-uri (twice) 

```
* x11-misc/gsimplecal [1]

     Available versions:  

            2.1

            KEYWORDS:     amd64 ~x86

            DEPEND:       ${RDEPEND} >=sys-devel/autoconf-2.65

            RDEPEND:      x11-libs/gtk+:3

            BDEPEND:      >=app-portage/elt-patches-20170815 || ( >=sys-devel/automake-1.16.2-r1:1.16 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4

            SRC_URI:      https://github.com/dmedvinsky/gsimplecal/archive/v2.1.tar.gz

            EAPI:         7

     Installed versions:  Version:   2.1

                          Date:      05:40:08 AM 08/05/2021

                          DEPEND:    ${RDEPEND} >=sys-devel/autoconf-2.65

                          RDEPEND:   x11-libs/gtk+:3

                          BDEPEND:   >=app-portage/elt-patches-20170815 >=sys-devel/automake-1.16.2-r1:1.16 >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4

                          SRC_URI:   

                          EAPI:      7

     Best versions/slot:  2.1

     Homepage:            https://github.com/dmedvinsky/gsimplecal

     Description:         A lightweight calendar designed for tint2

     License:             BSD
```

One real, and one empty.

----------

## sdauth

@Anon-E-moose:

Nice find ! I adjusted my command after some trial and it works now :

```
NAMEVERSION="<category>/<name>-<version>: <srcuri>" eix -cnlv '-I*' --format '<availableversions:NAMEVERSION>\n' --only-in-overlay localrepo
```

EDIT :

or :

```
NAMEVERSION="<category>/<name>-<version>: <srcuri>" eix -cn '-I*' --format '<availableversions:NAMEVERSION>\n' --installed-from-overlay localrepo
```

with the only thing changed from original command in earlier post : installedversions: -> availableversions

returns (example) :

```
app-misc/fsearch-0.1: https://github.com/cboxdoerfer/fsearch/archive/0.1.tar.gz -> fsearch-0.1.tar.gz

app-misc/mat2-0.12.2: https://0xacab.org/jvoisin/mat2/-/archive/0.12.2/d4479d9baa8e5383d16c19c34ef534a2c396cc12.tar.gz -> mat2-0.12.2.tar.gz

[...]

```

----------

## mv

 *Anon-E-moose wrote:*   

> eix data seems inconsistent, at least for things like src-uri, which it claims to be able to track, it seems to be confused between src-uri and homepage.

 

Thanks for the remark. I do not understand what you mean by confusion with homepage.

What actually is true is that {srcuri} works only in connection with availableversions. For installedversions, it always returns the empty string, as that data is not stored in /var/db/pkg. In fact, I do not remember why I added SRC_URI to the default output for installed versions: Perhaps it was announced that it should be there eventually, or I meant to output some other data instead. Or it was simply some overlook. In eix-0.36.5 the default format strings will not contain SRC_URI anymore, but I might not hurry with the release.

----------

## mv

 *mv wrote:*   

> but I might not hurry with the release.

 

eix-0.36.5 is now released with only this rather trivial fix.

----------

