rpms/orsa/devel orsa-file.patch,NONE,1.1 orsa.spec,1.4,1.5
Miloš Jakubíček
mjakubicek at fedoraproject.org
Tue Apr 7 16:09:10 UTC 2009
- Previous message (by thread): rpms/eclipse/devel eclipse.spec,1.626,1.627
- Next message (by thread): rpms/koffice/devel exiv2-0.18-attempt1.diff, 1.2, 1.3 import.log, NONE, 1.1 .cvsignore, 1.27, 1.28 koffice.spec, 1.101, 1.102 sources, 1.27, 1.28 koffice-1.6.3-gcc43.patch, 1.5, NONE koffice-1.6.3-glibc_strrchr.patch, 1.1, NONE koffice-1.6.3-quint32.patch, 1.1, NONE koffice-1.6.3-xpdf2-CVE-2007-4352-5392-5393.diff, 1.5, NONE koffice-20090306svn.patch, 1.1, NONE koffice-svn_checkout.sh, 1.1, NONE koffice-xpdf-CVE-2007-3387.diff, 1.5, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: mjakubicek
Update of /cvs/pkgs/rpms/orsa/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv19039
Modified Files:
orsa.spec
Added Files:
orsa-file.patch
Log Message:
- Do not complain loudly if the configuration file is missing (fix #494342)
orsa-file.patch:
--- NEW FILE orsa-file.patch ---
--- src/liborsa/orsa_file.cc.orig 2009-04-07 16:27:28.000000000 +0200
+++ src/liborsa/orsa_file.cc 2009-04-07 17:33:23.000000000 +0200
@@ -1399,6 +1399,36 @@
list_enum.push_back(TEXTURE_NEPTUNE);
}
+ void OrsaConfigFile::Open(const FILE_STATUS st) {
+
+ // already in the right status
+ if (status == st) return;
+
+ // anomalous...
+ if (st == CLOSE) {
+ Close();
+ return;
+ }
+
+ Close();
+
+ if ((st == OPEN_R) && ((file = OPEN_FILE(filename.c_str(),OPEN_READ)) != 0)) {
+ status = OPEN_R;
+ return;
+ }
+
+ if ((st == OPEN_W) && ((file = OPEN_FILE(filename.c_str(),OPEN_WRITE)) != 0)) {
+ status = OPEN_W;
+ return;
+ }
+
+ if (file == 0) {
+ ORSA_DEBUG("Configuration file %s not found.",filename.c_str());
+ }
+
+ status = CLOSE;
+ }
+
void OrsaConfigFile::Read() {
// if (file == 0) Open();
@@ -1406,13 +1436,7 @@
Open(OPEN_R);
- // should improve this check
- // if (status != OPEN_R) return;
-
- if (status != OPEN_R) {
- ORSA_ERROR("Status error!");
- return;
- }
+ if (status != OPEN_R) return;
char line[1024];
string stag, svalue;
--- src/liborsa/orsa_file.h.orig 2009-04-07 17:22:52.000000000 +0200
+++ src/liborsa/orsa_file.h 2009-04-07 17:35:59.000000000 +0200
@@ -491,6 +491,7 @@
OrsaConfigFile();
// OrsaConfigFile(Config*);
+ void Open(const FILE_STATUS st = OPEN_R);
void Read();
void Write();
--- src/liborsa/orsa_universe.cc.orig 2009-04-07 08:49:49.000000000 +0200
+++ src/liborsa/orsa_universe.cc 2009-04-07 17:45:02.000000000 +0200
@@ -79,7 +79,7 @@
//
units->SetSystem(tu,lu,mu);
//
- if (!jpl_file) {
+ if (!jpl_file && !config->paths[JPL_EPHEM_FILE]->GetValue().empty()) {
jpl_file = new JPLFile(config->paths[JPL_EPHEM_FILE]->GetValue().c_str());
}
//
@@ -87,7 +87,7 @@
jpl_cache = new JPLCache;
}
//
- if (!location_file) {
+ if (!location_file && !config->paths[OBSCODE]->GetValue().empty()) {
location_file = new LocationFile;
location_file->SetFileName(config->paths[OBSCODE]->GetValue().c_str());
location_file->Open();
Index: orsa.spec
===================================================================
RCS file: /cvs/pkgs/rpms/orsa/devel/orsa.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- orsa.spec 28 Mar 2009 10:37:45 -0000 1.4
+++ orsa.spec 7 Apr 2009 16:08:40 -0000 1.5
@@ -1,6 +1,6 @@
Name: orsa
Version: 0.7.0
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: Orbit Reconstruction, Simulation and Analysis
Group: Amusements/Graphics
@@ -18,6 +18,11 @@
# Reported into upstream bugtracker as
# http://sourceforge.net/tracker/index.php?func=detail&aid=2099054&group_id=44502&atid=439768
Patch1: %{name}-configure.patch
+# Patch that prevents orsa from printing many errors on startup because of missing
+# configuration files.
+# Reported into upstream bugtracker as
+# http://sourceforge.net/tracker/?func=detail&aid=2741094&group_id=44502&atid=439768
+Patch2: %{name}-file.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: readline-devel
@@ -50,6 +55,7 @@
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2
%build
# honor $RPM_OPT_FLAGS
@@ -87,6 +93,9 @@
%{_libdir}/libxorsa.so
%changelog
+* Tue Apr 07 2009 Milos Jakubicek <xjakub at fi.muni.cz> - 0.7.0-6
+- Do not complain loudly if the configuration file is missing (fix #494342)
+
* Sat Feb 28 2009 Milos Jakubicek <xjakub at fi.muni.cz> - 0.7.0-5
- Rebuilt against new ginac 1.5
- Previous message (by thread): rpms/eclipse/devel eclipse.spec,1.626,1.627
- Next message (by thread): rpms/koffice/devel exiv2-0.18-attempt1.diff, 1.2, 1.3 import.log, NONE, 1.1 .cvsignore, 1.27, 1.28 koffice.spec, 1.101, 1.102 sources, 1.27, 1.28 koffice-1.6.3-gcc43.patch, 1.5, NONE koffice-1.6.3-glibc_strrchr.patch, 1.1, NONE koffice-1.6.3-quint32.patch, 1.1, NONE koffice-1.6.3-xpdf2-CVE-2007-4352-5392-5393.diff, 1.5, NONE koffice-20090306svn.patch, 1.1, NONE koffice-svn_checkout.sh, 1.1, NONE koffice-xpdf-CVE-2007-3387.diff, 1.5, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list