From 9dc0e696e3e88cbf4418949fdf6007573409e084 Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Sat, 23 Oct 2010 14:20:29 +0200 Subject: MP-660: Incorrect start up warnings Only try to remove the marker files when they were found in the first place. Also fixed the debug output regarding what value gLastExecEvent is being set to. --- linden/indra/newview/llappviewer.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index e85abb1..dd97cbf 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp @@ -2694,35 +2694,32 @@ void LLAppViewer::initMarkerFile() std::string llerror_marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, LLERROR_MARKER_FILE_NAME); std::string error_marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ERROR_MARKER_FILE_NAME); - if (LLAPRFile::isExist(mMarkerFileName, LL_APR_RB) && !anotherInstanceRunning()) { gLastExecEvent = LAST_EXEC_FROZE; LL_INFOS("MarkerFile") << "Exec marker found: program froze on previous execution" << LL_ENDL; } - if(LLAPRFile::isExist(logout_marker_file, LL_APR_RB)) { - LL_INFOS("MarkerFile") << "Last exec LLError crashed, setting LastExecEvent to " << LAST_EXEC_LLERROR_CRASH << LL_ENDL; gLastExecEvent = LAST_EXEC_LOGOUT_FROZE; + LL_INFOS("MarkerFile") << "Last exec LLError crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL; + LLAPRFile::remove(logout_marker_file); } if(LLAPRFile::isExist(llerror_marker_file, LL_APR_RB)) { - llinfos << "Last exec LLError crashed, setting LastExecEvent to " << LAST_EXEC_LLERROR_CRASH << llendl; if(gLastExecEvent == LAST_EXEC_LOGOUT_FROZE) gLastExecEvent = LAST_EXEC_LOGOUT_CRASH; else gLastExecEvent = LAST_EXEC_LLERROR_CRASH; + LL_INFOS("MarkerFile") << "Last exec LLError crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL; + LLAPRFile::remove(llerror_marker_file); } if(LLAPRFile::isExist(error_marker_file, LL_APR_RB)) { - LL_INFOS("MarkerFile") << "Last exec crashed, setting LastExecEvent to " << LAST_EXEC_OTHER_CRASH << LL_ENDL; if(gLastExecEvent == LAST_EXEC_LOGOUT_FROZE) gLastExecEvent = LAST_EXEC_LOGOUT_CRASH; else gLastExecEvent = LAST_EXEC_OTHER_CRASH; + LL_INFOS("MarkerFile") << "Last exec crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL; + LLAPRFile::remove(error_marker_file); } - LLAPRFile::remove(logout_marker_file); - LLAPRFile::remove(llerror_marker_file); - LLAPRFile::remove(error_marker_file); - // No new markers if another instance is running. if(anotherInstanceRunning()) { -- cgit v1.1 From f05549bd57907c3f8168e7cd9f42aa3219027c86 Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Sat, 23 Oct 2010 21:35:43 +0200 Subject: IMP-661: WARNING: isFeatureAvailable: Feature RenderCubeMap not on feature list! Fixes this warning. Note that LLCubeMap::sUseCubeMaps is set to true by default, so this patch only has effect when the feature is actually NOT available. I tested that LLCubeMap::sUseCubeMaps is NOT used before the point where it is initialized now. The patch also adds an entry for IMP-660 to doc/contributions.txt that I had forgotten in the previous commit; and while I was at it, changes all RED- prefixes in IMP-. --- linden/doc/contributions.txt | 38 +++++++++++++++++++----------------- linden/indra/newview/llappviewer.cpp | 5 +++-- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/linden/doc/contributions.txt b/linden/doc/contributions.txt index 1cbc2dd..863a275 100644 --- a/linden/doc/contributions.txt +++ b/linden/doc/contributions.txt @@ -62,24 +62,26 @@ Aleric Inglewood SNOW-766 SNOW-796 SNOW-800 - RED-429 - RED-552 - RED-553 - RED-554 - RED-556 - RED-560 - RED-561 - RED-562 - RED-565 - RED-566 - RED-567 - RED-573 - RED-575 - RED-576 - RED-577 - RED-578 - RED-579 - RED-581 + IMP-429 + IMP-552 + IMP-553 + IMP-554 + IMP-556 + IMP-560 + IMP-561 + IMP-562 + IMP-565 + IMP-566 + IMP-567 + IMP-573 + IMP-575 + IMP-576 + IMP-577 + IMP-578 + IMP-579 + IMP-581 + IMP-660 + IMP-661 Alissa Sabre VWR-81 VWR-83 diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index dd97cbf..4485cdf 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp @@ -440,8 +440,6 @@ static void settings_to_globals() gMapScale = gSavedSettings.getF32("MapScale"); LLHoverView::sShowHoverTips = gSavedSettings.getBOOL("ShowHoverTips"); - LLCubeMap::sUseCubeMaps = LLFeatureManager::getInstance()->isFeatureAvailable("RenderCubeMap"); - LLSlider::setScrollWheelMultiplier( gSavedSettings.getS32("SliderScrollWheelMultiplier") ); LLHUDEffectLookAt::sDebugLookAt = gSavedSettings.getBOOL("PersistShowLookAt"); @@ -779,6 +777,9 @@ bool LLAppViewer::init() // initWindow(); + // initWindow also initializes the Feature List, so now we can initialize this global. + LLCubeMap::sUseCubeMaps = LLFeatureManager::getInstance()->isFeatureAvailable("RenderCubeMap"); + { BOOL download = gSavedSettings.getBOOL("DownloadClientTags"); -- cgit v1.1 From 14b06b36f896902df28b85369c7da0e75befa50c Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Sat, 23 Oct 2010 22:08:11 +0200 Subject: IMP-662: WARNING: LLVFS: Using index file /ramdisk/imprudence/cache/index.db2.x.606582153 These aren't warnings at all. They are printed when a LLVFS object was successfully created. Fixed by turning the warnings into INFO. --- linden/doc/contributions.txt | 1 + linden/indra/llvfs/llvfs.cpp | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/linden/doc/contributions.txt b/linden/doc/contributions.txt index 863a275..5ed1509 100644 --- a/linden/doc/contributions.txt +++ b/linden/doc/contributions.txt @@ -82,6 +82,7 @@ Aleric Inglewood IMP-581 IMP-660 IMP-661 + IMP-662 Alissa Sabre VWR-81 VWR-83 diff --git a/linden/indra/llvfs/llvfs.cpp b/linden/indra/llvfs/llvfs.cpp index 7df2a81..9bf5b59 100644 --- a/linden/indra/llvfs/llvfs.cpp +++ b/linden/indra/llvfs/llvfs.cpp @@ -583,8 +583,9 @@ LLVFS::LLVFS(const std::string& index_filename, const std::string& data_filename } } - LL_WARNS("VFS") << "Using index file " << mIndexFilename << LL_ENDL; - LL_WARNS("VFS") << "Using data file " << mDataFilename << LL_ENDL; + // Success! + LL_INFOS("VFS") << "Using index file " << mIndexFilename << LL_ENDL; + LL_INFOS("VFS") << "Using data file " << mDataFilename << LL_ENDL; mValid = VFSVALID_OK; } -- cgit v1.1 From 95e77d7378654904990ea5cd9947cbc4dd40b386 Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Sat, 23 Oct 2010 22:59:56 +0200 Subject: IMP-663: WARNING: replaceSubstitutionStrings: replaceSubstituionStrings FAILURE: value: ignoretext repl: Caused by missing ignoretext in notifications.xml. Also fixed typos in debug output messages. --- linden/doc/contributions.txt | 1 + linden/indra/llui/llnotifications.cpp | 4 ++-- linden/indra/newview/skins/default/xui/en-us/notifications.xml | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/linden/doc/contributions.txt b/linden/doc/contributions.txt index 5ed1509..3158f2c 100644 --- a/linden/doc/contributions.txt +++ b/linden/doc/contributions.txt @@ -83,6 +83,7 @@ Aleric Inglewood IMP-660 IMP-661 IMP-662 + IMP-663 Alissa Sabre VWR-81 VWR-83 diff --git a/linden/indra/llui/llnotifications.cpp b/linden/indra/llui/llnotifications.cpp index 2459110..4d3ff46 100644 --- a/linden/indra/llui/llnotifications.cpp +++ b/linden/indra/llui/llnotifications.cpp @@ -1190,13 +1190,13 @@ void replaceSubstitutionStrings(LLXMLNodePtr node, StringMap& replacements) if (found != replacements.end()) { replacement = found->second; - //llwarns << "replaceSubstituionStrings: value: " << value << " repl: " << replacement << llendl; + //llinfos << "replaceSubstitutionStrings: value: \"" << value << "\" repl: \"" << replacement << "\"." << llendl; it->second->setValue(replacement); } else { - llwarns << "replaceSubstituionStrings FAILURE: value: " << value << " repl: " << replacement << llendl; + llwarns << "replaceSubstitutionStrings FAILURE: could not find replacement \"" << value << "\"." << llendl; } } } diff --git a/linden/indra/newview/skins/default/xui/en-us/notifications.xml b/linden/indra/newview/skins/default/xui/en-us/notifications.xml index 333e362..c69e792 100644 --- a/linden/indra/newview/skins/default/xui/en-us/notifications.xml +++ b/linden/indra/newview/skins/default/xui/en-us/notifications.xml @@ -7008,6 +7008,7 @@ IM history could not be found for [NAME]. type="alert"> Show Look At is a debug setting that displays where an avatar's head is looking. Be aware: this will *NOT* show where an avatar's camera is actually pointed. This setting should not be relied on for any form of privacy! -- cgit v1.1 From b23d8e7e174c2e68cdd3435cc42907796181d159 Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Sat, 23 Oct 2010 23:58:07 +0200 Subject: IMP-664: WARNING: addFeature: LLFeatureList::Attempting to add preexisting feature Disregard128DefaultDrawDistance Fix a bug that causes the last line of the feature table file to be read twice. This patch also removes the check for name.empty() because that will never be true, so might as well remove it. --- linden/doc/contributions.txt | 1 + linden/indra/newview/llfeaturemanager.cpp | 11 +---------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/linden/doc/contributions.txt b/linden/doc/contributions.txt index 3158f2c..cd708fd 100644 --- a/linden/doc/contributions.txt +++ b/linden/doc/contributions.txt @@ -84,6 +84,7 @@ Aleric Inglewood IMP-661 IMP-662 IMP-663 + IMP-664 Alissa Sabre VWR-81 VWR-83 diff --git a/linden/indra/newview/llfeaturemanager.cpp b/linden/indra/newview/llfeaturemanager.cpp index 35613b7..54da31b 100644 --- a/linden/indra/newview/llfeaturemanager.cpp +++ b/linden/indra/newview/llfeaturemanager.cpp @@ -250,11 +250,9 @@ BOOL LLFeatureManager::loadFeatureTables() mTableVersion = version; LLFeatureList *flp = NULL; - while (!file.eof() && file.good()) + while (file >> name) { char buffer[MAX_STRING]; /*Flawfinder: ignore*/ - - file >> name; if (name.substr(0,2) == "//") { @@ -263,13 +261,6 @@ BOOL LLFeatureManager::loadFeatureTables() continue; } - if (name.empty()) - { - // This is a blank line - file.getline(buffer, MAX_STRING); - continue; - } - if (name == "list") { if (flp) -- cgit v1.1 From c6aac7d81149a50f895a0f06fdf08b65c8e4bd8c Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Mon, 25 Oct 2010 02:19:54 +0200 Subject: Added missing textures to artwork. Also fixed textures.xml by adding media_panel_scrollbg.png which is used in the MediaHUD as one of the media_*.png textures, but was lacking from textures.xml. --- linden/indra/newview/skins/default/textures/textures.xml | 1 + linden/install.xml | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/linden/indra/newview/skins/default/textures/textures.xml b/linden/indra/newview/skins/default/textures/textures.xml index f2189a4..60fb4e0 100644 --- a/linden/indra/newview/skins/default/textures/textures.xml +++ b/linden/indra/newview/skins/default/textures/textures.xml @@ -396,5 +396,6 @@ + diff --git a/linden/install.xml b/linden/install.xml index 09a58e7..c564b2b 100755 --- a/linden/install.xml +++ b/linden/install.xml @@ -179,30 +179,30 @@ darwin md5sum - 506d8203676998eab8ccbaaf7bc7415f + 68fedbc3638d7f081edc59bdccbeffc2 url - http://imprudenceviewer.org/download/extras/imprudence-artwork-20101017.tar.bz2 + http://github.com/downloads/AlericInglewood/imprudence/imprudence-artwork-20101025.tar.bz2 linux md5sum - 506d8203676998eab8ccbaaf7bc7415f + 68fedbc3638d7f081edc59bdccbeffc2 url - http://imprudenceviewer.org/download/extras/imprudence-artwork-20101017.tar.bz2 + http://github.com/downloads/AlericInglewood/imprudence/imprudence-artwork-20101025.tar.bz2 linux64 md5sum - 506d8203676998eab8ccbaaf7bc7415f + 68fedbc3638d7f081edc59bdccbeffc2 url - http://imprudenceviewer.org/download/extras/imprudence-artwork-20101017.tar.bz2 + http://github.com/downloads/AlericInglewood/imprudence/imprudence-artwork-20101025.tar.bz2 windows md5sum - 506d8203676998eab8ccbaaf7bc7415f + 68fedbc3638d7f081edc59bdccbeffc2 url - http://imprudenceviewer.org/download/extras/imprudence-artwork-20101017.tar.bz2 + http://github.com/downloads/AlericInglewood/imprudence/imprudence-artwork-20101025.tar.bz2 -- cgit v1.1 From 5900ac5f30540ac445ec50a61edfc4ed15ccbaf7 Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Mon, 25 Oct 2010 02:36:53 +0200 Subject: Download prebuilt vivox (and 32bitcompatibilitylibs on 64bit) even when using standalone. --- linden/indra/cmake/ViewerMiscLibs.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/linden/indra/cmake/ViewerMiscLibs.cmake b/linden/indra/cmake/ViewerMiscLibs.cmake index 7fe1040..35f4e3a 100644 --- a/linden/indra/cmake/ViewerMiscLibs.cmake +++ b/linden/indra/cmake/ViewerMiscLibs.cmake @@ -8,6 +8,14 @@ if (NOT STANDALONE) use_prebuilt_binary(32bitcompatibilitylibs) endif(LINUX AND ${ARCH} STREQUAL "x86_64") use_prebuilt_binary(fontconfig) +else (NOT STANDALONE) + # Download there even when using standalone. + set(STANDALONE OFF) + use_prebuilt_binary(vivox) + if(LINUX AND ${ARCH} STREQUAL "x86_64") + use_prebuilt_binary(32bitcompatibilitylibs) + endif(LINUX AND ${ARCH} STREQUAL "x86_64") + set(STANDALONE ON) endif(NOT STANDALONE) if (WINDOWS) -- cgit v1.1 From d1b840a0137dee05d424c477de0ba757be89af6d Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Mon, 25 Oct 2010 14:59:48 +0200 Subject: Validate textures starting with 00 too. --- linden/indra/newview/lltexturecache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linden/indra/newview/lltexturecache.cpp b/linden/indra/newview/lltexturecache.cpp index a9b7f81..b0d8412 100644 --- a/linden/indra/newview/lltexturecache.cpp +++ b/linden/indra/newview/lltexturecache.cpp @@ -1345,7 +1345,7 @@ void LLTextureCache::purgeTextures(bool validate) if (validate) { validate_idx = gSavedSettings.getU32("CacheValidateCounter"); - U32 next_idx = (++validate_idx) % 256; + U32 next_idx = (validate_idx + 1) % 256; gSavedSettings.setU32("CacheValidateCounter", next_idx); LL_DEBUGS("TextureCache") << "TEXTURE CACHE: Validating: " << validate_idx << LL_ENDL; } -- cgit v1.1 From 17e2c3f8999d93bb59deb7ac0c289ed2157a3f5e Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Mon, 25 Oct 2010 16:02:36 +0200 Subject: Fix possible crash on llassert_always(purge_list.size() >= entries_to_purge) This horrible noobish code checked if num_entries > sCacheMaxEntries and then goes on to assign (num_entries-empty_entries) - sCacheMaxEntries to an U32 entries_to_purge. Obviously this can lead to an abitrary large value of entries_to_purge with as result a crash due to the llassert_always. This bug must have been extremely rare since it only happens when someone decreases their cache size and has more empty entries in their entries file than the total number of entries minus the new cache size. --- linden/indra/newview/lltexturecache.cpp | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/linden/indra/newview/lltexturecache.cpp b/linden/indra/newview/lltexturecache.cpp index b0d8412..ae0a63f 100644 --- a/linden/indra/newview/lltexturecache.cpp +++ b/linden/indra/newview/lltexturecache.cpp @@ -1172,7 +1172,7 @@ void LLTextureCache::readHeaderCache() U32 empty_entries = 0; typedef std::pair lru_data_t; std::set lru; - std::vector purge_list; + std::set purge_list; for (U32 i=0; i sCacheMaxEntries) + if (num_entries - empty_entries > sCacheMaxEntries) { // Special case: cache size was reduced, need to remove entries // Note: After we prune entries, we will call this again and create the LRU - U32 entries_to_purge = (num_entries-empty_entries) - sCacheMaxEntries; + U32 entries_to_purge = (num_entries - empty_entries) - sCacheMaxEntries; llinfos << "Texture Cache Entries: " << num_entries << " Max: " << sCacheMaxEntries << " Empty: " << empty_entries << " Purging: " << entries_to_purge << llendl; - if (entries_to_purge > 0) + // We can exit the following loop with the given condition, since if we'd reach the end of the lru set we'd have: + // purge_list.size() = lru.size() = num_entries - empty_entries = entries_to_purge + sCacheMaxEntries >= entries_to_purge + for (std::set::iterator iter = lru.begin(); purge_list.size() < entries_to_purge; ++iter) { - for (std::set::iterator iter = lru.begin(); iter != lru.end(); ++iter) - { - purge_list.push_back(iter->second); - if (purge_list.size() >= entries_to_purge) - break; - } + purge_list.insert(iter->second); } - llassert_always(purge_list.size() >= entries_to_purge); } else { @@ -1227,7 +1223,7 @@ void LLTextureCache::readHeaderCache() if (purge_list.size() > 0) { - for (std::vector::iterator iter = purge_list.begin(); iter != purge_list.end(); ++iter) + for (std::set::iterator iter = purge_list.begin(); iter != purge_list.end(); ++iter) { mHeaderMutex.unlock(); removeFromCache(*iter); -- cgit v1.1 From b22b6bb6b16fcc0d908aa7899a80650ec1fe511d Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Mon, 25 Oct 2010 17:33:38 +0200 Subject: Fixed a locking issue with regard to texture cache purging. Releasing a lock in the middle of a critical area isn't very smart. --- linden/indra/newview/lltexturecache.cpp | 20 +++++++++++++------- linden/indra/newview/lltexturecache.h | 1 + 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/linden/indra/newview/lltexturecache.cpp b/linden/indra/newview/lltexturecache.cpp index ae0a63f..56f3719 100644 --- a/linden/indra/newview/lltexturecache.cpp +++ b/linden/indra/newview/lltexturecache.cpp @@ -1225,9 +1225,7 @@ void LLTextureCache::readHeaderCache() { for (std::set::iterator iter = purge_list.begin(); iter != purge_list.end(); ++iter) { - mHeaderMutex.unlock(); - removeFromCache(*iter); - mHeaderMutex.lock(); + removeFromCacheLocked(*iter); } // If we removed any entries, we need to rebuild the entries list, // write the header, and call this again @@ -1246,7 +1244,7 @@ void LLTextureCache::readHeaderCache() writeEntriesAndClose(new_entries); mHeaderMutex.unlock(); // unlock the mutex before calling again readHeaderCache(); // repeat with new entries file - mHeaderMutex.lock(); + return; } else { @@ -1611,7 +1609,6 @@ bool LLTextureCache::removeHeaderCacheEntry(const LLUUID& id) { if (!mReadOnly) { - LLMutexLock lock(&mHeaderMutex); Entry entry; S32 idx = openAndReadEntry(id, entry, false); if (idx >= 0) @@ -1628,17 +1625,26 @@ bool LLTextureCache::removeHeaderCacheEntry(const LLUUID& id) return false; } -void LLTextureCache::removeFromCache(const LLUUID& id) +void LLTextureCache::removeFromCacheLocked(const LLUUID& id) { //llwarns << "Removing texture from cache: " << id << llendl; if (!mReadOnly) { removeHeaderCacheEntry(id); - LLMutexLock lock(&mHeaderMutex); LLAPRFile::remove(getTextureFileName(id)); } } +void LLTextureCache::removeFromCache(const LLUUID& id) +{ + //llwarns << "Removing texture from cache: " << id << llendl; + if (!mReadOnly) + { + LLMutexLock lock(&mHeaderMutex); + LLTextureCache::removeFromCacheLocked(id); + } +} + ////////////////////////////////////////////////////////////////////////////// LLTextureCache::ReadResponder::ReadResponder() diff --git a/linden/indra/newview/lltexturecache.h b/linden/indra/newview/lltexturecache.h index 45804c2..c859b9a 100644 --- a/linden/indra/newview/lltexturecache.h +++ b/linden/indra/newview/lltexturecache.h @@ -158,6 +158,7 @@ private: S32 getHeaderCacheEntry(const LLUUID& id, S32& imagesize); S32 setHeaderCacheEntry(const LLUUID& id, S32 imagesize); bool removeHeaderCacheEntry(const LLUUID& id); + void removeFromCacheLocked(const LLUUID& id); private: // Internal -- cgit v1.1 From 03852da89ad24c9e1edcf9cb50dbda31dd3ab43a Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Mon, 25 Oct 2010 17:37:46 +0200 Subject: IMP-667: WARNING: remove: Attempting to remove filename: /ramdisk/imprudence/cache/textures/*/*.texture This turned out to be a simple matter of trying to remove non-existant files: A texture with a 'body size' of 0 doesn't have a texture body file. --- linden/doc/contributions.txt | 1 + linden/indra/newview/lltexturecache.cpp | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/linden/doc/contributions.txt b/linden/doc/contributions.txt index cd708fd..2b40104 100644 --- a/linden/doc/contributions.txt +++ b/linden/doc/contributions.txt @@ -85,6 +85,7 @@ Aleric Inglewood IMP-662 IMP-663 IMP-664 + IMP-667 Alissa Sabre VWR-81 VWR-83 diff --git a/linden/indra/newview/lltexturecache.cpp b/linden/indra/newview/lltexturecache.cpp index 56f3719..a1a9a39 100644 --- a/linden/indra/newview/lltexturecache.cpp +++ b/linden/indra/newview/lltexturecache.cpp @@ -1382,7 +1382,15 @@ void LLTextureCache::purgeTextures(bool validate) { purge_count++; LL_DEBUGS("TextureCache") << "PURGING: " << filename << LL_ENDL; - LLAPRFile::remove(filename); + if (entries[idx].mBodySize > 0) + { + LLAPRFile::remove(filename); + } + else if (LLAPRFile::isExist(filename)) // Sanity check. Shouldn't exist. + { + LL_WARNS("TextureCache") << "Entry has zero body size but existing " << filename << ". Deleting file too..." << LL_ENDL; + LLAPRFile::remove(filename); + } cache_size -= entries[idx].mBodySize; mTexturesSizeTotal -= entries[idx].mBodySize; entries[idx].mBodySize = 0; -- cgit v1.1 From 209535f2e8c9e0553cb08b6a47fefb0a86c1ea61 Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Tue, 26 Oct 2010 15:54:01 +0200 Subject: IMP-670: Uninstall packages that are renewed Uninstall old files when a new package with the same name is being installed. See http://redmine.imprudenceviewer.org/issues/670 --- linden/doc/contributions.txt | 1 + linden/scripts/install.py | 15 ++++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/linden/doc/contributions.txt b/linden/doc/contributions.txt index 2b40104..e5e3eb0 100644 --- a/linden/doc/contributions.txt +++ b/linden/doc/contributions.txt @@ -86,6 +86,7 @@ Aleric Inglewood IMP-663 IMP-664 IMP-667 + IMP-670 Alissa Sabre VWR-81 VWR-83 diff --git a/linden/scripts/install.py b/linden/scripts/install.py index a16034f..f09fc48 100755 --- a/linden/scripts/install.py +++ b/linden/scripts/install.py @@ -534,24 +534,24 @@ windows/i686/vs/2003 -- specify a windows visual studio 2003 package""" platform, cache_dir)) to_install = [] + to_uninstall = [] #print "self._installed",self._installed for ifile in ifiles: if ifile.pkgname not in self._installed: to_install.append(ifile) elif ifile.url not in self._installed[ifile.pkgname].urls(): + to_uninstall.append(ifile.pkgname) to_install.append(ifile) elif ifile.md5sum != \ self._installed[ifile.pkgname].get_md5sum(ifile.url): - # *TODO: We may want to uninstall the old version too - # when we detect it is installed, but the md5 sum is - # different. + to_uninstall.append(ifile.pkgname) to_install.append(ifile) else: #print "Installation up to date:", # ifile.pkgname,ifile.platform_path pass #print "to_install",to_install - return to_install + return [to_install, to_uninstall] def _install(self, to_install, install_dir): for ifile in to_install: @@ -620,12 +620,17 @@ windows/i686/vs/2003 -- specify a windows visual studio 2003 package""" cache_dir = os.path.realpath(cache_dir) _mkdir(install_dir) _mkdir(cache_dir) - to_install = self._build_ifiles(platform, cache_dir) + to_install_uninstall = self._build_ifiles(platform, cache_dir) + to_install = to_install_uninstall[0] + to_uninstall = to_install_uninstall[1] # Filter for files which we actually requested to install. to_install = [ifl for ifl in to_install if ifl.pkgname in installables] + to_uninstall = [ifl for ifl in to_uninstall if ifl in installables] for ifile in to_install: ifile.fetch_local() + if to_uninstall: + self.uninstall(to_uninstall, install_dir) self._install(to_install, install_dir) def do_install(self, installables, platform, install_dir, cache_dir=None, -- cgit v1.1 From 534779caf41bb0ec7480e2403d3dfc20f1aec06c Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Tue, 26 Oct 2010 19:59:06 +0200 Subject: Add missing skin thumbnail to artwork and move them to the right directory. --- linden/install.xml | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/linden/install.xml b/linden/install.xml index c564b2b..4a6cb23 100755 --- a/linden/install.xml +++ b/linden/install.xml @@ -176,33 +176,12 @@ creative commons attribution-share alike 3.0 packages - darwin - - md5sum - 68fedbc3638d7f081edc59bdccbeffc2 - url - http://github.com/downloads/AlericInglewood/imprudence/imprudence-artwork-20101025.tar.bz2 - - linux - - md5sum - 68fedbc3638d7f081edc59bdccbeffc2 - url - http://github.com/downloads/AlericInglewood/imprudence/imprudence-artwork-20101025.tar.bz2 - - linux64 - - md5sum - 68fedbc3638d7f081edc59bdccbeffc2 - url - http://github.com/downloads/AlericInglewood/imprudence/imprudence-artwork-20101025.tar.bz2 - - windows + common md5sum - 68fedbc3638d7f081edc59bdccbeffc2 + a2cde4f24bdcc260b661e139846b8acd url - http://github.com/downloads/AlericInglewood/imprudence/imprudence-artwork-20101025.tar.bz2 + http://github.com/downloads/AlericInglewood/imprudence/imprudence-artwork-20101026.tar.bz2 -- cgit v1.1