Diff for /rpm2html/rpmopen.c between versions 1.94 and 1.95

version 1.94, 2000/12/18 11:29:55 version 1.95, 2001/02/04 07:17:33
Line 1310  static rpmDataPtr rpmBaseScan(rpmDirPtr Line 1310  static rpmDataPtr rpmBaseScan(rpmDirPtr
     return(ret);      return(ret);
 }  }
   
   /*
    * Scan one directory only
    */
   
   void rpmDirScanOneDir(const char *directory) {
       rpmDirPtr dir;
       rpmDataPtr cur;
   
       /*
        * first try to find the distrib
        */
       dir = dirList;
       while (dir != NULL) {
           if (!strcasecmp(dir->rpmdir, directory))
               break;
           dir = dir->next;
       }
       if (dir == NULL) {
           fprintf(stderr, "rpmDirScanOneDir(%s): distribution not found\n",
                   directory);
           return;
       }
       if (rpm2htmlVerbose)
           printf("indexing %s\n", dir->name);
   
       /*
        * Allocate a directory tree.
        */
       dirTree = rpmNewSubdir(NULL, "", "", "", NULL, 1);
   
       cur  = NULL;
   
       /*
        * Override default setting.
        */
       if ((dir->maint == NULL) && (rpm2html_maint != NULL))
           dir->maint = xmlStrdup(rpm2html_maint);
       if ((dir->mail == NULL) && (rpm2html_mail != NULL))
           dir->mail = xmlStrdup(rpm2html_mail);
       if ((dir->ftp == NULL) && (rpm2html_ftp != NULL))
           dir->ftp = xmlStrdup(rpm2html_ftp);
       if ((dir->ftpsrc == NULL) && (rpm2html_ftpsrc != NULL))
           dir->ftpsrc = xmlStrdup(rpm2html_ftpsrc);
       if ((dir->dir == NULL) && (rpm2html_dir != NULL))
           dir->dir = xmlStrdup(rpm2html_dir);
       if ((dir->host == NULL) && (rpm2html_host != NULL))
           dir->host = xmlStrdup(rpm2html_host);
       if ((dir->name == NULL) && (rpm2html_name != NULL))
           dir->name = xmlStrdup(rpm2html_name);
       if ((dir->url == NULL) && (rpm2html_url != NULL))
           dir->url = xmlStrdup(rpm2html_url);
   
       if (dir->rpmdir == NULL) {
           fprintf(stderr, "?!? rpmDir without directory ?!? disabled !\n");
       } else if (!strncmp(dir->rpmdir, "localbase", 9)) {
           /* Scan the local RPM database instead of a directory */
           cur = rpmBaseScan(dir);
       } else if (dir->ftp == NULL) {
           fprintf(stderr, "Directory %s disabled : no ftp field\n",
                   dir->rpmdir);
       } else {
   #ifdef WITH_SQL
           dir->no = sql_get_distrib_by_directory(dir->rpmdir);
   #endif
           if (rpm2htmlVerbose)
               printf("Scanning directory %s for RPMs\n",dir->rpmdir);
           cur = rpmDirScan(dir, dirTree);
       }
   
       if (dir->root != NULL) {
           rpmDestroyRealRoot(dir->root);
           dir->root = NULL;
       }
       rpmFreeSubdir(dirTree);
       dirTree = NULL;
   }
   
   
 /*  /*
  * Scan one distribution only   * Scan one distribution only

Removed from v.1.94  
changed lines
  Added in v.1.95


Webmaster