diff --git a/cobbler/action_import.py b/cobbler/action_import.py
index 54861f0..15c52d6 100644
--- a/cobbler/action_import.py
+++ b/cobbler/action_import.py
@@ -33,15 +33,14 @@ import utils
 import shutil
 from utils import _
 
-WGET_CMD = "wget --mirror --no-parent --no-host-directories --directory-prefix %s/%s %s"
-RSYNC_CMD =  "rsync -a %s '%s' %s/ks_mirror/%s --exclude-from=/etc/cobbler/rsync.exclude --progress"
+RSYNC_CMD =  "rsync --quiet -a %s '%s' %s/ks_mirror/%s --exclude-from=/etc/cobbler/rsync.exclude --progress"
 
-TRY_LIST = [
-   "pool",
-   "Fedora", "Packages", "RedHat", "Client", "Server", "Centos", "CentOS",
+TRY_DICT = {
+   'debian': [ "pool" ],
+   'redhat': [ "Fedora", "Packages", "RedHat", "Client", "Server", "Centos", "CentOS",
    "Fedora/RPMS", "RedHat/RPMS", "Client/RPMS", "Server/RPMS", "Centos/RPMS",
-   "CentOS/RPMS", "RPMS"
-]
+   "CentOS/RPMS", "RPMS" ]
+}
 
 class Importer:
 
@@ -208,12 +207,13 @@ class Importer:
 
            if self.kickstart_file == None:
                kdir = os.path.dirname(distro.kernel)   
-               # FIXME : Some special handling for network_root might be required as in get_proposed_name,
-               base_dir = "/".join(kdir.split("/")[:6])
+               base_dir = self.get_new_tree_root(kdir)
           
-               for try_entry in TRY_LIST:
+               for try_key in TRY_DICT.keys():
+                for try_entry in TRY_DICT[try_key]:
                    try_dir = os.path.join(base_dir, try_entry)
                    if os.path.exists(try_dir):
+                     if try_key == "redhat":
                        rpms = glob.glob(os.path.join(try_dir, "*release-*"))
                        for rpm in rpms:
                            if rpm.find("notes") != -1:
@@ -224,7 +224,7 @@ class Importer:
                            (flavor, major, minor) = results
                            # print _("- finding default kickstart template for %(flavor)s %(major)s") % { "flavor" : flavor, "major" : major }
                            kickstart = self.set_variance(profile, flavor, major, minor, distro)
-                       if not rpms:
+                     elif try_key == "debian":
                            # search for base-files or base-installer ?
                            rpms = glob.glob(os.path.join(try_dir, "main/b/base-files" , "base-files_*"))
                            for rpm in rpms:
@@ -255,6 +255,8 @@ class Importer:
        base = "/".join(tokens)
        dest_link = os.path.join(self.settings.webdir, "links", distro.name)
 
+       meta = distro.ks_meta
+
        # create the links directory only if we are mirroring because with
        # SELinux Apache can't symlink to NFS (without some doing)
 
@@ -265,21 +267,13 @@ class Importer:
                except:
                    # this shouldn't happen but I've seen it ... debug ...
                    print _("- symlink creation failed: %(base)s, %(dest)s") % { "base" : base, "dest" : dest_link }
-
-           # FIXME: looks like "base" isn't used later.  remove?
-           base = base.replace(self.settings.webdir,"")
-       
-       meta = distro.ks_meta
-
-       # how we set the tree depends on whether an explicit network_root was specified
-       if self.network_root is None:
            meta["tree"] = "http://@@http_server@@/cblr/links/%s" % (distro.name)
        else:
            # where we assign the kickstart source is relative to our current directory
            # and the input start directory in the crawl.  We find the path segments
            # between and tack them on the network source path to find the explicit
            # network path to the distro that Anaconda can digest.  
-           tail = self.path_tail(self.mirror, base)
+           tail = self.path_tail(self.path, base)
            meta["tree"] = self.network_root
            if meta["tree"].endswith("/"):
               meta["tree"] = self.network_root[:-1]
