Diff for /rpm2html/rpmopen.c between versions 1.90 and 1.91

version 1.90, 2000/11/26 22:14:43 version 1.91, 2000/11/28 12:18:08
Line 815  rpmDataPtr rpmAnalyze(char *path, char * Line 815  rpmDataPtr rpmAnalyze(char *path, char *
                          dir->vendor, rpm->extra->packager,                           dir->vendor, rpm->extra->packager,
                          rpm->group, rpm->summary, rpm->extra->description,                           rpm->group, rpm->summary, rpm->extra->description,
                          rpm->extra->copyright, rpm->date, rpm->size, rpm->os,                           rpm->extra->copyright, rpm->date, rpm->size, rpm->os,
                          rpm->distribution);                           rpm->distribution, rpm->vendor);
     if (id > 0) {      if (id > 0) {
         for (i = 0;i < rpm->extra->nb_resources;i++)          for (i = 0;i < rpm->extra->nb_resources;i++)
             sql_add_provides(id, rpm->extra->resources[i]->name);              sql_add_provides(id, rpm->extra->resources[i]->name);
Line 1408  void rpmDirScanOneDist(const char *dist) Line 1408  void rpmDirScanOneDist(const char *dist)
 rpmDataPtr rpmDirScanAll(void) {  rpmDataPtr rpmDirScanAll(void) {
     rpmDirPtr dir, next;      rpmDirPtr dir, next;
     rpmDataPtr ret = NULL, cur;      rpmDataPtr ret = NULL, cur;
   #ifndef WITH_SQL
     int maxLists = 50;      int maxLists = 50;
     rpmDataPtr *rpmLists;      rpmDataPtr *rpmLists;
     int nbLists = 0;      int nbLists = 0;
     int i;      int i;
   #endif
   
     /*      /*
      * first reverse the list ....       * first reverse the list ....
Line 1431  rpmDataPtr rpmDirScanAll(void) { Line 1433  rpmDataPtr rpmDirScanAll(void) {
      */       */
     dirTree = rpmNewSubdir(NULL, "", "", "", NULL, 1);      dirTree = rpmNewSubdir(NULL, "", "", "", NULL, 1);
   
   #ifndef WITH_SQL
     rpmLists = (rpmDataPtr *) debugMalloc(maxLists * sizeof(rpmDataPtr));      rpmLists = (rpmDataPtr *) debugMalloc(maxLists * sizeof(rpmDataPtr));
     if (rpmLists == NULL) {      if (rpmLists == NULL) {
         fprintf(stderr, "rpmDirScanAll : running out of memory !\n");          fprintf(stderr, "rpmDirScanAll : running out of memory !\n");
         exit(1);          exit(1);
     }      }
   #endif
   
     while (dir != NULL) {      while (dir != NULL) {
         cur  = NULL;          cur  = NULL;
   
         /*          /*
          * Override default setting.           * Complete with default setting.
          */           */
         if ((dir->maint == NULL) && (rpm2html_maint != NULL))          if ((dir->maint == NULL) && (rpm2html_maint != NULL))
             dir->maint = debugStrdup(rpm2html_maint);              dir->maint = debugStrdup(rpm2html_maint);
Line 1462  rpmDataPtr rpmDirScanAll(void) { Line 1466  rpmDataPtr rpmDirScanAll(void) {
   
         if (dir->rpmdir == NULL) {          if (dir->rpmdir == NULL) {
             fprintf(stderr, "?!? rpmDir without directory ?!? disabled !\n");              fprintf(stderr, "?!? rpmDir without directory ?!? disabled !\n");
         } else if (!strncmp(dir->rpmdir, "localbase", 9)) {   /* Added by A. Gibert */          } else if (!strncmp(dir->rpmdir, "localbase", 9)) {
             /* Scan the local RPM database instead of a directory */              /* Scan the local RPM database instead of a directory */
             cur = rpmBaseScan(dir);              cur = rpmBaseScan(dir);
         } else if (dir->ftp == NULL) {          } else if (dir->ftp == NULL) {
Line 1477  rpmDataPtr rpmDirScanAll(void) { Line 1481  rpmDataPtr rpmDirScanAll(void) {
             cur = rpmDirScan(dir, dirTree);              cur = rpmDirScan(dir, dirTree);
         }          }
   
   #ifdef WITH_SQL
           /*
            * The packages list will be reextratced from the
            * database at the end, minimize memory consumption
            */
           rpmlistCleanup();
   #else
         if (cur != NULL) {          if (cur != NULL) {
             if (nbLists >= maxLists) {              if (nbLists >= maxLists) {
                 maxLists *= 2;                  maxLists *= 2;
Line 1490  rpmDataPtr rpmDirScanAll(void) { Line 1501  rpmDataPtr rpmDirScanAll(void) {
             rpmLists[nbLists] = cur;              rpmLists[nbLists] = cur;
             nbLists++;              nbLists++;
         }          }
   #endif
         if (dir->root != NULL) {          if (dir->root != NULL) {
             /************************************************  
             if (rpm2html_build_tree)  
                 treeRoot = rpmMergeRealRoots(treeRoot, dir->root);  
             else  
              ************************************************/  
             rpmDestroyRealRoot(dir->root);              rpmDestroyRealRoot(dir->root);
             dir->root = NULL;              dir->root = NULL;
         }          }
   
         dir = dir->next;          dir = dir->next;
     }      }
   #ifndef WITH_SQL
     for (i = 0;i < nbLists;i++)      for (i = 0;i < nbLists;i++)
         ret = rpmAddList(ret, rpmLists[i]);          ret = rpmAddList(ret, rpmLists[i]);
     debugFree(rpmLists);      debugFree(rpmLists);
   #endif
     return(ret);      return(ret);
 }  }
   

Removed from v.1.90  
changed lines
  Added in v.1.91


Webmaster