Changeset pkgcore,3263
- Timestamp:
- 06/26/08 13:17:28 (8 weeks ago)
- Location:
- pkgcore
- Files:
-
- 8 modified
-
NEWS (modified) (1 diff)
-
pkgcore/binpkg/repository.py (modified) (1 diff)
-
pkgcore/ebuild/portage_conf.py (modified) (1 diff)
-
pkgcore/fs/contents.py (modified) (1 diff)
-
pkgcore/fs/fs.py (modified) (3 diffs)
-
pkgcore/merge/engine.py (modified) (1 diff)
-
pkgcore/test/fs/test_contents.py (modified) (1 diff)
-
pkgcore/test/fs/test_fs.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
pkgcore/NEWS
r3262 r3263 4 4 See ChangeLog for full commit logs; this is summarized/major changes. 5 5 6 7 * make contentsSet.map_directory_structure go recursive- 8 this fixes ticket #204, invalid removal of files previously just merged. 6 9 7 10 * make --newuse work with atoms/sets -
pkgcore/pkgcore/binpkg/repository.py
r~3253 r~3260 42 42 class force_unpacking(triggers.base): 43 43 44 required_csets = (' install',)44 required_csets = ('new_cset',) 45 45 priority = 5 46 46 _hooks = ('sanity_check',) -
pkgcore/pkgcore/ebuild/portage_conf.py
r~3253 r~3260 460 460 if oe.errno != errno.ENOENT: 461 461 raise 462 if set(features).intersection( 463 ('buildpkg', 'pristine-buildpkg', 'buildsyspkg', 'unmerge-backup')): 464 logger.warn("disabling buildpkg related features since PKGDIR doesn't exist") 462 465 pkgdir = None 466 else: 467 if set(features).intersection( 468 ('buildpkg', 'pristine-buildpkg', 'buildsyspkg', 'unmerge-backup')): 469 logger.warn("disabling buildpkg related features since PKGDIR is unset") 470 471 472 # yes, round two; may be disabled from above and massive else block sucks 473 if pkgdir is not None: 463 474 # If we are not using the native bzip2 then the Tarfile.bz2open 464 475 # the binpkg repository uses will fail. -
pkgcore/pkgcore/fs/contents.py
r~3253 r~3260 318 318 conflicts = sorted(contentsSet(self.iterdirs()).intersection(conflicts_d)) 319 319 obj = self.clone() 320 for conflict in conflicts: 321 # punt the conflict first, since we don't want it getting rewritten 322 obj.remove(conflict) 323 subset = self.child_nodes(conflict.location) 324 obj.difference_update(subset) 325 subset = subset.change_offset(conflict.location, conflict.resolved_target) 326 obj.update(subset) 327 if add_conflicting_sym: 328 obj.add(other[conflicts_d[conflict]]) 320 while conflicts: 321 for conflict in conflicts: 322 # punt the conflict first, since we don't want it getting rewritten 323 obj.remove(conflict) 324 subset = obj.child_nodes(conflict.location) 325 obj.difference_update(subset) 326 subset = subset.change_offset(conflict.location, conflict.resolved_target) 327 obj.update(subset) 328 if add_conflicting_sym: 329 obj.add(other[conflicts_d[conflict]]) 330 331 # rebuild the targets first; sorted due to the fact that we want to 332 # rewrite each node (resolving down the filepath chain) 333 conflicts = sorted(contentsSet(obj.iterdirs()).intersection(conflicts_d)) 329 334 return obj 330 335 -
pkgcore/pkgcore/fs/fs.py
r~3251 r~3260 128 128 return dirname(self.location) 129 129 130 def __cmp__(self, other): 131 return cmp(self.location, other.location) 130 132 131 133 … … 192 194 def __repr__(self): 193 195 return "dir:%s" % self.location 194 195 def __cmp__(self, other):196 return cmp(197 self.location.split(path_seperator),198 other.location.split(path_seperator))199 196 200 197 … … 232 229 return self.target 233 230 return normpath(pjoin(self.location, '../', self.target)) 231 232 def __cmp__(self, other): 233 c = cmp(self.location, other.location) 234 if c: 235 return c 236 if isinstance(other, self.__class__): 237 return cmp(self.target, other.target) 238 return 0 234 239 235 240 def __repr__(self): -
pkgcore/pkgcore/merge/engine.py
r~3253 r~3260 35 35 realpath=True)) 36 36 livefs.recursively_fill_syms(ondisk) 37 ret = initial.map_directory_structure(ondisk, add_conflicting_sym= False)37 ret = initial.map_directory_structure(ondisk, add_conflicting_sym=True) 38 38 return ret 39 39 -
pkgcore/pkgcore/test/fs/test_contents.py
r~3251 r~3260 197 197 198 198 def test_map_directory_structure(self): 199 old = contents.contentsSet([self.mk_ file("/dir/a"),200 self.mk_ dir("/dir"), self.mk_link("/sym", "dir")])199 old = contents.contentsSet([self.mk_dir("/dir"), 200 self.mk_link("/sym", "dir")]) 201 201 new = contents.contentsSet([self.mk_file("/sym/a"), 202 202 self.mk_dir("/sym")]) 203 203 # verify the machinery is working as expected. 204 self.assertNotEqual(list(old.difference(new)), [self.mk_dir("/dir")])205 204 ret = new.map_directory_structure(old) 206 205 self.assertEqual(sorted(ret), sorted([self.mk_dir("/dir"), 207 206 self.mk_file("/dir/a")])) 207 208 # test recursion next. 209 old.add(self.mk_link("/dir/sym", "dir2")) 210 old.add(self.mk_dir("/dir/dir2")) 211 new.add(self.mk_file("/dir/sym/b")) 212 new.add(self.mk_dir("/sym/sym")) 213 214 ret = new.map_directory_structure(old) 215 self.assertEqual(sorted(ret), sorted([self.mk_dir("/dir"), 216 self.mk_file("/dir/a"), self.mk_dir("/dir/dir2"), 217 self.mk_file("/dir/dir2/b")])) 218 208 219 209 220 def test_add_missing_directories(self): -
pkgcore/pkgcore/test/fs/test_fs.py
r~3251 r~3260 157 157 "/dar") 158 158 159 def test_cmp(self): 160 obj1 = self.make_obj( 161 location='/usr/lib64/opengl/nvidia/lib/libnvidia-tls.so.1', 162 target='../tls/libnvidia-tls.so.1') 163 obj2 = self.make_obj( 164 location='/usr/lib32/opengl/nvidia/lib/libGL.s', 165 target='libGL.so.173.14.09') 166 self.assertTrue(obj1 > obj2) 167 self.assertTrue(obj2 < obj1) 168 169 159 170 class Test_fsDev(TestCase, base): 160 171 kls = fs.fsDev