@@ -374,6 +368,7 @@ class Importer:
        """
 
        rpm = os.path.basename(rpm)
+       print "- processing rpm : %s" % rpm
 
        # if it looks like a RHEL RPM we'll cheat.
        # it may be slightly wrong, but it will be close enough
@@ -418,6 +413,7 @@ class Importer:
        """
 
        deb = os.path.basename(deb)
+       print "- processing deb : %s" % deb
 
        # now get the flavor:
        flavor = "debian"
@@ -442,41 +438,6 @@ class Importer:
        return (flavor, accum[0], accum[1])
 
    # ----------------------------------------------------------------------
-
-   def distro_adder(self,foo,dirname,fnames):
-       
-       initrd = None
-       kernel = None
-       
-       for x in fnames:
-
-           fullname = os.path.join(dirname,x)
-           if os.path.islink(fullname) and os.path.isdir(fullname):
-              if os.path.realpath(fullname) == os.path.realpath(dirname):
-                if not self.breed:
-                  self.breed = x
-                elif self.breed != x:
-                  print "- WARNING - symlink name (%s) does not fit the breed (%s)" % ( x , self.breed )
-                continue
-              print "- following symlink: %s" % fullname
-              os.path.walk(fullname, self.distro_adder, {})
-
-           if x.startswith("initrd"):
-               initrd = os.path.join(dirname,x)
-           if x.startswith("vmlinuz") or x.startswith("kernel.img"):
-               # This ugly trick is to avoid inclusion of powerpc kernels from debian distros
-               if x.find("initrd") != -1:
-                   continue
-               kernel = os.path.join(dirname,x)
-           if initrd is not None and kernel is not None and dirname.find("isolinux") == -1:
-               self.add_entry(dirname,kernel,initrd)
-               # The values are reset because debian media has extra initrd images
-               initrd = None
-               kernel = None
-
-
-
-   # ----------------------------------------------------------------------
    
    def repo_finder(self):
        
@@ -484,8 +445,7 @@ class Importer:
            print _("- traversing distro %s") % distro.name
            if distro.kernel.find("ks_mirror") != -1:
                basepath = os.path.dirname(distro.kernel)
-               # FIXME : Some special handling for network_root might be required as in get_proposed_name,
-               top = "/".join(basepath.split("/")[:6])
+               top = self.get_new_tree_root(basepath)
                print _("- descent into %s") % top
                os.path.walk(top, self.repo_scanner, distro)
            else:
@@ -496,9 +456,9 @@ class Importer:
    def repo_scanner(self,distro,dirname,fnames):
        
        matches = {} 
-       print "- processing: %s" % dirname
        for x in fnames:
           if x == "base" or x == "repodata":
+               print "- processing repo at : %s" % dirname
                # only run the repo scanner on directories that contain a comps.xml
                gloob1 = glob.glob("%s/%s/*comps*.xml" % (dirname,x))
                if len(gloob1) >= 1:
@@ -598,6 +558,39 @@ class Importer:
            traceback.print_exc()
         
 
+   # ----------------------------------------------------------------------
+
+   def distro_adder(self,foo,dirname,fnames):
+       
+       initrd = None
+       kernel = None
+       
+       for x in fnames:
+
+           fullname = os.path.join(dirname,x)
+           if os.path.islink(fullname) and os.path.isdir(fullname):
+              if os.path.realpath(fullname) == os.path.realpath(dirname):
+                if not self.breed:
+                  self.breed = x
+                elif self.breed != x:
+                  print "- WARNING - symlink name (%s) does not fit the breed (%s)" % ( x , self.breed )
+                continue
+              print "- following symlink: %s" % fullname
+              os.path.walk(fullname, self.distro_adder, {})
+
+           if x.startswith("initrd"):
+               initrd = os.path.join(dirname,x)
+           if x.startswith("vmlinuz") or x.startswith("kernel.img"):
+               # This ugly trick is to avoid inclusion of powerpc kernels from debian distros
+               if x.find("initrd") != -1:
+                   continue
+               kernel = os.path.join(dirname,x)
+           if initrd is not None and kernel is not None and dirname.find("isolinux") == -1:
+               self.add_entry(dirname,kernel,initrd)
+               # The values are reset because debian media has extra initrd images
+               initrd = None
+               kernel = None
+
    def add_entry(self,dirname,kernel,initrd):
        for pxe_arch in self.get_pxe_arch(dirname):
            name = self.get_proposed_name(dirname, pxe_arch)
