~ubuntu-branches/ubuntu/saucy/apt-cacher-ng/saucy

« back to all changes in this revision

Viewing changes to source/expiration.cc

  • Committer: Bazaar Package Importer
  • Author(s): Eduard Bloch
  • Date: 2011-08-07 17:53:21 UTC
  • mfrom: (24.2.14 sid)
  • Revision ID: james.westby@ubuntu.com-20110807175321-k80jrotzovldgu3c
* New upstream version
  + fixes various regressions
* removed dependency on libfuse2 (now used via dlopen, moved to Suggests)
* support new build-* targets in rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
149
149
        // abusing url class to extract base directory
150
150
 
151
151
        tHttpUrl url;
152
 
        acfg::tRepoData *pBackends(NULL);
 
152
        const acfg::tRepoData *pBackends(NULL);
153
153
 
154
154
        if (!url.SetHttpUrl(sFilePathRel))
155
155
        {
221
221
{
222
222
        sErr.clear();
223
223
        bool bSuccess=false;
224
 
        FiStatus fistate=FIST_FRESH;
225
224
        tFileItemPtr fi;
226
225
 
227
226
#ifdef DEBUG
239
238
 
240
239
        if (fi)
241
240
        {
242
 
                fistate = fi->Setup(true);
 
241
                fi->Setup(true);
243
242
                if(m_bForceDownload) // setup first and drop the contents then
244
243
                {
245
244
                        fi->ResetCacheState();
1389
1388
 
1390
1389
        if (!reader.OpenFile(CACHE_BASE+sPath))
1391
1390
        {
1392
 
                aclog::errnoFmter err;
1393
 
                SendFmt()<<"<font color=orange>WARNING: unable to open "<<sPath<<"("
1394
 
                                << err << ")</font><br>\n";
 
1391
                if(! GetFlags(sPath).forgiveDlErrors) // that would be ok (added by ignorelist), don't bother
 
1392
                {
 
1393
                        aclog::errnoFmter err;
 
1394
                        SendFmt()<<"<font color=orange>WARNING: unable to open "<<sPath
 
1395
                                        <<"(" << err << ")</font><br>\n";
 
1396
                }
1395
1397
                return false;
1396
1398
        }
1397
1399
 
1735
1737
 
1736
1738
                if( ! ParseAndProcessIndexFile(*this, it->first, itype))
1737
1739
                {
1738
 
                        SendChunk("<font color=red>An error occured while reading this file, some contents may have been ignored.</font><br>\n");
1739
 
                        m_nErrorCount+=!m_indexFilesRel[it->first].forgiveDlErrors;
 
1740
                        if(!m_indexFilesRel[it->first].forgiveDlErrors)
 
1741
                        {
 
1742
                                SendChunk("<font color=red>An error occured while reading this file, some contents may have been ignored.</font><br>\n");
 
1743
                                m_nErrorCount++;
 
1744
                        }
1740
1745
                        continue;
1741
1746
                }
1742
1747
                else if(!m_bNeedsStrictPathsHere && att.bros)
1860
1865
                        }
1861
1866
                        else
1862
1867
                        {
1863
 
                                if(!GetFlags(sPathRel).parseignore)
 
1868
                                tIfileAttribs at = GetFlags(sPathRel);
 
1869
                                if(!at.parseignore && !at.forgiveDlErrors)
 
1870
                                {
1864
1871
                                        SendFmt()<<"<font color=\"orange\">WARNING, header file missing for "
1865
1872
                                                <<sPathRel<<"</font><br>\n";
 
1873
                                }
1866
1874
                        }
1867
1875
                }
1868
1876