1 |
On Mon, Sep 10, 2012 at 09:36:25PM +0200, Alan McKinnon wrote: |
2 |
> On Mon, 10 Sep 2012 12:53:41 -0400 |
3 |
> Andrey Moshbear <andrey.vul@×××××.com> wrote: |
4 |
> |
5 |
> > On Mon, Sep 10, 2012 at 12:43 PM, Nikos Chantziaras |
6 |
> > <realnc@×××××.com> wrote: |
7 |
> > > On 10/09/12 19:12, Samuraiii wrote: |
8 |
> > >> |
9 |
> > >> Hello, |
10 |
> > >> because I broke me PC and I need to reinstall it I'm going ask what |
11 |
> > >> should I preserve to make install faster: |
12 |
> > > |
13 |
> > > So what *is* broken? The hardware? If you have a new PC, you |
14 |
> > > simply need to transfer your Gentoo install to a new hard disk |
15 |
> > > using rsync. |
16 |
> > |
17 |
> > He borked his /usr/include due to an improperly-written uninstall rule |
18 |
> > in a Makefile. |
19 |
|
20 |
What about a script that looks for all installed packages, looks at what they |
21 |
installed into /usr/include, and extracts those files from the sources? |
22 |
|
23 |
Just some basic thoughts: |
24 |
|
25 |
Get all file lists for installed packages: |
26 |
find /var/db/pkg/ -type f -name CONTENTS |
27 |
|
28 |
# extract package name and version from path of the file, e.g. |
29 |
/var/db/pkg/kde-base/kdelibs-4.9.1/CONTENT |
30 |
would yield name = kde-base/kdelibs, version = 4.9.1 |
31 |
|
32 |
Find out the source archive file from the ebuild (there's probably a nice |
33 |
python way for this. As a last resort, some one-liner like |
34 |
emerge -pvfO "=$name-$version"|sed -n '1s_.*/\(.*\) .*_\1_gp' |
35 |
which gets the filename of the first URL that emerge spits out. |
36 |
|
37 |
Now extract all those files from the source archive whose path starts with |
38 |
/usr/include in the CONTENTS file. |
39 |
-- |
40 |
Gruß | Greetings | Qapla' |
41 |
Please do not share anything from, with or about me with any Facebook service. |
42 |
|
43 |
The situation is hopeless, but not serious. |