瀏覽代碼

adjust index filenames and path locations; add more dependencies

Ralf S. Engelschall 22 年之前
父節點
當前提交
a441a709dc
共有 2 個文件被更改,包括 122 次插入3 次删除
  1. 119 0
      apt/apt.patch
  2. 3 3
      apt/apt.spec

+ 119 - 0
apt/apt.patch

@@ -385,3 +385,122 @@
  #include <ctype.h>
  #include <dirent.h>
  #include <errno.h>
+--- apt-pkg/rpm/rpmindexfile.h.orig	2003-06-10 16:12:48.000000000 +0200
++++ apt-pkg/rpm/rpmindexfile.h	2003-09-16 11:06:24.000000000 +0200
+@@ -140,7 +140,7 @@
+ {
+    protected:
+ 
+-   virtual string MainType() const {return "srclist";}
++   virtual string MainType() const {return "00APT.srclist";}
+ 
+    public:
+ 
+--- apt-pkg/rpm/rpmindexfile.cc.orig	2003-06-10 16:12:52.000000000 +0200
++++ apt-pkg/rpm/rpmindexfile.cc	2003-09-16 11:08:04.000000000 +0200
+@@ -58,7 +58,7 @@
+ 	 Res = URI;
+    }
+    else
+-      Res = URI + Dist + "/base/";
++      Res = URI + Dist + "/";
+ 
+    Res += Type;
+    
+@@ -145,7 +145,7 @@
+ 	 Res = URI;
+    }
+    else
+-      Res = URI + Dist + "/base/";
++      Res = URI + Dist + "/";
+    
+    Res += Type + '.' + Section;
+ 
+@@ -274,8 +274,8 @@
+    if (Repository->IsAuthenticated() == true && 
+        Repository->HasRelease() == false)
+       return true;
+-   new pkgAcqIndex(Owner,Repository,IndexURI("srclist"),Info("srclist"),
+-		   "srclist");
++   new pkgAcqIndex(Owner,Repository,IndexURI("00APT.srclist"),Info("00APT.srclist"),
++		   "00APT.srclist");
+    return true;
+ }
+ 									/*}}}*/
+@@ -344,10 +344,10 @@
+    if (Repository->IsAuthenticated() == true && 
+        Repository->HasRelease() == false)
+       return true;
+-   new pkgAcqIndex(Owner,Repository,IndexURI("pkglist"),Info("pkglist"),
+-		   "pkglist");
+-   new pkgAcqIndexRel(Owner,Repository,IndexURI("release"),Info("release"),
+-		      "release");
++   new pkgAcqIndex(Owner,Repository,IndexURI("00APT.pkglist"),Info("00APT.pkglist"),
++		   "00APT.pkglist");
++   new pkgAcqIndexRel(Owner,Repository,IndexURI("00APT.release"),Info("00APT.release"),
++		      "00APT.release");
+    return true;
+ }
+ 									/*}}}*/
+@@ -421,7 +421,7 @@
+       return _error->Error(_("Problem opening %s"),PackageFile.c_str());
+    }
+    // We call SubProgress with Size(), since we won't call SelectFile() here.
+-   Prog.SubProgress(Size(),Info("pkglist"));
++   Prog.SubProgress(Size(),Info("00APT.pkglist"));
+    if (Gen.MergeFileProvides(Parser) == false)
+       return _error->Error(_("Problem with MergeFileProvides %s"),
+ 			   PackageFile.c_str());
+--- tools/genpkglist.cc.orig	2003-06-10 16:14:47.000000000 +0200
++++ tools/genpkglist.cc	2003-09-16 11:05:22.000000000 +0200
+@@ -544,9 +544,9 @@
+       }
+    }
+    pkglist_path = string(rpmsdir);
+-   rpmsdir = rpmsdir + "/RPMS." + string(op_suf);
++   rpmsdir = rpmsdir + "/" + string(op_suf);
+ 
+-   string dirtag = "RPMS." + string(op_suf);
++   string dirtag = string(op_suf);
+ 
+    entry_no = scandir(rpmsdir.c_str(), &dirEntries, selectDirent, alphasort);
+    if (entry_no < 0) {
+@@ -558,9 +558,9 @@
+    chdir(rpmsdir.c_str());
+    
+    if (pkgListSuffix != NULL)
+-	   pkglist_path = pkglist_path + "/base/pkglist." + pkgListSuffix;
++	   pkglist_path = pkglist_path + "/00APT.pkglist." + pkgListSuffix;
+    else
+-	   pkglist_path = pkglist_path + "/base/pkglist." + op_suf;
++	   pkglist_path = pkglist_path + "/00APT.pkglist." + op_suf;
+    
+    
+    if (pkgListAppend == true && FileExists(pkglist_path)) {
+--- tools/gensrclist.cc.orig	2003-06-10 16:14:44.000000000 +0200
++++ tools/gensrclist.cc	2003-09-16 11:05:41.000000000 +0200
+@@ -198,10 +198,10 @@
+    } else
+        strcpy(buf, arg_dir);
+    
+-   strcat(buf, "/SRPMS.");
++   strcat(buf, "/");
+    strcat(buf, arg_suffix);
+    
+-   srpmdir = "SRPMS." + string(arg_suffix);
++   srpmdir = string(arg_suffix);
+ #ifdef OLD_FLATSCHEME
+    if (flatStructure) {
+       // add the last component of the directory to srpmdir
+@@ -242,9 +242,9 @@
+    chdir(buf);
+    
+    if (srcListSuffix != NULL)
+-      sprintf(buf, "%s/srclist.%s", cwd, srcListSuffix);
++      sprintf(buf, "%s/00APT.srclist.%s", cwd, srcListSuffix);
+    else
+-      sprintf(buf, "%s/srclist.%s", cwd, arg_suffix);
++      sprintf(buf, "%s/00APT.srclist.%s", cwd, arg_suffix);
+    
+    if (srcListAppend == true && FileExists(buf)) {
+       outfd = fdOpen(buf, O_WRONLY|O_APPEND, 0644);

+ 3 - 3
apt/apt.spec

@@ -33,7 +33,7 @@ Distribution: OpenPKG [EVAL]
 Group:        Bootstrapping
 License:      GPL
 Version:      0.5.5cnc6
-Release:      20030915
+Release:      20030916
 
 #   list of sources
 Source0:      http://moin.conectiva.com.br/files/AptRpm/attachments/apt-%{version}.tar.bz2
@@ -45,8 +45,8 @@ Patch1:       apt.patch.porting
 #   build information
 Prefix:       %{l_prefix}
 BuildRoot:    %{l_buildroot}
-BuildPreReq:  OpenPKG, openpkg >= 20030913, make, gcc, autoconf
-PreReq:       OpenPKG, openpkg >= 20030913
+BuildPreReq:  OpenPKG, openpkg >= 20030913, ncurses, readline, make, gcc, autoconf
+PreReq:       OpenPKG, openpkg >= 20030913, ncurses, readline
 AutoReq:      no
 AutoReqProv:  no