1 |
> The current output of emerge -p is difficult to machine parse because |
2 |
> its difficult to split the package name and package version. However, |
3 |
|
4 |
Really? All you have to do is strip off the stuff between the [ and ] |
5 |
plus the space, strip off anything after the now remaining first space, |
6 |
and then you have something like app-text/ghostscript-7.07.1-r5. Then |
7 |
anything before hyphen-digit is the package name, and anything after the |
8 |
hyphen in hyphen-digit is the package version. So, you just want to (for |
9 |
example) regexp away "-[[:digit:]]*.*" for the package name, and match |
10 |
that and strip the hyphen for the version. Why is this difficult all of |
11 |
a sudden? |