Update of /cvsroot/fink/experimental/dmacks/finkinfo In directory vz-cvs-3.sog:/tmp/cvs-serv15726
Modified Files: apt.info apt.patch Log Message: only generate dummy data if f-v-p fails Index: apt.patch =================================================================== RCS file: /cvsroot/fink/experimental/dmacks/finkinfo/apt.patch,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- apt.patch 29 Apr 2011 18:40:38 -0000 1.9 +++ apt.patch 29 Apr 2011 19:13:36 -0000 1.10 @@ -286,7 +286,7 @@ Score += 10; if (FileExists("/etc/debian_version") == true) Score += 10; -@@ -202,6 +307,45 @@ +@@ -202,6 +307,54 @@ if (StatusFile == 0) StatusFile = new debStatusIndex(_config->FindFile("Dir::State::status")); List.push_back(StatusFile); @@ -294,15 +294,23 @@ + + if (FinkStatusFile == 0) { + struct stat unused_sbuf; -+ int sys_ok=0; + unlink(FINKSTATUSFILE); -+ if ( 0 == stat("@PREFIX@/bin/fink-virtual-pkgs",&unused_sbuf)) -+ if ( 0 == system("@PREFIX@/bin/fink-virtual-pkgs --apt")) -+ if (0 == stat(FINKSTATUSFILE, &unused_sbuf)) -+ sys_ok=1; -+ if (!sys_ok) -+ return _error->Error("Error while setting up data-piping from fink-virtual-pkgs"); -+ std::ofstream finkstatus(FINKSTATUSFILE); ++ if ( 0 == stat("@PREFIX@/bin/fink-virtual-pkgs",&unused_sbuf)) { ++ // will be trying to use fink's own virtpkg data ++ int have_fvp_data=0; ++ if ( 0 == system("@PREFIX@/bin/fink-virtual-pkgs --apt")) { ++ if (0 == stat(FINKSTATUSFILE, &unused_sbuf)) { ++ // f-v-p did not fail and we have its data-file available ++ have_fvp_data=1; ++ } ++ } ++ if ( !have_fvp_data ) { ++ // f-v-p failed somehow? ABORT! ++ return _error->Error("Error while setting up data-piping from fink-virtual-pkgs"); ++ } ++ } else { ++ // no f-v-p...use dummy data ++ std::ofstream finkstatus(FINKSTATUSFILE); + if(macosx_version.version != 0) + { + finkstatus << "Package: macosx" << endl; @@ -325,6 +333,7 @@ + finkstatus << "Description: Pseudo package representing Darwin" << endl; + finkstatus << " Pseudo package representing Darwin" << endl << endl; + finkstatus.close(); ++ } + FinkStatusFile = new debStatusIndex(FINKSTATUSFILE); + } + List.push_back(FinkStatusFile); @@ -332,7 +341,7 @@ return true; } /*}}}*/ -@@ -217,6 +361,10 @@ +@@ -217,6 +370,10 @@ { Found = StatusFile; return true; Index: apt.info =================================================================== RCS file: /cvsroot/fink/experimental/dmacks/finkinfo/apt.info,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- apt.info 29 Apr 2011 18:40:38 -0000 1.9 +++ apt.info 29 Apr 2011 19:13:36 -0000 1.10 @@ -8,7 +8,7 @@ Source-MD5: 274fb64e2e67318b4c9c94599785c37d SourceDirectory: %n-%v PatchFile: %n.patch -PatchFile-MD5: 9d870e6539de68f890afd331b94ab75c +PatchFile-MD5: 26a144015d988b0bd8da718e9056c164 PatchScript: << sed -e 's|@PREFIX@|%p|g' -e 's|@DIST@|10.3|g' < %{PatchFile} | patch -p1 sh patch_flush ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd _______________________________________________ Fink-commits mailing list Fink-commits@lists.sourceforge.net http://news.gmane.org/gmane.os.apple.fink.cvs