Merge genscripts rev 413
authorfuzzyray <fuzzyray@gentoo.org>
Fri, 26 Mar 2010 14:23:29 +0000 (14:23 -0000)
committerfuzzyray <fuzzyray@gentoo.org>
Fri, 26 Mar 2010 14:23:29 +0000 (14:23 -0000)
svn path=/trunk/gentoolkit/; revision=758

pym/gentoolkit/eclean/search.py
pym/gentoolkit/test/eclean/distsupport.py
pym/gentoolkit/test/eclean/test_search.py

index 53da30cbecc80831aabb7452244dafed785562bb..9cc5923f4f7ad7dacde71e38b44b0b1aa747fdcf 100644 (file)
@@ -73,7 +73,7 @@ class DistfilesSearch(object):
                self.installed_cpvs = None
 
        def findDistfiles(self,
-                       exclude={},
+                       exclude=None,
                        destructive=False,
                        fetch_restricted=False,
                        package_names=False,
@@ -101,6 +101,8 @@ class DistfilesSearch(object):
                @rtype: dict
                @return dict. of package files to clean i.e. {'cat/pkg-ver.tbz2': [filename],}
                """
+               if exclude is None:
+                       exclude = {}
                clean_me = {}
                pkgs = {}
                saved = {}
@@ -415,7 +417,7 @@ class DistfilesSearch(object):
                self.output("   - processing excluded")
                excludes = self._get_excludes(exclude)
                excludes_length = len(excludes)
-               dprint("excludes", "EXCLUDES LENGTH =", excludes_length)
+               dprint("excludes", "EXCLUDES LENGTH =%d" %excludes_length)
                pkgset.update(excludes)
                pkgs_done = set(list(pkgs))
                pkgset.difference_update(pkgs_done)
index 8054ab76b018f4d4b981893a6bc61932ae8e4e38..ab81f7f7ef02baf2ca101bbb410befaf07aa131e 100644 (file)
@@ -27,13 +27,14 @@ CPVS = [
        ]
 
 PROPS = {
-       'sys-apps/devicekit-power-014': {'SRC_URI':
-               'http://hal.freedesktop.org/releases/DeviceKit-power-014.tar.gz',
+       'sys-apps/devicekit-power-014': {
+               'SRC_URI':'http://hal.freedesktop.org/releases/DeviceKit-power-014.tar.gz',
                "RESTRICT": ''},
-       'sys-apps/help2man-1.37.1': {"SRC_URI": 'mirror://gnu/help2man/help2man-1.37.1.tar.gz',
+       'sys-apps/help2man-1.37.1': {
+               "SRC_URI": 'mirror://gnu/help2man/help2man-1.37.1.tar.gz',
                "RESTRICT": ''},
-       'sys-auth/consolekit-0.4.1': { "SRC_URI":
-               'http://www.freedesktop.org/software/ConsoleKit/dist/ConsoleKit-0.4.1.tar.bz2',
+       'sys-auth/consolekit-0.4.1': {
+               "SRC_URI": 'http://www.freedesktop.org/software/ConsoleKit/dist/ConsoleKit-0.4.1.tar.bz2',
                "RESTRICT": ''},
        'app-emulation/emul-linux-x86-baselibs-20100220': {
                "SRC_URI": 'mirror://gentoo/emul-linux-x86-baselibs-20100220.tar.gz',
@@ -129,7 +130,7 @@ PROPS = {
                "SRC_URI": 'mirror://cpan/authors/id/D/DA/DAGOLDEN//Module-Build-0.3601.tar.gz',
                "RESTRICT": ''},
        'x11-base/xorg-server-1.5.3-r6': {
-               "SRC_URI": 'http://xorg.freedesktop.org/releases/individual/xserver/xorg-server-1.5.3.tar.bz2 http://xorg.freedesktop.org/releases/individual/xserver/xorg-server-1.5.3.tar.bz2 mirror://gentoo/xorg-server-1.5.3-gentoo-patches-08.tar.bz2',
+               "SRC_URI": 'http://xorg.freedesktop.org/releases/individual/xserver/xorg-server-1.5.3.tar.bz2 mirror://gentoo/xorg-server-1.5.3-gentoo-patches-08.tar.bz2',
                "RESTRICT": ''},
        'dev-libs/libisofs-0.6.28': {
                "SRC_URI": 'http://files.libburnia-project.org/releases/libisofs-0.6.28.tar.gz',
@@ -217,78 +218,104 @@ PROPS = {
                "RESTRICT": ''},
 }
 
-FILES = [
-       'DeviceKit-power-014.tar.gz',
-       'help2man-1.37.1.tar.gz',
-       'ConsoleKit-0.4.1.tar.bz2',
-       'emul-linux-x86-baselibs-20100220.tar.gz',
-       'SDL_Pango-0.1.2.tar.gz',
-       'SDL_Pango-0.1.2-API-adds.patch'
-]
+PKGS = {
+       'app-portage/layman-1.3.2-r1': 'mirror://sourceforge/layman/layman-1.3.2.tar.gz',
+       'app-portage/eix-0.20.1': 'mirror://sourceforge/eix/eix-0.20.1.tar.xz',
+       'app-portage/eix-0.19.2': 'mirror://sourceforge/eix/eix-0.19.2.tar.xz',
+       'app-portage/gentoolkit-0.3.0_rc9': 'mirror://gentoo/gentoolkit-0.3.0_rc9.tar.gz http://dev.gentoo.org/~fuzzyray/distfiles/gentoolkit-0.3.0_rc9.tar.gz',
+       'app-portage/gentoolkit-0.2.4.6': 'mirror://gentoo/gentoolkit-0.2.4.6.tar.gz http://dev.gentoo.org/~fuzzyray/distfiles/gentoolkit-0.2.4.6.tar.gz',
+       'media-libs/xine-lib-1.1.18': 'mirror://sourceforge/xine/xine-lib-1.1.18.tar.xz mirror://gentoo/xine-lib-1.1.15-textrel-fix.patch mirror://gentoo/xine-lib-1.1.18-compat.c.tbz2',
+       'perl-core/ExtUtils-ParseXS-2.21': 'mirror://cpan/authors/id/D/DA/DAGOLDEN//ExtUtils-ParseXS-2.21.tar.gz',
+       'dev-libs/libisofs-0.6.24': 'http://files.libburnia-project.org/releases/libisofs-0.6.24.tar.gz',
+       }
+
+CLEAN_ME = {
+       'layman-1.3.2.tar.gz': '/path/to/some/where/layman-1.3.2.tar.gz',
+       'layman-1.2.5.tar.gz': '/path/to/some/where/layman-1.2.5.tar.gz',
+       'eix-0.20.1.tar.xz': '/path/to/some/where/eix-0.20.1.tar.xz',
+       'gentoolkit-0.3.0_rc9.tar.gz': '/path/to/some/where/gentoolkit-0.3.0_rc9.tar.gz',
+       'xine-lib-1.1.18.tar.xz': '/path/to/some/where/xine-lib-1.1.18.tar.xz',
+       'xine-lib-1.1.15-textrel-fix.patch': '/path/to/some/where/xine-lib-1.1.15-textrel-fix.patch',
+       'xine-lib-1.1.18-compat.c.tbz2': '/path/to/some/where/xine-lib-1.1.18-compat.c.tbz2',
+       'ExtUtils-ParseXS-2.21.tar.gz': '/path/to/some/where/ExtUtils-ParseXS-2.21.tar.gz',
+       'libisofs-0.6.24.tar.gz': '/path/to/some/where/libisofs-0.6.24.tar.gz'
+       }
 
 CPVS2 = [
+       'app-emulation/emul-linux-x86-baselibs-20100220',
+       'app-portage/eix-0.19.2', 'app-portage/eix-0.20.1',
+       'app-portage/eix-0.20.2',
+       'app-portage/gentoolkit-0.2.4.5',
+       'app-portage/gentoolkit-0.2.4.6',
+       'app-portage/gentoolkit-0.2.4.6-r1',
+       'app-portage/gentoolkit-0.3.0_rc7',
+       'app-portage/gentoolkit-0.3.0_rc8',
+       'app-portage/gentoolkit-0.3.0_rc8-r1',
+       'app-portage/gentoolkit-0.3.0_rc9',
+       'app-portage/layman-1.2.5',
+       'app-portage/layman-1.2.6',
+       'app-portage/layman-1.3.0', 
+       'app-portage/layman-1.3.0-r1',
+       'app-portage/layman-1.3.0_rc1-r3',
+       'app-portage/layman-1.3.1', 
+       'app-portage/layman-1.3.2-r1',
+       'app-portage/layman-9999',
+       'app-portage/portage-utils-0.2.1',
+       'app-portage/portage-utils-0.3.1', 
+       'dev-libs/libburn-0.6.8',
+       'dev-libs/libburn-0.7.0', 
+       'dev-libs/libburn-0.7.4',
+       'dev-libs/libburn-0.7.6-r1',
+       'dev-libs/libisofs-0.6.20-r1',
+       'dev-libs/libisofs-0.6.24',
+       'dev-libs/libisofs-0.6.26', 
+       'dev-libs/libisofs-0.6.28', 
+       'media-libs/sdl-pango-0.1.2',
+       'media-libs/xine-lib-1.1.17',
+       'media-libs/xine-lib-1.1.18',
        'perl-core/Archive-Tar-1.38',
        'perl-core/Archive-Tar-1.54',
        'perl-core/Archive-Tar-1.56',
        'perl-core/Archive-Tar-1.58',
        'perl-core/ExtUtils-ParseXS-2.20.0401',
        'perl-core/ExtUtils-ParseXS-2.21',
-        'perl-core/ExtUtils-ParseXS-2.22',
-        'perl-core/ExtUtils-ParseXS-2.22.01',
-       'perl-core/ExtUtils-ParseXS-2.22.02',
+       'perl-core/ExtUtils-ParseXS-2.22', 
+       'perl-core/ExtUtils-ParseXS-2.22.01', 
+       'perl-core/ExtUtils-ParseXS-2.22.02', 
        'perl-core/ExtUtils-ParseXS-2.22.02-r1',
        'perl-core/ExtUtils-ParseXS-2.22.03',
        'perl-core/Module-Build-0.34.0201',
        'perl-core/Module-Build-0.35',
        'perl-core/Module-Build-0.36.01',
        'perl-core/Module-Build-0.36.03',
-       'dev-libs/libburn-0.6.8',
-       'dev-libs/libburn-0.7.0',
-       'dev-libs/libburn-0.7.4',
-       'dev-libs/libburn-0.7.6-r1',
-       'dev-libs/libisofs-0.6.20-r1',
-       'dev-libs/libisofs-0.6.24',
-       'dev-libs/libisofs-0.6.26',
-       'dev-libs/libisofs-0.6.28',
-       'x11-libs/pixman-0.16.0',
+       'sys-apps/devicekit-power-014',
+       'sys-apps/help2man-1.37.1', 
+       'sys-auth/consolekit-0.4.1',
+       'x11-base/xorg-server-1.5.3-r6',
+       'x11-base/xorg-server-1.6.5-r1',
+       'x11-base/xorg-server-1.7.5', 
+       'x11-base/xorg-server-1.7.5.901',
+       'x11-libs/pixman-0.16.0', 
        'x11-libs/pixman-0.16.4',
        'x11-libs/pixman-0.17.2',
-       'x11-libs/pixman-0.17.4',
-       'app-portage/portage-utils-0.2.1',
-       'app-portage/portage-utils-0.3.1',
+       'x11-libs/pixman-0.17.4', 
        'x11-misc/util-macros-1.3.0',
        'x11-misc/util-macros-1.5.0',
-       'x11-misc/util-macros-1.6.0',
-       'media-libs/xine-lib-1.1.17',
-       'media-libs/xine-lib-1.1.18',
-       'x11-base/xorg-server-1.5.3-r6',
-       'x11-base/xorg-server-1.6.5-r1',
-       'x11-base/xorg-server-1.7.5',
-       'x11-base/xorg-server-1.7.5.901',
-       'app-portage/layman-1.2.5',
-       'app-portage/layman-1.2.6',
-       'app-portage/layman-1.3.0_rc1-r3',
-       'app-portage/layman-1.3.0',
-       'app-portage/layman-1.3.0-r1',
-       'app-portage/layman-1.3.1',
-       'app-portage/layman-1.3.2-r1',
-       'app-portage/layman-9999',
-       'app-portage/eix-0.19.2',
-       'app-portage/eix-0.20.1',
-       'app-portage/eix-0.20.2',
-       'app-portage/gentoolkit-0.2.4.5',
-       'app-portage/gentoolkit-0.2.4.6',
-       'app-portage/gentoolkit-0.2.4.6-r1',
-       'app-portage/gentoolkit-0.3.0_rc7',
-       'app-portage/gentoolkit-0.3.0_rc8',
-       'app-portage/gentoolkit-0.3.0_rc8-r1',
-       'app-portage/gentoolkit-0.3.0_rc9',
-       'app-portage/portage-utils-0.2.1',
-       'app-portage/portage-utils-0.3.1'
+       'x11-misc/util-macros-1.6.0'
        ]
 
+FILES = [
+       'DeviceKit-power-014.tar.gz',
+       'help2man-1.37.1.tar.gz',
+       'ConsoleKit-0.4.1.tar.bz2',
+       'emul-linux-x86-baselibs-20100220.tar.gz',
+       'SDL_Pango-0.1.2.tar.gz',
+       'SDL_Pango-0.1.2-API-adds.patch'
+       ]
+
+
 CPVS3 = [
-       'x11-base/xorg-server-1.6.5-r1',
+       'x11-base/xorg-server-1.7.5',
        'x11-misc/util-macros-1.6.0',
        'x11-libs/pixman-0.16.4',
        #'dev-libs/libisofs-0.6.28',
@@ -347,15 +374,15 @@ class Dbapi(object):
                return self._cp_all[:]
 
        def cp_list(self, package):
-               print(self._cp_list)
+               #print(self._cp_list)
                if self._cp_list is None or self._cp_list==[]:
                        cplist = []
                        for cpv in self._cpv_all:
                                parts = portage.catpkgsplit(cpv)
                                cp='/'.join(parts[:2])
-                               print(package, cp)
                                if cp == package:
                                        cplist.append(cpv)
+                       #print("package = %s, cplist = %s" %(package, cplist))
                        return cplist
                else:
                        return self._cp_list
@@ -377,6 +404,7 @@ class Dbapi(object):
                                props.append(self._props[cpv][prop])
                        else:
                                raise KeyError(self.name)
+               #print(self.name,  "DBAPI", cpv, props)
                return props
 
 
index c8c2e72a42bf8e4df769dad28c3456d2508c5f68..28bd7c6628481a4f81b6871a36a150a22e0ef72e 100644 (file)
@@ -401,30 +401,21 @@ class TestNonDestructive(unittest.TestCase):
                                        'deprecated':{
                                                },
                                        'pkgs': {
-                                               'app-portage/portage-utils-0.3.1': 'mirror://gentoo/portage-utils-0.3.1.tar.bz2',
-                                               'app-portage/gentoolkit-0.2.4.5': 'mirror://gentoo/gentoolkit-0.2.4.5.tar.gz http://dev.gentoo.org/~fuzzyray/distfiles/gentoolkit-0.2.4.5.tar.gz',
                                                'app-portage/gentoolkit-0.3.0_rc8-r1': 'mirror://gentoo/gentoolkit-0.3.0_rc8.tar.gz http://dev.gentoo.org/~fuzzyray/distfiles/gentoolkit-0.3.0_rc8.tar.gz',
+                                               'sys-apps/devicekit-power-014': 'http://hal.freedesktop.org/releases/DeviceKit-power-014.tar.gz',
+                                               'app-portage/gentoolkit-0.3.0_rc8': 'mirror://gentoo/gentoolkit-0.3.0_rc8.tar.gz http://dev.gentoo.org/~fuzzyray/distfiles/gentoolkit-0.3.0_rc8.tar.gz',
                                                'app-portage/gentoolkit-0.2.4.6-r1': 'mirror://gentoo/gentoolkit-0.2.4.6.tar.gz http://dev.gentoo.org/~fuzzyray/distfiles/gentoolkit-0.2.4.6.tar.gz',
-                                               'app-portage/eix-0.20.2': 'mirror://berlios/eix/eix-0.20.2.tar.xz',
-                                               'sys-apps/devicekit-power-014': {'SRC_URI': 'http://hal.freedesktop.org/releases/DeviceKit-power-014.tar.gz'},
-                                               'app-portage/portage-utils-0.2.1': 'mirror://gentoo/portage-utils-0.2.1.tar.bz2',
-                                               'app-portage/eix-0.20.1': 'mirror://sourceforge/eix/eix-0.20.1.tar.xz',
-                                               'app-portage/layman-1.2.5': 'mirror://sourceforge/layman/layman-1.2.5.tar.gz',
-                                               'app-portage/layman-1.3.0-r1': 'mirror://sourceforge/layman/layman-1.3.0.tar.gz',
                                                'app-portage/gentoolkit-0.3.0_rc7': 'mirror://gentoo/gentoolkit-0.3.0_rc7.tar.gz http://dev.gentoo.org/~fuzzyray/distfiles/gentoolkit-0.3.0_rc7.tar.gz',
-                                               'app-portage/layman-1.3.0': 'mirror://sourceforge/layman/layman-1.3.0.tar.gz',
-                                               'app-portage/layman-1.3.1': 'mirror://sourceforge/layman/layman-1.3.1.tar.gz',
-                                               'app-portage/layman-1.2.6': 'mirror://sourceforge/layman/layman-1.2.6.tar.gz',
-                                               'app-portage/layman-9999': '',
                                                'app-portage/gentoolkit-0.2.4.6': 'mirror://gentoo/gentoolkit-0.2.4.6.tar.gz http://dev.gentoo.org/~fuzzyray/distfiles/gentoolkit-0.2.4.6.tar.gz',
-                                               'app-portage/layman-1.3.0_rc1-r3': 'mirror://sourceforge/layman/layman-1.3.0_rc1.tar.gz',
+                                               'app-portage/eix-0.19.2': 'mirror://sourceforge/eix/eix-0.19.2.tar.xz',
+                                               'app-portage/gentoolkit-0.2.4.5': 'mirror://gentoo/gentoolkit-0.2.4.5.tar.gz http://dev.gentoo.org/~fuzzyray/distfiles/gentoolkit-0.2.4.5.tar.gz',
                                                'app-portage/gentoolkit-0.3.0_rc9': 'mirror://gentoo/gentoolkit-0.3.0_rc9.tar.gz http://dev.gentoo.org/~fuzzyray/distfiles/gentoolkit-0.3.0_rc9.tar.gz',
-                                               'app-portage/gentoolkit-0.3.0_rc8': 'mirror://gentoo/gentoolkit-0.3.0_rc8.tar.gz http://dev.gentoo.org/~fuzzyray/distfiles/gentoolkit-0.3.0_rc8.tar.gz',
-                                               'app-portage/eix-0.19.2': 'mirror://sourceforge/eix/eix-0.19.2.tar.xz', 'app-portage/layman-1.3.2-r1': 'mirror://sourceforge/layman/layman-1.3.2.tar.gz'
+                                               'app-portage/eix-0.20.1': 'mirror://sourceforge/eix/eix-0.20.1.tar.xz',
+                                               'app-portage/eix-0.20.2': 'mirror://berlios/eix/eix-0.20.2.tar.xz'
                                                },
                                        'output': [
                                                '   - processing excluded',
-                                               '   - (20 of 20 total) additional excluded packages to get source filenames for'
+                                               '   - (10 of 10 total) additional excluded packages to get source filenames for'
                                                ]
                                        },
                        'destructive4':{
@@ -446,32 +437,29 @@ class TestNonDestructive(unittest.TestCase):
                                        },
                        'destructive5':{
                                        'deprecated':{
-                                               'x11-base/xorg-server-1.6.5-r1': 'http://xorg.freedesktop.org/releases/individual/xserver/xorg-server-1.6.5.tar.bz2 mirror://gentoo/xorg-server-1.6.5-gentoo-patches-01.tar.bz2',
-                                               'x11-misc/util-macros-1.6.0': 'http://xorg.freedesktop.org/releases/individual/util/util-macros-1.6.0.tar.bz2',
-                                               'x11-libs/pixman-0.16.4': 'http://xorg.freedesktop.org/releases/individual/lib/pixman-0.16.4.tar.bz2'
                                                },
                                        'pkgs': {
+                                               'x11-base/xorg-server-1.7.5': 'http://xorg.freedesktop.org/releases/individual/xserver/xorg-server-1.7.5.tar.bz2',
+                                               'app-portage/gentoolkit-0.3.0_rc8-r1': 'mirror://gentoo/gentoolkit-0.3.0_rc8.tar.gz http://dev.gentoo.org/~fuzzyray/distfiles/gentoolkit-0.3.0_rc8.tar.gz',
                                                'sys-apps/devicekit-power-014': 'http://hal.freedesktop.org/releases/DeviceKit-power-014.tar.gz',
-                                               'dev-libs/libisofs-0.6.28': 'http://files.libburnia-project.org/releases/libisofs-0.6.28.tar.gz',
-                                               'perl-core/Module-Build-0.36.03': 'mirror://cpan/authors/id/D/DA/DAGOLDEN//Module-Build-0.3603.tar.gz',
-                                               'x11-base/xorg-server-1.6.5-r1': 'http://xorg.freedesktop.org/releases/individual/xserver/xorg-server-1.6.5.tar.bz2 mirror://gentoo/xorg-server-1.6.5-gentoo-patches-01.tar.bz2',
-                                               'perl-core/Archive-Tar-1.56': 'mirror://cpan/authors/id/B/BI/BINGOS//Archive-Tar-1.56.tar.gz',
-                                               'perl-core/ExtUtils-ParseXS-2.22.02-r1': 'mirror://cpan/authors/id/D/DA/DAGOLDEN//ExtUtils-ParseXS-2.2202.tar.gz',
                                                'x11-misc/util-macros-1.6.0': 'http://xorg.freedesktop.org/releases/individual/util/util-macros-1.6.0.tar.bz2',
+                                               'app-portage/eix-0.19.2': 'mirror://sourceforge/eix/eix-0.19.2.tar.xz',
+                                               'app-portage/gentoolkit-0.3.0_rc8': 'mirror://gentoo/gentoolkit-0.3.0_rc8.tar.gz http://dev.gentoo.org/~fuzzyray/distfiles/gentoolkit-0.3.0_rc8.tar.gz',
+                                               'app-portage/gentoolkit-0.2.4.6-r1': 'mirror://gentoo/gentoolkit-0.2.4.6.tar.gz http://dev.gentoo.org/~fuzzyray/distfiles/gentoolkit-0.2.4.6.tar.gz',
+                                               'app-portage/gentoolkit-0.3.0_rc7': 'mirror://gentoo/gentoolkit-0.3.0_rc7.tar.gz http://dev.gentoo.org/~fuzzyray/distfiles/gentoolkit-0.3.0_rc7.tar.gz',
                                                'sys-auth/consolekit-0.4.1': 'http://www.freedesktop.org/software/ConsoleKit/dist/ConsoleKit-0.4.1.tar.bz2',
+                                               'app-portage/gentoolkit-0.2.4.6': 'mirror://gentoo/gentoolkit-0.2.4.6.tar.gz http://dev.gentoo.org/~fuzzyray/distfiles/gentoolkit-0.2.4.6.tar.gz',
                                                'media-libs/sdl-pango-0.1.2': 'mirror://sourceforge/sdlpango/SDL_Pango-0.1.2.tar.gz http://zarb.org/~gc/t/SDL_Pango-0.1.2-API-adds.patch',
-                                               'x11-libs/pixman-0.16.4': 'http://xorg.freedesktop.org/releases/individual/lib/pixman-0.16.4.tar.bz2'
+                                               'x11-libs/pixman-0.16.4': 'http://xorg.freedesktop.org/releases/individual/lib/pixman-0.16.4.tar.bz2',
+                                               'app-portage/gentoolkit-0.2.4.5': 'mirror://gentoo/gentoolkit-0.2.4.5.tar.gz http://dev.gentoo.org/~fuzzyray/distfiles/gentoolkit-0.2.4.5.tar.gz',
+                                               'app-portage/gentoolkit-0.3.0_rc9': 'mirror://gentoo/gentoolkit-0.3.0_rc9.tar.gz http://dev.gentoo.org/~fuzzyray/distfiles/gentoolkit-0.3.0_rc9.tar.gz',
+                                               'app-portage/eix-0.20.1': 'mirror://sourceforge/eix/eix-0.20.1.tar.xz',
+                                               'app-portage/eix-0.20.2': 'mirror://berlios/eix/eix-0.20.2.tar.xz'
                                                },
-                                       'output': ['   - processing 10 installed ebuilds',
+                                       'output': [
+                                               '   - processing 6 installed ebuilds',
                                                '   - processing excluded',
-                                               '   - (10 of 0 total) additional excluded packages to get source filenames for',
-                                               '!!! "Deprecation Warning: Installed package: perl-core/Archive-Tar-1.56\n\tIs no longer in the tree or an installed overlay\n',
-                                               '!!! "Deprecation Warning: Installed package: perl-core/ExtUtils-ParseXS-2.22.02-r1\n\tIs no longer in the tree or an installed overlay\n',
-                                               '!!! "Deprecation Warning: Installed package: perl-core/Module-Build-0.36.03\n\tIs no longer in the tree or an installed overlay\n',
-                                               '!!! "Deprecation Warning: Installed package: x11-base/xorg-server-1.6.5-r1\n\tIs no longer in the tree or an installed overlay\n',
-                                               '!!! "Deprecation Warning: Installed package: dev-libs/libisofs-0.6.28\n\tIs no longer in the tree or an installed overlay\n',
-                                               '!!! "Deprecation Warning: Installed package: x11-misc/util-macros-1.6.0\n\tIs no longer in the tree or an installed overlay\n',
-                                               '!!! "Deprecation Warning: Installed package: x11-libs/pixman-0.16.4\n\tIs no longer in the tree or an installed overlay\n'
+                                               '   - (16 of 10 total) additional excluded packages to get source filenames for'
                                                ]
                                        }
                        }
@@ -482,12 +470,12 @@ class TestNonDestructive(unittest.TestCase):
 
 
        def exclDictExpand(self, exclude):
-               print("Testing exclDictExpand()")
+               #print("Using Fake Testing exclDictExpand()")
                return [
-                       'app-portage/layman',
+                       #'app-portage/layman',
                        'app-portage/eix',
                        'app-portage/gentoolkit',
-                       'app-portage/portage-utils',
+                       #app-portage/portage-utils',
                        ]
 
 
@@ -513,9 +501,7 @@ class TestNonDestructive(unittest.TestCase):
                self.portdb._props=get_props(CPVS)
                # set a fetch restricted pkg
                self.portdb._props[CPVS[4]]["RESTRICT"] = 'fetch'
-               pkgs = {'sys-apps/devicekit-power-014': {'SRC_URI':
-                       'http://hal.freedesktop.org/releases/DeviceKit-power-014.tar.gz'}
-                       }
+               pkgs = {'sys-apps/devicekit-power-014': 'http://hal.freedesktop.org/releases/DeviceKit-power-014.tar.gz'}
                pkgs, deprecated = self.target_class._non_destructive(destructive=True,
                        fetch_restricted=True, pkgs_=pkgs)
                self.record_results('non_destructive3', pkgs, deprecated)
@@ -564,9 +550,7 @@ class TestNonDestructive(unittest.TestCase):
                self.portdb._props=get_props(CPVS+CPVS2)
                # set a fetch restricted pkg
                self.portdb._props[CPVS[4]]["RESTRICT"] = 'fetch'
-               pkgs = {'sys-apps/devicekit-power-014': {'SRC_URI':
-                       'http://hal.freedesktop.org/releases/DeviceKit-power-014.tar.gz'}
-                       }
+               pkgs = {'sys-apps/devicekit-power-014': 'http://hal.freedesktop.org/releases/DeviceKit-power-014.tar.gz'}
                pkgs, deprecated = self.target_class._destructive(package_names=True,
                        exclude={}, pkgs_=pkgs, installed_included=True )
                self.record_results('destructive3', pkgs, deprecated)
@@ -585,15 +569,29 @@ class TestNonDestructive(unittest.TestCase):
                self.vardb._cpv_all=CPVS[:3]
                self.vardb._cpv_all.extend(CPVS3)
                self.vardb._props=get_props(self.vardb._cpv_all)
-               self.portdb._cpv_all=CPVS[:]
-               self.portdb._cpv_all.extend(CPVS2)
-               self.portdb._props=get_props(CPVS)
+               self.portdb._cpv_all=CPVS2
+               #self.portdb._cpv_all.extend(CPVS2)
+               self.portdb._props=PROPS
                pkgs, deprecated = self.target_class._destructive(package_names=False,
                        exclude=self.exclude, pkgs_=None, installed_included=False )
                self.record_results('destructive5', pkgs, deprecated)
                self.test_results("test_destructive")
 
 
+class TestRemoveProtected(unittest.TestCase):
+       """tests the  eclean.search.DistfilesSearch._remove_protected()
+       """
+
+       def setUp(self):
+               self.target_class = DistfilesSearch(lambda x: None)
+               self.results = {'layman-1.2.5.tar.gz': '/path/to/some/where/layman-1.2.5.tar.gz'}
+
+       def test_remove_protected(self):
+               results = self.target_class._remove_protected(PKGS, CLEAN_ME)
+               self.failUnlessEqual(results, self.results,
+                       "\ntest_remove_protected: data does not match\nresult=" +\
+                       str(results) + "\ntestdata=" + str(self.results))
+
 
 def test_main():
 
@@ -602,7 +600,8 @@ def test_main():
        test_support.run_unittest( TestFetchRestricted('test__fetch_restricted'))
        test_support.run_unittest( TestFetchRestricted('test_unrestricted'))
        test_support.run_unittest( TestNonDestructive('test_non_destructive'))
-       #test_support.run_unittest( TestNonDestructive('test_destructive'))
+       test_support.run_unittest( TestNonDestructive('test_destructive'))
+       test_support.run_unittest( TestRemoveProtected('test_remove_protected'))
 
 
 if __name__ == '__main__':