1 |
commit: ec995af8e83d2759bf61ee0f83c0786babd11df4 |
2 |
Author: André Erdmann <dywi <AT> mailerd <DOT> de> |
3 |
AuthorDate: Tue Sep 3 15:44:49 2013 +0000 |
4 |
Commit: André Erdmann <dywi <AT> mailerd <DOT> de> |
5 |
CommitDate: Tue Sep 3 15:46:44 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=ec995af8 |
7 |
|
8 |
packagedir: get distfiles of imported ebuilds |
9 |
|
10 |
link distfiles of imported ebuilds to the distroot/distmap so that |
11 |
the distmap does not need to be regenerated (for that reason) in an additional |
12 |
run. |
13 |
|
14 |
TODO. |
15 |
|
16 |
--- |
17 |
roverlay/overlay/pkgdir/packagedir_base.py | 23 ++++++++++++++++++----- |
18 |
1 file changed, 18 insertions(+), 5 deletions(-) |
19 |
|
20 |
diff --git a/roverlay/overlay/pkgdir/packagedir_base.py b/roverlay/overlay/pkgdir/packagedir_base.py |
21 |
index 22e60e7..3948d4c 100644 |
22 |
--- a/roverlay/overlay/pkgdir/packagedir_base.py |
23 |
+++ b/roverlay/overlay/pkgdir/packagedir_base.py |
24 |
@@ -37,9 +37,6 @@ import roverlay.overlay.base |
25 |
import roverlay.overlay.pkgdir.distroot.static |
26 |
import roverlay.overlay.pkgdir.metadata |
27 |
|
28 |
-# TODO: proper reading of $SRC_URI when importing (or scanning) ebuilds |
29 |
-# This would make manifest creation being more controlled |
30 |
- |
31 |
class PackageDirBase ( roverlay.overlay.base.OverlayObject ): |
32 |
"""The PackageDir base class that implements most functionality except |
33 |
for Manifest file creation.""" |
34 |
@@ -779,7 +776,7 @@ class PackageDirBase ( roverlay.overlay.base.OverlayObject ): |
35 |
|
36 |
# create PackageInfo and register it |
37 |
p = roverlay.packageinfo.PackageInfo ( |
38 |
- imported=True, pvr=pvr, ebuild_file=efile_dest |
39 |
+ imported=True, pvr=pvr, ebuild_file=efile_dest, name=self.name |
40 |
) |
41 |
self._packages [ p ['ebuild_verstr'] ] = p |
42 |
|
43 |
@@ -812,7 +809,23 @@ class PackageDirBase ( roverlay.overlay.base.OverlayObject ): |
44 |
|
45 |
stats_ebuild_imported() |
46 |
efile_imported ( efile_dest ) |
47 |
- return p |
48 |
+ |
49 |
+ |
50 |
+ # link files to distroot/distmap (if possible) |
51 |
+ for distfile in p.parse_ebuild_distfiles ( |
52 |
+ self.get_parent().name, |
53 |
+ ignore_unparseable=True, yield_unparseable=True |
54 |
+ ): |
55 |
+ if distfile is None: |
56 |
+ # need distmap sync |
57 |
+ raise Exception ( |
58 |
+ "TODO/FIXME: want distmap sync after import." |
59 |
+ ) |
60 |
+ else: |
61 |
+ self.DISTROOT.set_distfile_owner ( self.get_ref(), distfile ) |
62 |
+ # -- end for |
63 |
+ |
64 |
+ return p |
65 |
# --- end of import_ebuild_efile (...) --- |
66 |
|
67 |
if not self._packages: |