@@ -697,16 +690,20 @@ class Importer:
 
        return name
 
+   def match_try_list(self,dirname):
+     for try_key in TRY_DICT.keys():
+       for x in TRY_DICT[try_key]:
+           if dirname.find(x) != -1:
+               return x
+     return False
+
    def arch_walker(self,foo,dirname,fnames):
        """
        See docs on learn_arch_from_tree
        """
  
-       # don't care about certain directories
-       for x in TRY_LIST:
-           if dirname.find(x) != -1:
-               break
-       else:
+       x = self.match_try_list(dirname)
+       if not x:
           return
 
        # try to find a kernel header RPM and then look at it's arch.
@@ -714,14 +711,13 @@ class Importer:
            if not x.endswith("rpm") and not x.endswith("deb"):
                continue
            if x.find("kernel-header") != -1 or x.find("linux-headers-") != -1:
-               print _("- kernel header found: %s") % x
+               # print _("- kernel header found: %s") % x
                for arch in [ "i386" , "x86_64" , "ia64" , "s390x" ]:
                    if x.find(arch) != -1:
                        foo[arch] = 1
-               if x.find("amd64") != -1:
-                   foo["x86_64"] = 1
-               if x.find("i686") != -1:
-                   foo["i386"] = 1
+               for arch in [ "i686" , "amd64" ]:
+                   if x.find(arch) != -1:
+                       foo[arch] = 1
 
        if foo.keys():
           return
@@ -733,14 +729,26 @@ class Importer:
           if not x.endswith("rpm") and not x.endswith("deb"):
              continue
           if x.find("kernel-largesmp") != -1 or x.find("kernel-hugemem") != -1 or x.find("linux-headers-") != -1:
-             print _("- kernel header found: %s") % x
+             # print _("- kernel header found: %s") % x
              for arch in [ "i386" , "x86_64" , "ia64" , "s390x" ]:
                  if x.find(arch) != -1:
                     foo[arch] = 1
-             if x.find("amd64") != -1:
-                foo["x86_64"] = 1
-             if x.find("i686") != -1:
-                foo["i386"] = 1
+             for arch in [ "i686" , "amd64" ]:
+                 if x.find(arch) != -1:
+                    foo[arch] = 1
+
+   def get_new_tree_root(self,kerneldir):
+       if self.breed == "redhat":
+           rootdir = "/".join(kerneldir.split("/")[:-2])
+       else:
+           if self.network_root:
+               rootdir = self.path
+           else:
+               # NOTE : We take the six first elements because we know that the repo is at /var/www/cobbler/ks_mirror/distroname
+               rootdir = "/".join(kerneldir.split("/")[:6])
+               # NOTE : So we just return the mirror path !!!
+               rootdir = self.path
+       return rootdir
 
    def learn_arch_from_tree(self,dirname):
        """ 
@@ -749,11 +757,15 @@ class Importer:
        figure out the arch name.  This is important for producing predictable distro names (and profile names)
        from differing import sources
        """
-       # FIXME : Some special handling for network_root might be required as in get_proposed_name,
-       dirname2 = "/".join(dirname.split("/")[:6])
+       dirname2 = self.get_new_tree_root(dirname)
        print _("- scanning %s for architecture info") % dirname2
        result = {}
        os.path.walk(dirname2, self.arch_walker, result)      
+       print _("- architectures found : %s") % ( result.keys() )
+       if result.pop("amd64",False):
+           result["x86_64"] = 1
+       if result.pop("i686",False):
+           result["i386"] = 1
        return result.keys()
 
    def get_pxe_arch(self,dirname):
