Merged from trunk -r13280:13282
authorFabian Groffen <grobian@gentoo.org>
Fri, 3 Apr 2009 10:18:30 +0000 (10:18 -0000)
committerFabian Groffen <grobian@gentoo.org>
Fri, 3 Apr 2009 10:18:30 +0000 (10:18 -0000)
   | 13281   | Inside tar_contents(), don't emulate tar --numeric-id        |
   | zmedico | option. The uid/gid might be different on the system where   |
   |         | the package will be installed, so we need to store the       |
   |         | actual user/group name in the tar file.                      |

   | 13282   | Generate an error if there are no ebuilds found for a        |
   | zmedico | package that's specified on the commandline.                 |

svn path=/main/branches/prefix/; revision=13284

bin/egencache
pym/portage/dbapi/vartree.py

index 66af2a75a265e8ad4a43fa5731d4e7befa93bf4c..923bd16646efec03790012741c3b664528092a40 100755 (executable)
@@ -116,8 +116,10 @@ class GenCache(object):
                if cp_iter is not None:
                        self._cp_set = set(cp_iter)
                        cp_iter = iter(self._cp_set)
+                       self._cp_missing = self._cp_set.copy()
                else:
                        self._cp_set = None
+                       self._cp_missing = set()
                self._regen = _emerge.MetadataRegen(portdb, cp_iter=cp_iter,
                        consumer=self._metadata_callback,
                        max_jobs=max_jobs, max_load=max_load)
@@ -131,6 +133,7 @@ class GenCache(object):
 
        def _metadata_callback(self, cpv, ebuild_path, repo_path, metadata):
                self._existing_nodes.add(cpv)
+               self._cp_missing.discard(portage.cpv_getkey(cpv))
                if metadata is not None:
                        if metadata.get('EAPI') == '0':
                                del metadata['EAPI']
@@ -174,6 +177,13 @@ class GenCache(object):
                self._regen.run()
                self.returncode |= self._regen.returncode
 
+               if self._cp_missing:
+                       self.returncode |= 1
+                       for cp in sorted(self._cp_missing):
+                               writemsg_level(
+                                       "No ebuilds found for '%s'\n"  % (cp,),
+                                       level=logging.ERROR, noiselevel=-1)
+
                trg_cache = self._trg_cache
                dead_nodes = None
                if self._global_cleanse:
index 1ca9140413f820697d5062c834e56076a7d5abf9..28fc92c36624b5e31aa655b411eb84b34b6afa43 100644 (file)
@@ -4600,9 +4600,6 @@ def tar_contents(contents, root, tar, protect=None, onProgress=None):
                        # can properly extract it's children.
                        live_path = os.path.realpath(live_path)
                tarinfo = tar.gettarinfo(live_path, arcname)
-               # store numbers instead of real names like tar's --numeric-owner
-               tarinfo.uname = id_strings.setdefault(tarinfo.uid, str(tarinfo.uid))
-               tarinfo.gname = id_strings.setdefault(tarinfo.gid, str(tarinfo.gid))
 
                if stat.S_ISREG(lst.st_mode):
                        # break hardlinks due to bug #185305