apt-got-cvs-commits Mailing List for apt-got mirror engine
Status: Beta
Brought to you by:
dun3
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
(19) |
May
(26) |
Jun
(32) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: Tobias H. <du...@bt...> - 2004-06-09 08:42:25
|
Update of /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/server In directory btfmx2:/tmp/cvs-serv32396/src/com/debianmirror/server Modified Files: MirrorHttpWorkerImpl.java Log Message: Cleaning logger interfaces Index: MirrorHttpWorkerImpl.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/server/MirrorHttpWorkerImpl.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** MirrorHttpWorkerImpl.java 9 Jun 2004 08:01:46 -0000 1.8 --- MirrorHttpWorkerImpl.java 9 Jun 2004 08:41:58 -0000 1.9 *************** *** 119,122 **** --- 119,123 ---- logger.fine("Parsed information:\r\n"+httpRequestHeader.getInfo()); + logger.info("File request for " + httpRequestHeader.getFileName()); // CHECKING IF THE HEADER IS VALID |
From: Tobias H. <du...@bt...> - 2004-06-09 08:42:25
|
Update of /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data In directory btfmx2:/tmp/cvs-serv32396/src/com/debianmirror/mirror/data Modified Files: DebianMirror.java DebianMirrorPurger.java Log Message: Cleaning logger interfaces Index: DebianMirrorPurger.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/DebianMirrorPurger.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DebianMirrorPurger.java 9 Jun 2004 08:01:45 -0000 1.4 --- DebianMirrorPurger.java 9 Jun 2004 08:41:58 -0000 1.5 *************** *** 55,58 **** --- 55,59 ---- } catch(Exception e) {} } + _logger.info("Starting Purger run"); if(_mirrorStateChange) { //TODO: Make purger an DebianMirrorObserver *************** *** 63,66 **** --- 64,68 ---- startSubDir(_filePool.getRootDir()); } + _logger.info("Purger run ended."); synchronized(this) { try { Index: DebianMirror.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/DebianMirror.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** DebianMirror.java 9 Jun 2004 08:01:45 -0000 1.8 --- DebianMirror.java 9 Jun 2004 08:41:58 -0000 1.9 *************** *** 84,87 **** --- 84,88 ---- // set next update _nextUpdate = new Date((new Date()).getTime() + 24*60*60*1000); + _logger.info("DebianMirror fully started."); while(true) { synchronized(this) { *************** *** 520,526 **** if(filename.startsWith("/trigger/new_package_lists")) { _stateChangePossible = true; try { synchronized(this) { ! this.notifyAll(); } } catch(Exception e) { --- 521,528 ---- if(filename.startsWith("/trigger/new_package_lists")) { _stateChangePossible = true; + _logger.info("Got triggered - starting new cycle"); try { synchronized(this) { ! notifyAll(); } } catch(Exception e) { |
From: Tobias H. <du...@bt...> - 2004-06-09 08:42:25
|
Update of /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/control In directory btfmx2:/tmp/cvs-serv32396/src/com/debianmirror/mirror/control Modified Files: MirrorControlSingleton.java Log Message: Cleaning logger interfaces Index: MirrorControlSingleton.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/control/MirrorControlSingleton.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** MirrorControlSingleton.java 2 Jun 2004 01:32:51 -0000 1.8 --- MirrorControlSingleton.java 9 Jun 2004 08:41:58 -0000 1.9 *************** *** 82,89 **** config = mcc; instancelogger = Logger.getLogger(config.getLoggerNamespace()); ! ConsoleHandler ch = new ConsoleHandler(); ! ch.setLevel(Level.ALL); ! instancelogger.addHandler(ch); ! instancelogger.setLevel(Level.ALL); mirrorModules = new TreeMap(); --- 82,89 ---- config = mcc; instancelogger = Logger.getLogger(config.getLoggerNamespace()); ! //ConsoleHandler ch = new ConsoleHandler(); ! //ch.setLevel(Level.CONFIG); ! //instancelogger.addHandler(ch); ! instancelogger.setLevel(Level.CONFIG); mirrorModules = new TreeMap(); |
From: Tobias H. <du...@bt...> - 2004-06-09 08:42:23
|
Update of /var/lib/cvs/apt-got/apt-got/src In directory btfmx2:/tmp/cvs-serv32396/src Modified Files: StandAloneAptGot.java Log Message: Cleaning logger interfaces Index: StandAloneAptGot.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/StandAloneAptGot.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** StandAloneAptGot.java 2 Jun 2004 01:32:51 -0000 1.6 --- StandAloneAptGot.java 9 Jun 2004 08:41:58 -0000 1.7 *************** *** 49,57 **** static { logger = Logger.getLogger("com.debianmirror"); ConsoleHandler ch = new ConsoleHandler(); - ch.setLevel(Level.CONFIG); logger.addHandler(ch); - logger.setLevel(Level.CONFIG); } --- 49,56 ---- static { logger = Logger.getLogger("com.debianmirror"); + logger.setLevel(Level.CONFIG); ConsoleHandler ch = new ConsoleHandler(); logger.addHandler(ch); } *************** *** 66,70 **** * @param args */ ! public static void main(String[] args) { try { if (args.length > 0) { --- 65,69 ---- * @param args */ ! public static synchronized void main(String[] args) { try { if (args.length > 0) { *************** *** 109,113 **** server = new Server(sc); server.start(); ! logger.fine("Server started"); server.join(); logger.fine("Application exits gratefully"); --- 108,112 ---- server = new Server(sc); server.start(); ! logger.info("Server started"); server.join(); logger.fine("Application exits gratefully"); |
From: Tobias H. <du...@bt...> - 2004-06-09 08:42:23
|
Update of /var/lib/cvs/apt-got/apt-got/conf/modules In directory btfmx2:/tmp/cvs-serv32396/conf/modules Modified Files: module_debian.xml Log Message: Cleaning logger interfaces Index: module_debian.xml =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/conf/modules/module_debian.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** module_debian.xml 1 Jun 2004 18:23:44 -0000 1.4 --- module_debian.xml 9 Jun 2004 08:41:58 -0000 1.5 *************** *** 9,13 **** </storage> <remote> ! <main>http://sluglug.ucsc.edu/debian</main> <backup>http://sluglug.ucsc.edu/debian</backup> </remote> --- 9,13 ---- </storage> <remote> ! <main>http://ftp.debian.org/debian</main> <backup>http://sluglug.ucsc.edu/debian</backup> </remote> |
From: Tobias H. <du...@bt...> - 2004-06-09 08:42:23
|
Update of /var/lib/cvs/apt-got/apt-got/conf In directory btfmx2:/tmp/cvs-serv32396/conf Modified Files: mirror.xml Log Message: Cleaning logger interfaces Index: mirror.xml =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/conf/mirror.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mirror.xml 1 Jun 2004 18:23:44 -0000 1.2 --- mirror.xml 9 Jun 2004 08:41:58 -0000 1.3 *************** *** 3,7 **** <namespace>StandAloneAptGot</namespace> <logger> ! <namespace>com.debianmirror2</namespace> <level>all</level> <filename>localhost_control_log.txt</filename> --- 3,7 ---- <namespace>StandAloneAptGot</namespace> <logger> ! <namespace>debianmirror2</namespace> <level>all</level> <filename>localhost_control_log.txt</filename> |
From: Tobias H. <du...@bt...> - 2004-06-09 08:02:40
|
Update of /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data In directory btfmx2:/tmp/cvs-serv32176/src/com/debianmirror/mirror/data Modified Files: DebianMirror.java DebianMirrorFile.java DebianMirrorFilePool.java DebianMirrorPurger.java DownloadWatcher.java SimpleMirrorFile.java SpecialMirrorFile.java XmlMirrorConf.java Log Message: Updating from sourceforge 0.8 Index: DebianMirrorPurger.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/DebianMirrorPurger.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DebianMirrorPurger.java 2 Jun 2004 01:32:51 -0000 1.3 --- DebianMirrorPurger.java 9 Jun 2004 08:01:45 -0000 1.4 *************** *** 47,58 **** } public void run() { - // wait until info is consistent to start - // the first run. - while(!_mirrorInfo.isConsistent()) { - try { - wait(1019); - } catch(Exception e) {} - } while(true) { if(_mirrorStateChange) { //TODO: Make purger an DebianMirrorObserver --- 47,58 ---- } public void run() { while(true) { + // wait until info is consistent to start + // the run. + while(!_mirrorInfo.isConsistent()) { + try { + wait(1019*300); + } catch(Exception e) {} + } if(_mirrorStateChange) { //TODO: Make purger an DebianMirrorObserver *************** *** 68,71 **** --- 68,72 ---- } catch(Exception e) {} } + } } *************** *** 111,114 **** --- 112,116 ---- // or an old debian file. // delete + _logger.info("Purging file = " + file.getAbsolutePath()); file.delete(); } *************** *** 118,121 **** --- 120,124 ---- // isDebianMirrorFile returns false. try { + _logger.info("Purging file = " + file.getAbsolutePath()); ((DebianMirrorFile)_fileCache.get(filePath)).purge(); } catch(Exception e) { *************** *** 158,162 **** public boolean accept(File pathname) { ! return (pathname.isFile() && pathname.canRead() && !pathname.getAbsolutePath().endsWith(".tmp")); } } --- 161,173 ---- public boolean accept(File pathname) { ! if(pathname.isFile()) { ! if(pathname.canRead()) { ! if(pathname.length() == 0) { ! return true; ! } ! return (!pathname.getAbsolutePath().endsWith(".tmp")); ! } ! } ! return false; } } Index: DebianMirrorFilePool.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/DebianMirrorFilePool.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** DebianMirrorFilePool.java 2 Jun 2004 01:32:51 -0000 1.11 --- DebianMirrorFilePool.java 9 Jun 2004 08:01:45 -0000 1.12 *************** *** 115,118 **** --- 115,120 ---- mf = createMirrorFile(fileName); _fileCache.put(fileName, mf); + } else { + _logger.fine("FileCache had a file for " + fileName); } } // end of synchronized(_fileCache) *************** *** 120,123 **** --- 122,126 ---- } else { // create uncached/unregistered remotefile + _logger.fine("Return " + fileName + " as uncacheable file"); mf = new UncachedMirrorFile(this, fileName); } Index: DebianMirrorFile.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/DebianMirrorFile.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** DebianMirrorFile.java 2 Jun 2004 01:32:51 -0000 1.7 --- DebianMirrorFile.java 9 Jun 2004 08:01:45 -0000 1.8 *************** *** 43,47 **** private MirrorModuleConf config; private URL mysite; - private URLConnection connection; private String remoteServer; private String fileName; --- 43,46 ---- *************** *** 76,79 **** --- 75,81 ---- */ public void connect() throws java.io.FileNotFoundException, java.net.MalformedURLException,java.io.IOException { + URLConnection connection; + + setState(MirrorFileState.DOWNLOADING); mysite = _filePool.getMirrorInfo().translatePathToURL(fileName); connection = mysite.openConnection(); *************** *** 84,89 **** logger.finest("length: " + getLength() + " mimeType: " + getMimeType() + " lastMod: " + getLastModified()); ! downloadWatcher = new DownloadWatcher(this, connection, localFile); downloadWatcher.start(); } --- 86,93 ---- logger.finest("length: " + getLength() + " mimeType: " + getMimeType() + " lastMod: " + getLastModified()); ! downloadWatcher = new DownloadWatcher(this, connection, localFile, logger); downloadWatcher.start(); + connection = null; + logger.finest("Done;"); } Index: SpecialMirrorFile.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/SpecialMirrorFile.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SpecialMirrorFile.java 2 Jun 2004 01:32:51 -0000 1.5 --- SpecialMirrorFile.java 9 Jun 2004 08:01:45 -0000 1.6 *************** *** 314,322 **** fos.flush(); _logger.finer("Release file " + f.getAbsolutePath() + " finished downloading"); - setState(MirrorFileState.LOCAL); if (!tempFile.renameTo(f)) { throw new IOException("Renaming of the file " + tempFile.getAbsolutePath() + " to " + f.getAbsolutePath() + " failed!"); } f.setLastModified(_lastModified); _logger.fine("Release file " + f.getAbsolutePath() + " successfully downloaded"); --- 314,323 ---- fos.flush(); _logger.finer("Release file " + f.getAbsolutePath() + " finished downloading"); if (!tempFile.renameTo(f)) { throw new IOException("Renaming of the file " + tempFile.getAbsolutePath() + " to " + f.getAbsolutePath() + " failed!"); } + setState(MirrorFileState.LOCAL); + f.setLastModified(_lastModified); _logger.fine("Release file " + f.getAbsolutePath() + " successfully downloaded"); Index: DebianMirror.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/DebianMirror.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** DebianMirror.java 2 Jun 2004 01:32:51 -0000 1.7 --- DebianMirror.java 9 Jun 2004 08:01:45 -0000 1.8 *************** *** 188,191 **** --- 188,195 ---- return false; } + if(path.indexOf("?") > -1) { + // can't do it! + return false; + } // every thing else should be at least be simple mirrored. return true; Index: XmlMirrorConf.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/XmlMirrorConf.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 Index: DownloadWatcher.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/DownloadWatcher.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DownloadWatcher.java 2 Jun 2004 01:32:51 -0000 1.5 --- DownloadWatcher.java 9 Jun 2004 08:01:45 -0000 1.6 *************** *** 34,37 **** --- 34,38 ---- import java.nio.channels.*; import java.util.Iterator; + import java.util.logging.Logger; class DownloadWatcher extends Thread { *************** *** 44,52 **** private int _fileSize; private boolean _useChannels; DownloadWatcher(MirrorFile mf, URLConnection connection, ! File localFile) { _parent = mf; _connection = connection; _fileSize = _connection.getContentLength(); --- 45,57 ---- private int _fileSize; private boolean _useChannels; + private Logger _logger; DownloadWatcher(MirrorFile mf, URLConnection connection, ! File localFile, ! Logger log) { _parent = mf; + _logger = log; + _logger.finest("Entering;"); _connection = connection; _fileSize = _connection.getContentLength(); *************** *** 72,75 **** --- 77,81 ---- public InputStream getInputStream() { + _logger.finest("Entering;"); try { if(_useChannels) { *************** *** 82,85 **** --- 88,92 ---- _pipeList.add(new CountingChannel((WritableByteChannel)sink)); } + _logger.finer("Returning as channel"); return Channels.newInputStream((ReadableByteChannel)source); } else { *************** *** 90,93 **** --- 97,101 ---- _pipeList.add(pair); } + _logger.finer("Returning as pipe"); return pis; } *************** *** 161,170 **** } // download finished ! map.force(); ! if (!_tempFile.renameTo(_localFile)) { ! _parent.setState(MirrorFileState.UNKNOWN); ! throw new java.io.IOException("Renaming of the file " + _localFile.getAbsolutePath() + " failed!"); ! } ! _parent.setState(MirrorFileState.LOCAL); // finalize sending data while(_pipeList.size() > 0) { --- 169,181 ---- } // download finished ! map.force(); ! if (!_tempFile.renameTo(_localFile)) { ! _parent.setState(MirrorFileState.UNKNOWN); ! throw new java.io.IOException("Renaming of the file " + _localFile.getAbsolutePath() + " failed!"); ! } ! _parent.setState(MirrorFileState.LOCAL); ! try { ! _localFile.setLastModified(_connection.getLastModified()); ! } catch(Exception ignore) {} // finalize sending data while(_pipeList.size() > 0) { *************** *** 177,181 **** channelPos = sink.getPosition(); temp = downloadPos - channelPos; ! if(_pipeList.size() == 1) { // if we are the only one in the list --- 188,192 ---- channelPos = sink.getPosition(); temp = downloadPos - channelPos; ! if(_pipeList.size() == 1) { // if we are the only one in the list *************** *** 282,286 **** throw new java.io.IOException("Renaming of the file " + _localFile + " failed!"); } ! // finalize all sending // --- 293,299 ---- throw new java.io.IOException("Renaming of the file " + _localFile + " failed!"); } ! try { ! _localFile.setLastModified(_connection.getLastModified()); ! } catch(Exception ignore) {} // finalize all sending // Index: SimpleMirrorFile.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/SimpleMirrorFile.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SimpleMirrorFile.java 2 Jun 2004 01:32:51 -0000 1.2 --- SimpleMirrorFile.java 9 Jun 2004 08:01:45 -0000 1.3 *************** *** 23,74 **** import java.net.URL; import java.util.Date; public class SimpleMirrorFile implements MirrorFile { ! private URLConnection _connection; public SimpleMirrorFile(MirrorFilePool mfp, String path) throws IOException { ! _connection = mfp.getMirrorInfo().translatePathToURL(path).openConnection(); } public InputStream getInputStream() { try { ! return _connection.getInputStream(); ! } catch (IOException ioe) { ! return null; ! } catch (NullPointerException npe) { return null; } } public long getLength() { ! try { ! return _connection.getContentLength(); ! } catch(NullPointerException npe) { ! return -1; ! } } public String getMimeType() { ! try { ! return _connection.getContentType(); ! } catch(NullPointerException npe) { ! return null; ! } } public long getLastModified() { ! try { ! return _connection.getLastModified(); ! } catch(NullPointerException npe) { ! return (new Date()).getTime(); ! } } public void purge() { ! // nothing can be done here } public void setState(MirrorFileState mfs) { ! // nothing to do } public MirrorFileState getState() { ! return MirrorFileState.DOWNLOADING; } public void checkState() { ! // nothing to do } --- 23,113 ---- import java.net.URL; import java.util.Date; + import java.util.logging.Level; + import java.util.logging.Logger; + import java.io.IOException; + import java.io.FileOutputStream; + import java.io.FileInputStream; + import java.io.BufferedInputStream; + import java.io.File; public class SimpleMirrorFile implements MirrorFile { ! private MirrorFilePool _filePool; ! ! private long _lastModified; ! private String _mimeType; ! private long _length; ! ! private URL _url; ! ! private Logger _logger; ! ! private MirrorFileState _fileState; ! private Object _stateLock; + private File _localFile; + public SimpleMirrorFile(MirrorFilePool mfp, String path) throws IOException { ! _filePool = mfp; ! _url = _filePool.getMirrorInfo().translatePathToURL(path); ! ! _stateLock = new Object(); ! _fileState = MirrorFileState.PENDING; ! ! _logger = Logger.getLogger(_filePool.getConfig().getLoggerNamespace()); ! ! _localFile = _filePool.translatePathToFile(path); ! checkState(); } + public InputStream getInputStream() { try { ! checkState(); ! return new FileInputStream(_localFile); ! } catch (Exception e) { ! setState(MirrorFileState.UNKNOWN); return null; } } public long getLength() { ! return _length; } public String getMimeType() { ! return _mimeType; } public long getLastModified() { ! return _lastModified; } public void purge() { ! _logger.finest("Entering;"); ! // we have to synchronize all the way... ! synchronized(_stateLock) { ! setState(MirrorFileState.PURGED); ! try { ! _localFile.delete(); ! } catch(Exception e) {} ! } } public void setState(MirrorFileState mfs) { ! synchronized(_stateLock) { ! _fileState = mfs; ! } } public MirrorFileState getState() { ! synchronized(_stateLock) { ! return _fileState; ! } } public void checkState() { ! try { ! if (!_localFile.isFile()) { ! _logger.finer(_localFile.getAbsolutePath() + ": Starting download"); ! downloadFile(); ! } else { ! setState(MirrorFileState.LOCAL); ! } ! } catch(Exception e) { ! _logger.log(Level.INFO, "Threw exception - setting state to UNKNOWN", e); ! setState(MirrorFileState.UNKNOWN); ! } } *************** *** 84,86 **** --- 123,186 ---- return true; } + + private synchronized void downloadFile() throws IOException { + _logger.finest("Entering;"); + setState(MirrorFileState.DOWNLOADING); + File tempFile = null; + FileOutputStream fos = null; + BufferedInputStream bis = null; + + try { + _localFile.delete(); + URLConnection conn = _url.openConnection(); + _mimeType = conn.getContentType(); + _lastModified = conn.getLastModified(); + _length = conn.getContentLength(); + + tempFile = File.createTempFile("apt", ".tmp", _localFile.getParentFile()); + if(_lastModified == 0) { + // last modidied was unknow for that connection. + _lastModified = (new Date()).getTime(); + } + fos = new FileOutputStream(tempFile); + bis = new BufferedInputStream(conn.getInputStream()); + byte[] buf = new byte[64]; + int b = bis.read(buf, 0, buf.length); + while(b > -1){ + fos.write(buf, 0, b); + b = bis.read(buf, 0, buf.length); + } + fos.flush(); + _logger.finer("Simple file " + _localFile.getAbsolutePath() + " finished downloading"); + if (!tempFile.renameTo(_localFile)) { + throw new IOException("Renaming of the file " + tempFile.getAbsolutePath() + " to " + _localFile.getAbsolutePath() + " failed!"); + } + setState(MirrorFileState.LOCAL); + try { + _localFile.setLastModified(_lastModified); + } catch(Exception ignore) {} + _length = _localFile.length(); + _logger.fine("Simple file " + _localFile.getAbsolutePath() + " successfully downloaded"); + } catch(IOException ioe) { + _logger.log(Level.FINE, "Caught IOException", ioe); + try { + purge(); + tempFile.delete(); + fos.close(); + bis.close(); + } catch(Exception e) { + // ignore + } + setState(MirrorFileState.UNKNOWN); + throw ioe; + } finally { + try { + fos.close(); + } catch(Exception e) {} + try { + bis.close(); + } catch(Exception e) {} + } + } + } |
From: Tobias H. <du...@bt...> - 2004-06-09 08:02:39
|
Update of /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/server In directory btfmx2:/tmp/cvs-serv32176/src/com/debianmirror/server Modified Files: MirrorHttpWorkerImpl.java ServerConfig.java Log Message: Updating from sourceforge 0.8 Index: ServerConfig.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/server/ServerConfig.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ServerConfig.java 2 Jun 2004 01:32:51 -0000 1.11 --- ServerConfig.java 9 Jun 2004 08:01:46 -0000 1.12 *************** *** 97,103 **** System.out.println("ServerConfig.getListeningPort(): threw nfex:\n" + nfex); temp = LISTENINGPORT; - } finally { - return temp; } } --- 97,102 ---- System.out.println("ServerConfig.getListeningPort(): threw nfex:\n" + nfex); temp = LISTENINGPORT; } + return temp; } *************** *** 115,121 **** System.out.println("ServerConfig.getNrOfWorkers(): threw nfex:\n" + nfex); temp = NR_OF_WORKERS; - } finally { - return temp; } } --- 114,119 ---- System.out.println("ServerConfig.getNrOfWorkers(): threw nfex:\n" + nfex); temp = NR_OF_WORKERS; } + return temp; } Index: MirrorHttpWorkerImpl.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/server/MirrorHttpWorkerImpl.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** MirrorHttpWorkerImpl.java 2 Jun 2004 01:32:51 -0000 1.7 --- MirrorHttpWorkerImpl.java 9 Jun 2004 08:01:46 -0000 1.8 *************** *** 187,190 **** --- 187,196 ---- return; } + InputStream is = mFile.getInputStream(); + if(is == null) { + logger.fine("InputStream was null"); + sendErrorResponse(404); + return; + } logger.fine("Creating header from mirror file"); *************** *** 206,210 **** BufferedOutputStream writer = new BufferedOutputStream( socket.getOutputStream() ); ! BufferedInputStream reader = new BufferedInputStream(mFile.getInputStream()); try { // Sending single bytes from file to client (very inefficient and not thread safe) --- 212,216 ---- BufferedOutputStream writer = new BufferedOutputStream( socket.getOutputStream() ); ! BufferedInputStream reader = new BufferedInputStream(is); try { // Sending single bytes from file to client (very inefficient and not thread safe) *************** *** 222,225 **** --- 228,232 ---- } catch(SocketException se) { logger.log(Level.FINE, "Possible abort from client", se); + } finally { try { writer.close(); |
From: Tobias H. <du...@bt...> - 2004-06-02 01:33:52
|
Update of /var/lib/cvs/apt-got/apt-got In directory btfmx2:/tmp/cvs-serv14609 Added Files: COPYING Log Message: Added GNU GPL --- NEW FILE: COPYING --- GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. <signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. |
From: Tobias H. <du...@bt...> - 2004-06-02 01:33:04
|
Update of /var/lib/cvs/apt-got/apt-got/src/org/debian/dpkg In directory btfmx2:/tmp/cvs-serv14425/src/org/debian/dpkg Modified Files: DebPackage.java DebPackageDescriptionException.java DebPackageImpl.java DebPackageList.java DebPackageListImpl.java Log Message: Added GNU GPL copyright information Index: DebPackageList.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/org/debian/dpkg/DebPackageList.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DebPackageList.java 28 Apr 2004 07:33:29 -0000 1.2 --- DebPackageList.java 2 Jun 2004 01:32:51 -0000 1.3 *************** *** 1,4 **** --- 1,21 ---- package org.debian.dpkg; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + public interface DebPackageList { public DebPackage getPackage(String name); Index: DebPackage.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/org/debian/dpkg/DebPackage.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DebPackage.java 19 May 2004 01:28:57 -0000 1.3 --- DebPackage.java 2 Jun 2004 01:32:51 -0000 1.4 *************** *** 1,4 **** --- 1,21 ---- package org.debian.dpkg; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + public interface DebPackage extends Comparable { public String getName(); Index: DebPackageDescriptionException.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/org/debian/dpkg/DebPackageDescriptionException.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DebPackageDescriptionException.java 28 Apr 2004 05:19:06 -0000 1.1 --- DebPackageDescriptionException.java 2 Jun 2004 01:32:51 -0000 1.2 *************** *** 1,4 **** --- 1,21 ---- package org.debian.dpkg; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + public class DebPackageDescriptionException extends Exception { public DebPackageDescriptionException() { Index: DebPackageImpl.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/org/debian/dpkg/DebPackageImpl.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DebPackageImpl.java 19 May 2004 01:28:57 -0000 1.3 --- DebPackageImpl.java 2 Jun 2004 01:32:51 -0000 1.4 *************** *** 1,4 **** --- 1,21 ---- package org.debian.dpkg; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.util.TreeMap; Index: DebPackageListImpl.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/org/debian/dpkg/DebPackageListImpl.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DebPackageListImpl.java 19 May 2004 01:28:57 -0000 1.4 --- DebPackageListImpl.java 2 Jun 2004 01:32:51 -0000 1.5 *************** *** 1,4 **** --- 1,21 ---- package org.debian.dpkg; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.util.HashMap; import java.util.TreeMap; |
From: Tobias H. <du...@bt...> - 2004-06-02 01:33:04
|
Update of /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/server In directory btfmx2:/tmp/cvs-serv14425/src/com/debianmirror/server Modified Files: Listener.java MirrorHttpWorkerImpl.java MirrorHttpWorkerImplFactory.java Server.java ServerConfig.java Worker.java WorkerCache.java WorkerImpl.java WorkerImplFactory.java Log Message: Added GNU GPL copyright information Index: MirrorHttpWorkerImplFactory.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/server/MirrorHttpWorkerImplFactory.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MirrorHttpWorkerImplFactory.java 6 Apr 2004 20:34:41 -0000 1.2 --- MirrorHttpWorkerImplFactory.java 2 Jun 2004 01:32:51 -0000 1.3 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.server; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.util.*; Index: WorkerImplFactory.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/server/WorkerImplFactory.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** WorkerImplFactory.java 4 Apr 2004 22:32:58 -0000 1.1.1.1 --- WorkerImplFactory.java 2 Jun 2004 01:32:51 -0000 1.2 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.server; + // Copyright 2004 Tobias Hertkorn, Jonas Jagerhok, Jamie Fitz-Gerald + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.util.*; Index: Listener.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/server/Listener.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Listener.java 1 Jun 2004 18:23:45 -0000 1.2 --- Listener.java 2 Jun 2004 01:32:51 -0000 1.3 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.server; + // Copyright 2004 Tobias Hertkorn, Jonas Jagerhok, Jamie Fitz-Gerald + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.lang.Thread; import java.net.ServerSocket; Index: Server.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/server/Server.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Server.java 1 Jun 2004 18:23:45 -0000 1.5 --- Server.java 2 Jun 2004 01:32:51 -0000 1.6 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.server; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.util.*; import com.debianmirror.server.ServerConfig; Index: WorkerImpl.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/server/WorkerImpl.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** WorkerImpl.java 4 Apr 2004 22:32:58 -0000 1.1.1.1 --- WorkerImpl.java 2 Jun 2004 01:32:51 -0000 1.2 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.server; + // Copyright 2004 Tobias Hertkorn, Jonas Jagerhok, Jamie Fitz-Gerald + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.io.IOException; import java.util.*; Index: ServerConfig.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/server/ServerConfig.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ServerConfig.java 1 Jun 2004 19:05:16 -0000 1.10 --- ServerConfig.java 2 Jun 2004 01:32:51 -0000 1.11 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.server; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.util.Properties; import java.io.FileInputStream; Index: WorkerCache.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/server/WorkerCache.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** WorkerCache.java 1 Jun 2004 18:23:45 -0000 1.2 --- WorkerCache.java 2 Jun 2004 01:32:51 -0000 1.3 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.server; + // Copyright 2004 Tobias Hertkorn, Jonas Jagerhok, Jamie Fitz-Gerald + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.lang.Thread; import java.util.*; *************** *** 6,9 **** --- 23,27 ---- import java.util.logging.Level; import java.lang.ThreadGroup; + /** * The WorkerCache hold a bunch of already started Worker threads. Index: Worker.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/server/Worker.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Worker.java 1 Jun 2004 18:23:45 -0000 1.3 --- Worker.java 2 Jun 2004 01:32:51 -0000 1.4 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.server; + // Copyright 2004 Tobias Hertkorn, Jonas Jagerhok, Jamie Fitz-Gerald + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import com.debianmirror.http.HttpRequestHeader; import com.debianmirror.mirror.control.MirrorControl; Index: MirrorHttpWorkerImpl.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/server/MirrorHttpWorkerImpl.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MirrorHttpWorkerImpl.java 1 Jun 2004 19:05:16 -0000 1.6 --- MirrorHttpWorkerImpl.java 2 Jun 2004 01:32:51 -0000 1.7 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.server; + // Copyright 2004 Tobias Hertkorn, Jonas Jagerhok + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import com.debianmirror.mirror.control.MirrorControlSingleton; import com.debianmirror.http.*; |
From: Tobias H. <du...@bt...> - 2004-06-02 01:33:04
|
Update of /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/control In directory btfmx2:/tmp/cvs-serv14425/src/com/debianmirror/mirror/control Modified Files: MirrorControl.java MirrorControlSingleton.java Log Message: Added GNU GPL copyright information Index: MirrorControlSingleton.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/control/MirrorControlSingleton.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** MirrorControlSingleton.java 1 Jun 2004 18:23:44 -0000 1.7 --- MirrorControlSingleton.java 2 Jun 2004 01:32:51 -0000 1.8 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.control; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.util.logging.*; import java.util.*; Index: MirrorControl.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/control/MirrorControl.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MirrorControl.java 1 Jun 2004 18:23:44 -0000 1.3 --- MirrorControl.java 2 Jun 2004 01:32:51 -0000 1.4 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.control; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.net.URI; import java.util.logging.Logger; |
From: Tobias H. <du...@bt...> - 2004-06-02 01:33:04
|
Update of /var/lib/cvs/apt-got/apt-got/src In directory btfmx2:/tmp/cvs-serv14425/src Modified Files: StandAloneAptGot.java Log Message: Added GNU GPL copyright information Index: StandAloneAptGot.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/StandAloneAptGot.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** StandAloneAptGot.java 19 May 2004 01:28:56 -0000 1.5 --- StandAloneAptGot.java 2 Jun 2004 01:32:51 -0000 1.6 *************** *** 2,5 **** --- 2,22 ---- import java.util.logging.*; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + /** * <p>Starts the stand alone http server.</p> |
From: Tobias H. <du...@bt...> - 2004-06-02 01:33:03
|
Update of /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/xml In directory btfmx2:/tmp/cvs-serv14425/src/com/debianmirror/xml Modified Files: XmlHelper.java Log Message: Added GNU GPL copyright information Index: XmlHelper.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/xml/XmlHelper.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** XmlHelper.java 10 Apr 2004 02:18:58 -0000 1.1 --- XmlHelper.java 2 Jun 2004 01:32:51 -0000 1.2 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.xml; + // Copyright 2004 Tobias Hertkorn, Jonas Jagerhok, Jamie Fitz-Gerald + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import org.w3c.dom.Element; import org.w3c.dom.NodeList; |
From: Tobias H. <du...@bt...> - 2004-06-02 01:33:03
|
Update of /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/module In directory btfmx2:/tmp/cvs-serv14425/src/com/debianmirror/mirror/module Modified Files: DebianMirrorModule.java MirrorModule.java Log Message: Added GNU GPL copyright information Index: MirrorModule.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/module/MirrorModule.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MirrorModule.java 1 Jun 2004 18:23:45 -0000 1.5 --- MirrorModule.java 2 Jun 2004 01:32:51 -0000 1.6 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.module; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import com.debianmirror.mirror.data.MirrorModuleConf; import com.debianmirror.mirror.data.MirrorFile; Index: DebianMirrorModule.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/module/DebianMirrorModule.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DebianMirrorModule.java 1 Jun 2004 18:23:45 -0000 1.4 --- DebianMirrorModule.java 2 Jun 2004 01:32:51 -0000 1.5 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.module; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import com.debianmirror.mirror.data.MirrorModuleConf; import com.debianmirror.mirror.data.DebianMirrorModuleConf; |
From: Tobias H. <du...@bt...> - 2004-06-02 01:33:03
|
Update of /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/http In directory btfmx2:/tmp/cvs-serv14425/src/com/debianmirror/http Modified Files: HttpRequestException.java HttpRequestHeader.java HttpResponseHeader.java HttpSubDirFinder.java Log Message: Added GNU GPL copyright information Index: HttpSubDirFinder.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/http/HttpSubDirFinder.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** HttpSubDirFinder.java 19 May 2004 01:30:37 -0000 1.1 --- HttpSubDirFinder.java 2 Jun 2004 01:32:51 -0000 1.2 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.http; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.util.TreeSet; import java.io.IOException; Index: HttpRequestHeader.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/http/HttpRequestHeader.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** HttpRequestHeader.java 4 Apr 2004 22:32:58 -0000 1.1.1.1 --- HttpRequestHeader.java 2 Jun 2004 01:32:51 -0000 1.2 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.http; + // Copyright 2004 Tobias Hertkorn, Jonas Jagerhok + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.io.BufferedReader; import java.io.InputStream; Index: HttpRequestException.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/http/HttpRequestException.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** HttpRequestException.java 4 Apr 2004 22:32:58 -0000 1.1.1.1 --- HttpRequestException.java 2 Jun 2004 01:32:51 -0000 1.2 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.http; + // Copyright 2004 Tobias Hertkorn, Jonas Jagerhok + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + /** Exception thrown in HttpRequestHeader. Adds the human readable reason phrase to known error codes * Index: HttpResponseHeader.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/http/HttpResponseHeader.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** HttpResponseHeader.java 4 Apr 2004 22:32:58 -0000 1.1.1.1 --- HttpResponseHeader.java 2 Jun 2004 01:32:51 -0000 1.2 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.http; + // Copyright 2004 Tobias Hertkorn, Jonas Jagerhok + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import com.debianmirror.mirror.data.MirrorFile; |
From: Tobias H. <du...@bt...> - 2004-06-02 01:33:03
|
Update of /var/lib/cvs/apt-got/apt-got In directory btfmx2:/tmp/cvs-serv14425 Modified Files: build.xml Log Message: Added GNU GPL copyright information Index: build.xml =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/build.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** build.xml 1 Jun 2004 18:23:44 -0000 1.3 --- build.xml 2 Jun 2004 01:32:50 -0000 1.4 *************** *** 6,9 **** --- 6,27 ---- JONAS JAGERHOK 2004-02-12 + + Copyright 2004 Tobias Hertkorn, Jonas Jagerhok + This file is part of apt-got. + + apt-got is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + apt-got is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with apt-got; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + --> |
From: Tobias H. <du...@bt...> - 2004-06-02 01:33:03
|
Update of /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/debian In directory btfmx2:/tmp/cvs-serv14425/src/com/debianmirror/debian Modified Files: DebianPackageListInfo.java DebianReleaseInfo.java Log Message: Added GNU GPL copyright information Index: DebianReleaseInfo.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/debian/DebianReleaseInfo.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DebianReleaseInfo.java 19 May 2004 01:38:53 -0000 1.1 --- DebianReleaseInfo.java 2 Jun 2004 01:32:51 -0000 1.2 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.debian; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import com.debianmirror.mirror.data.BasicFileInfo; Index: DebianPackageListInfo.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/debian/DebianPackageListInfo.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DebianPackageListInfo.java 24 May 2004 09:37:22 -0000 1.1 --- DebianPackageListInfo.java 2 Jun 2004 01:32:51 -0000 1.2 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.debian; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + public interface DebianPackageListInfo { } |
From: Tobias H. <du...@bt...> - 2004-06-02 01:33:03
|
Update of /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/util In directory btfmx2:/tmp/cvs-serv14425/src/com/debianmirror/util Modified Files: ByteHelper.java CollectionHelper.java Log Message: Added GNU GPL copyright information Index: ByteHelper.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/util/ByteHelper.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ByteHelper.java 1 Jun 2004 18:23:45 -0000 1.2 --- ByteHelper.java 2 Jun 2004 01:32:51 -0000 1.3 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.util; + // Copyright 2004 Tobias Hertkorn, Jonas Jagerhok, Jamie Fitz-Gerald + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.io.IOException; Index: CollectionHelper.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/util/CollectionHelper.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CollectionHelper.java 1 Jun 2004 19:05:17 -0000 1.3 --- CollectionHelper.java 2 Jun 2004 01:32:51 -0000 1.4 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.util; + // Copyright 2004 Tobias Hertkorn, Jonas Jagerhok, Jamie Fitz-Gerald + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.util.Iterator; import java.util.Map; |
Update of /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data In directory btfmx2:/tmp/cvs-serv14425/src/com/debianmirror/mirror/data Modified Files: BasicFileInfo.java DebianMirror.java DebianMirrorFile.java DebianMirrorFilePool.java DebianMirrorInfo.java DebianMirrorModuleConf.java DebianMirrorObserver.java DebianMirrorPurger.java DebianMirrorSubject.java DebianPackageListMirrorFile.java DebianPackageListObserver.java DebianReleaseMirrorFile.java Distributer.java DownloadWatcher.java Downloader.java FileCache.java FileCacheChange.java FileCacheObserver.java FileCacheSubject.java FileInfoException.java FileNotFoundMirrorFile.java FilePoolInfo.java GzipDebianPackageListMirrorFile.java LinkStructureChangedException.java LinkSupport.java LocalMirrorFile.java MirrorConf.java MirrorControlConf.java MirrorControlConfException.java MirrorFile.java MirrorFilePool.java MirrorFileState.java MirrorFileStateObserver.java MirrorFileStateSubject.java MirrorInfo.java MirrorModuleConf.java MirrorModuleConfException.java RemoteMirrorFile.java SimpleMirrorFile.java SimpleMirrorModuleConf.java SpecialMirrorFile.java UncachedMirrorFile.java XmlDebianMirrorModuleConf.java XmlMirrorConf.java XmlMirrorModuleConf.java XmlMirrorModuleConfLoader.java XmlSimpleMirrorModuleConf.java Log Message: Added GNU GPL copyright information Index: DebianMirrorPurger.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/DebianMirrorPurger.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DebianMirrorPurger.java 1 Jun 2004 19:05:16 -0000 1.2 --- DebianMirrorPurger.java 2 Jun 2004 01:32:51 -0000 1.3 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.io.File; import java.io.FileFilter; Index: DebianMirrorFilePool.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/DebianMirrorFilePool.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** DebianMirrorFilePool.java 1 Jun 2004 18:23:44 -0000 1.10 --- DebianMirrorFilePool.java 2 Jun 2004 01:32:51 -0000 1.11 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.io.IOException; import java.io.File; Index: DebianMirrorInfo.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/DebianMirrorInfo.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DebianMirrorInfo.java 1 Jun 2004 18:23:44 -0000 1.3 --- DebianMirrorInfo.java 2 Jun 2004 01:32:51 -0000 1.4 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import com.debianmirror.debian.DebianPackageListInfo; Index: XmlSimpleMirrorModuleConf.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/XmlSimpleMirrorModuleConf.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** XmlSimpleMirrorModuleConf.java 11 Apr 2004 00:36:12 -0000 1.3 --- XmlSimpleMirrorModuleConf.java 2 Jun 2004 01:32:51 -0000 1.4 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.io.File; import java.io.IOException; Index: DebianMirrorSubject.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/DebianMirrorSubject.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DebianMirrorSubject.java 1 Jun 2004 18:23:44 -0000 1.2 --- DebianMirrorSubject.java 2 Jun 2004 01:32:51 -0000 1.3 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + /** * The <code>DebianMirrorSubject</code> is used as counterpart of the {@link DebianMirrorObserver}. Index: SimpleMirrorModuleConf.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/SimpleMirrorModuleConf.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SimpleMirrorModuleConf.java 7 Apr 2004 06:57:49 -0000 1.1 --- SimpleMirrorModuleConf.java 2 Jun 2004 01:32:51 -0000 1.2 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + public interface SimpleMirrorModuleConf extends MirrorModuleConf { } Index: DebianPackageListMirrorFile.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/DebianPackageListMirrorFile.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DebianPackageListMirrorFile.java 1 Jun 2004 18:23:44 -0000 1.3 --- DebianPackageListMirrorFile.java 2 Jun 2004 01:32:51 -0000 1.4 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.util.logging.Level; import java.util.Set; Index: Distributer.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/Distributer.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Distributer.java 19 May 2004 01:30:37 -0000 1.1 --- Distributer.java 2 Jun 2004 01:32:51 -0000 1.2 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.io.InputStream; Index: LinkStructureChangedException.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/LinkStructureChangedException.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** LinkStructureChangedException.java 1 Jun 2004 18:23:44 -0000 1.1 --- LinkStructureChangedException.java 2 Jun 2004 01:32:51 -0000 1.2 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + public class LinkStructureChangedException extends Exception { public LinkStructureChangedException() { Index: DebianMirrorFile.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/DebianMirrorFile.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DebianMirrorFile.java 1 Jun 2004 19:05:16 -0000 1.6 --- DebianMirrorFile.java 2 Jun 2004 01:32:51 -0000 1.7 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.util.logging.Logger; import java.util.logging.Level; Index: Downloader.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/Downloader.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Downloader.java 19 May 2004 01:30:37 -0000 1.1 --- Downloader.java 2 Jun 2004 01:32:51 -0000 1.2 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.nio.ByteBuffer; Index: GzipDebianPackageListMirrorFile.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/GzipDebianPackageListMirrorFile.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** GzipDebianPackageListMirrorFile.java 24 May 2004 09:37:22 -0000 1.1 --- GzipDebianPackageListMirrorFile.java 2 Jun 2004 01:32:51 -0000 1.2 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.io.File; import java.io.InputStream; Index: XmlDebianMirrorModuleConf.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/XmlDebianMirrorModuleConf.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** XmlDebianMirrorModuleConf.java 11 Apr 2004 00:36:12 -0000 1.3 --- XmlDebianMirrorModuleConf.java 2 Jun 2004 01:32:51 -0000 1.4 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.io.File; import java.io.IOException; Index: XmlMirrorModuleConfLoader.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/XmlMirrorModuleConfLoader.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** XmlMirrorModuleConfLoader.java 11 Apr 2004 00:36:12 -0000 1.2 --- XmlMirrorModuleConfLoader.java 2 Jun 2004 01:32:51 -0000 1.3 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.io.File; import java.io.FileFilter; Index: DebianMirrorModuleConf.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/DebianMirrorModuleConf.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DebianMirrorModuleConf.java 7 Apr 2004 06:57:49 -0000 1.1 --- DebianMirrorModuleConf.java 2 Jun 2004 01:32:51 -0000 1.2 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + public interface DebianMirrorModuleConf extends MirrorModuleConf { } Index: MirrorModuleConfException.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/MirrorModuleConfException.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MirrorModuleConfException.java 9 Apr 2004 00:22:58 -0000 1.1 --- MirrorModuleConfException.java 2 Jun 2004 01:32:51 -0000 1.2 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + public class MirrorModuleConfException extends java.lang.RuntimeException { public MirrorModuleConfException() { Index: XmlMirrorModuleConf.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/XmlMirrorModuleConf.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** XmlMirrorModuleConf.java 10 Apr 2004 02:20:44 -0000 1.1 --- XmlMirrorModuleConf.java 2 Jun 2004 01:32:51 -0000 1.2 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.io.File; Index: FilePoolInfo.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/FilePoolInfo.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FilePoolInfo.java 6 May 2004 03:40:57 -0000 1.1 --- FilePoolInfo.java 2 Jun 2004 01:32:51 -0000 1.2 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + public interface FilePoolInfo { public long getFilePoolSize(); Index: MirrorControlConf.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/MirrorControlConf.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MirrorControlConf.java 6 Apr 2004 20:34:41 -0000 1.2 --- MirrorControlConf.java 2 Jun 2004 01:32:51 -0000 1.3 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + /** * <p> The MirrorControlConf interface is used to layout the methods that are needed for mirror configuration.</p> Index: SpecialMirrorFile.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/SpecialMirrorFile.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SpecialMirrorFile.java 25 May 2004 23:28:56 -0000 1.4 --- SpecialMirrorFile.java 2 Jun 2004 01:32:51 -0000 1.5 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.util.logging.Level; import java.util.logging.Logger; Index: UncachedMirrorFile.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/UncachedMirrorFile.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** UncachedMirrorFile.java 19 May 2004 01:30:38 -0000 1.1 --- UncachedMirrorFile.java 2 Jun 2004 01:32:51 -0000 1.2 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.io.IOException; import java.io.InputStream; Index: MirrorControlConfException.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/MirrorControlConfException.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MirrorControlConfException.java 6 Apr 2004 20:37:53 -0000 1.1 --- MirrorControlConfException.java 2 Jun 2004 01:32:51 -0000 1.2 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + public class MirrorControlConfException extends java.lang.RuntimeException { public MirrorControlConfException() { Index: FileCacheSubject.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/FileCacheSubject.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FileCacheSubject.java 19 May 2004 01:30:37 -0000 1.1 --- FileCacheSubject.java 2 Jun 2004 01:32:51 -0000 1.2 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + public interface FileCacheSubject { public void attach(FileCacheObserver fco); Index: DebianMirror.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/DebianMirror.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DebianMirror.java 1 Jun 2004 19:41:48 -0000 1.6 --- DebianMirror.java 2 Jun 2004 01:32:51 -0000 1.7 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.net.URL; import java.net.MalformedURLException; Index: XmlMirrorConf.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/XmlMirrorConf.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** XmlMirrorConf.java 1 Jun 2004 19:05:16 -0000 1.14 --- XmlMirrorConf.java 2 Jun 2004 01:32:51 -0000 1.15 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.net.URL; import java.io.File; Index: LinkSupport.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/LinkSupport.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** LinkSupport.java 24 May 2004 09:37:22 -0000 1.1 --- LinkSupport.java 2 Jun 2004 01:32:51 -0000 1.2 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + public interface LinkSupport { public abstract void addLink(String path); Index: MirrorFile.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/MirrorFile.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MirrorFile.java 1 Jun 2004 18:23:44 -0000 1.3 --- MirrorFile.java 2 Jun 2004 01:32:51 -0000 1.4 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn, Jonas Jagerhok, Jamie Fitz-Gerald + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.util.*; import java.io.InputStream; Index: FileCacheObserver.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/FileCacheObserver.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FileCacheObserver.java 19 May 2004 01:30:37 -0000 1.1 --- FileCacheObserver.java 2 Jun 2004 01:32:51 -0000 1.2 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + public interface FileCacheObserver { public void cacheChange(FileCache fc, int change); Index: FileNotFoundMirrorFile.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/FileNotFoundMirrorFile.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FileNotFoundMirrorFile.java 19 May 2004 01:30:37 -0000 1.1 --- FileNotFoundMirrorFile.java 2 Jun 2004 01:32:51 -0000 1.2 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.io.FileNotFoundException; import java.io.IOException; Index: MirrorModuleConf.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/MirrorModuleConf.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MirrorModuleConf.java 10 Apr 2004 02:18:58 -0000 1.3 --- MirrorModuleConf.java 2 Jun 2004 01:32:51 -0000 1.4 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn, Jonas Jagerhok, Jamie Fitz-Gerald + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.io.File; Index: FileCache.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/FileCache.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FileCache.java 1 Jun 2004 18:23:44 -0000 1.3 --- FileCache.java 2 Jun 2004 01:32:51 -0000 1.4 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.util.HashMap; import java.lang.ref.Reference; Index: MirrorFileStateSubject.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/MirrorFileStateSubject.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MirrorFileStateSubject.java 19 May 2004 01:30:38 -0000 1.1 --- MirrorFileStateSubject.java 2 Jun 2004 01:32:51 -0000 1.2 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + public interface MirrorFileStateSubject { public void attach(MirrorFileStateObserver mfso); Index: MirrorFileStateObserver.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/MirrorFileStateObserver.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MirrorFileStateObserver.java 19 May 2004 01:30:38 -0000 1.1 --- MirrorFileStateObserver.java 2 Jun 2004 01:32:51 -0000 1.2 *************** *** 1,4 **** --- 1,29 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + /** + * Every class interested in the changes of file states must + * implement this interface and register with the + * {@link MirrorFileStateSubject}. + * <br />By doing that the observer will notice state changes. + * + * @author Tobias Hertkorn + */ public interface MirrorFileStateObserver { public void stateChange(MirrorFile mf, MirrorFileState newState); Index: MirrorConf.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/MirrorConf.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** MirrorConf.java 4 Apr 2004 22:32:58 -0000 1.1.1.1 --- MirrorConf.java 2 Jun 2004 01:32:51 -0000 1.2 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.net.URL; Index: FileInfoException.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/FileInfoException.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FileInfoException.java 19 May 2004 01:30:37 -0000 1.1 --- FileInfoException.java 2 Jun 2004 01:32:51 -0000 1.2 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + public class FileInfoException extends Exception { public FileInfoException() { Index: MirrorFilePool.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/MirrorFilePool.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** MirrorFilePool.java 1 Jun 2004 18:23:44 -0000 1.7 --- MirrorFilePool.java 2 Jun 2004 01:32:51 -0000 1.8 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.io.File; import java.io.IOException; Index: DebianReleaseMirrorFile.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/DebianReleaseMirrorFile.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DebianReleaseMirrorFile.java 24 May 2004 09:22:56 -0000 1.2 --- DebianReleaseMirrorFile.java 2 Jun 2004 01:32:51 -0000 1.3 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.util.logging.Level; import java.util.logging.Logger; Index: BasicFileInfo.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/BasicFileInfo.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BasicFileInfo.java 1 Jun 2004 18:23:44 -0000 1.2 --- BasicFileInfo.java 2 Jun 2004 01:32:51 -0000 1.3 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + /** * Data class to store basic file infos (size and md5sum) in lists. Index: DebianPackageListObserver.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/DebianPackageListObserver.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DebianPackageListObserver.java 19 May 2004 01:30:37 -0000 1.1 --- DebianPackageListObserver.java 2 Jun 2004 01:32:51 -0000 1.2 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + public interface DebianPackageListObserver { public void newDebianPackageList(String[] delta); Index: RemoteMirrorFile.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/RemoteMirrorFile.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RemoteMirrorFile.java 1 Jun 2004 18:23:44 -0000 1.3 --- RemoteMirrorFile.java 2 Jun 2004 01:32:51 -0000 1.4 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.util.*; import java.io.InputStream; Index: DownloadWatcher.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/DownloadWatcher.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DownloadWatcher.java 19 May 2004 01:28:56 -0000 1.4 --- DownloadWatcher.java 2 Jun 2004 01:32:51 -0000 1.5 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.io.File; import java.net.URLConnection; Index: SimpleMirrorFile.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/SimpleMirrorFile.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SimpleMirrorFile.java 19 May 2004 01:30:38 -0000 1.1 --- SimpleMirrorFile.java 2 Jun 2004 01:32:51 -0000 1.2 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import java.io.IOException; import java.io.InputStream; Index: MirrorFileState.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/MirrorFileState.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MirrorFileState.java 19 May 2004 01:28:56 -0000 1.2 --- MirrorFileState.java 2 Jun 2004 01:32:51 -0000 1.3 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License + // along with apt-got; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + public final class MirrorFileState implements java.io.Serializable { public static final MirrorFileState UNKNOWN; Index: FileCacheChange.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/FileCacheChange.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FileCacheChange.java 6 May 2004 03:40:57 -0000 1.1 --- FileCacheChange.java 2 Jun 2004 01:32:51 -0000 1.2 *************** *** 1,4 **** --- 1,21 ---- package com.debianmirror.mirror.data; + // Copyright 2004 Tobias Hertkorn + // This file is part of apt-got. + // + // apt-got is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2 of the License, or + // (at your option) any later version. + // + // apt-got is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of... [truncated message content] |
From: Tobias H. <du...@bt...> - 2004-06-01 19:41:58
|
Update of /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data In directory btfmx2:/tmp/cvs-serv13587/src/com/debianmirror/mirror/data Modified Files: DebianMirror.java Log Message: Now the refreshing mechanism starts every 24 hours or if you state /trigger/new_package_lists after your module URL (eg http://localhost/debian/trigger/new_package_lists). Index: DebianMirror.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/DebianMirror.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DebianMirror.java 1 Jun 2004 19:05:16 -0000 1.5 --- DebianMirror.java 1 Jun 2004 19:41:48 -0000 1.6 *************** *** 11,14 **** --- 11,15 ---- import java.util.logging.Logger; import java.util.logging.Level; + import java.util.Date; import com.debianmirror.http.HttpSubDirFinder; import com.debianmirror.util.CollectionHelper; *************** *** 34,41 **** --- 35,45 ---- private LinkedList _newLists; + private Date _nextUpdate; + public DebianMirror(DebianMirrorFilePool dmfp, String remoteURL) throws IOException { _state = INITIALIZING; _stateLock = new Object(); _filePool = dmfp; + _nextUpdate = new Date(); _remoteURL = new URL(remoteURL); _logger = _filePool.getLogger(); *************** *** 61,64 **** --- 65,70 ---- _stateLock.notifyAll(); } + // set next update + _nextUpdate = new Date((new Date()).getTime() + 24*60*60*1000); while(true) { synchronized(this) { *************** *** 68,71 **** --- 74,82 ---- } // implement maintenance + if((new Date()).after(_nextUpdate)) { + _logger.info("Starting next updating cycle"); + _nextUpdate = new Date((new Date()).getTime() + 24*60*60*1000); + _stateChangePossible = true; + } if(_stateChangePossible) { _stateChangePossible = false; |
From: Tobias H. <du...@bt...> - 2004-06-01 19:05:31
|
Update of /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data In directory btfmx2:/tmp/cvs-serv13469/src/com/debianmirror/mirror/data Modified Files: DebianMirror.java DebianMirrorFile.java DebianMirrorPurger.java XmlMirrorConf.java Log Message: Minor upgrades for the Purger. Now DebianMirrorFiles that got obsolete but still are in the FileCache get purged correctly. Index: DebianMirrorPurger.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/DebianMirrorPurger.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DebianMirrorPurger.java 1 Jun 2004 18:23:44 -0000 1.1 --- DebianMirrorPurger.java 1 Jun 2004 19:05:16 -0000 1.2 *************** *** 39,43 **** while(true) { if(_mirrorStateChange) { ! _mirrorStateChange = false; // do SOMETHING ;) startSubDir(_filePool.getRootDir()); --- 39,46 ---- while(true) { if(_mirrorStateChange) { ! //TODO: Make purger an DebianMirrorObserver ! // and change the next line to false. ! //For now we just do this every 12 hours. ! _mirrorStateChange = true; // do SOMETHING ;) startSubDir(_filePool.getRootDir()); *************** *** 45,49 **** synchronized(this) { try { ! wait(24*60*60*1000); } catch(Exception e) {} } --- 48,52 ---- synchronized(this) { try { ! wait(12*60*60*1000); } catch(Exception e) {} } *************** *** 92,95 **** --- 95,112 ---- // delete file.delete(); + } + } else if(!_mirrorInfo.isDebianMirrorFile(filePath)) { + // file was in fileCache - but + // we can purge if it is a DebianMirrorFile object and + // isDebianMirrorFile returns false. + try { + ((DebianMirrorFile)_fileCache.get(filePath)).purge(); + } catch(Exception e) { + //TODO make this more finegrained? + + // We got an exception that is typically a ClassCastEx + // because it wasn't a DebianMirrorFile or + // a NullPointerEx because we lost the WeakReference. + // We can safely ignore that. } } Index: DebianMirrorFile.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/DebianMirrorFile.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DebianMirrorFile.java 1 Jun 2004 18:23:44 -0000 1.5 --- DebianMirrorFile.java 1 Jun 2004 19:05:16 -0000 1.6 *************** *** 163,166 **** --- 163,174 ---- } public void purge() { + logger.finest("Entering;"); + // we have to synchronize all the way... + synchronized(_stateLock) { + setState(MirrorFileState.PURGED); + try { + localFile.delete(); + } catch(Exception e) {} + } } public void setState(MirrorFileState mfs) { Index: DebianMirror.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/DebianMirror.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DebianMirror.java 1 Jun 2004 18:23:44 -0000 1.4 --- DebianMirror.java 1 Jun 2004 19:05:16 -0000 1.5 *************** *** 134,140 **** } } ! if(_logger.isLoggable(Level.FINEST)) { ! _logger.finest("known DebianmirrorFiles now: " + CollectionHelper.keysToString(_debianMirrorFiles)); ! } } --- 134,140 ---- } } ! //if(_logger.isLoggable(Level.FINEST)) { ! // _logger.finest("known DebianmirrorFiles now: " + CollectionHelper.keysToString(_debianMirrorFiles)); ! //} } Index: XmlMirrorConf.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/XmlMirrorConf.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 |
From: Tobias H. <du...@bt...> - 2004-06-01 19:05:29
|
Update of /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/util In directory btfmx2:/tmp/cvs-serv13469/src/com/debianmirror/util Modified Files: CollectionHelper.java Log Message: Minor upgrades for the Purger. Now DebianMirrorFiles that got obsolete but still are in the FileCache get purged correctly. Index: CollectionHelper.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/util/CollectionHelper.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CollectionHelper.java 1 Jun 2004 18:23:45 -0000 1.2 --- CollectionHelper.java 1 Jun 2004 19:05:17 -0000 1.3 *************** *** 42,46 **** * <br />A list of all found keys. One key per line. * ! * @param set the <code>Set</code> to use. * @return the generated <code>String</code>. */ --- 42,46 ---- * <br />A list of all found keys. One key per line. * ! * @param s the <code>Set</code> to use. * @return the generated <code>String</code>. */ |
From: Tobias H. <du...@bt...> - 2004-06-01 19:05:29
|
Update of /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/server In directory btfmx2:/tmp/cvs-serv13469/src/com/debianmirror/server Modified Files: MirrorHttpWorkerImpl.java ServerConfig.java Log Message: Minor upgrades for the Purger. Now DebianMirrorFiles that got obsolete but still are in the FileCache get purged correctly. Index: ServerConfig.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/server/ServerConfig.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 Index: MirrorHttpWorkerImpl.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/server/MirrorHttpWorkerImpl.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MirrorHttpWorkerImpl.java 19 May 2004 01:28:57 -0000 1.5 --- MirrorHttpWorkerImpl.java 1 Jun 2004 19:05:16 -0000 1.6 *************** *** 64,69 **** /** ! * <p>Creates a new instance and assignes the <code>MirrorControl</code> ! * to this instance.</p> */ public MirrorHttpWorkerImpl(ServerConfig sc) { --- 64,69 ---- /** ! * Creates a new instance and assignes the <code>MirrorControl</code> ! * to this instance. */ public MirrorHttpWorkerImpl(ServerConfig sc) { |
Update of /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data In directory btfmx2:/tmp/cvs-serv13208/src/com/debianmirror/mirror/data Modified Files: BasicFileInfo.java DebianMirror.java DebianMirrorFile.java DebianMirrorFilePool.java DebianMirrorInfo.java DebianMirrorObserver.java DebianMirrorSubject.java DebianPackageListMirrorFile.java FileCache.java LocalMirrorFile.java MirrorFile.java MirrorFilePool.java MirrorInfo.java RemoteMirrorFile.java XmlMirrorConf.java Added Files: DebianMirrorPurger.java LinkStructureChangedException.java Log Message: Jump to 0.8pre4 Started documentation. Created a brute force purger based on package lists. created hidden urls to trigger updates. --- NEW FILE: DebianMirrorPurger.java --- package com.debianmirror.mirror.data; import java.io.File; import java.io.FileFilter; import java.util.logging.Logger; public class DebianMirrorPurger extends Thread { private DebianMirrorFilePool _filePool; private DebianMirrorInfo _mirrorInfo; private FileCache _fileCache; private boolean _mirrorStateChange; private FileFilter _dirFilter; private FileFilter _filesFilter; private Logger _logger; public DebianMirrorPurger(DebianMirrorFilePool dmfp, FileCache fc) { _filePool = dmfp; _fileCache = fc; _logger = _filePool.getLogger(); _mirrorInfo = (DebianMirrorInfo)_filePool.getMirrorInfo(); _dirFilter = new DirectoryFilter(); _filesFilter = new ReadableFileFilter(); _mirrorStateChange = true; start(); try { setPriority(Thread.MIN_PRIORITY + 1); } catch(Exception e) { //ignore } } public void run() { // wait until info is consistent to start // the first run. while(!_mirrorInfo.isConsistent()) { try { wait(1019); } catch(Exception e) {} } while(true) { if(_mirrorStateChange) { _mirrorStateChange = false; // do SOMETHING ;) startSubDir(_filePool.getRootDir()); } synchronized(this) { try { wait(24*60*60*1000); } catch(Exception e) {} } } } private void startSubDir(File dir) { _logger.finest("Entering; dir = " + dir.getAbsolutePath()); if(_mirrorInfo.isConsistent()) { int i; try { sleep(10); } catch(Exception e) {} File[] list = dir.listFiles(_filesFilter); // check files if(list.length > 0) { for(i = 0; i < list.length; i++) { checkFile(list[i]); } } list = dir.listFiles(_dirFilter); // recurse into subdirs if(list.length > 0) { for(i = 0; i < list.length; i++) { startSubDir(list[i]); } } } } private void checkFile(File file) { try { _logger.finest("Entering; file = " + file.getAbsolutePath()); try { sleep(10); } catch(Exception e) {} if(_mirrorInfo.isConsistent()) { String filePath = _filePool.translateFileToPath(file); _logger.finer("Got " + filePath + " as path"); // test if still in use if(!_fileCache.has(filePath)) { if((!_mirrorInfo.isDebianPackageList(filePath)) && (!_mirrorInfo.isDebianReleaseFile(filePath)) && (!_mirrorInfo.isDebianMirrorFile(filePath))) { // it is a simplemirrorfile that is not in use // or an old debian file. // delete file.delete(); } } } } catch(Exception e) { //either a security exception or a nullpointer } } } class DirectoryFilter implements FileFilter { DirectoryFilter() { } public boolean accept(File pathname) { //if its a normal file -> ignore //is the most common fall through criteria -> test first if(pathname.isFile()) { return false; } if(pathname.isHidden()) { return false; } if(!pathname.canRead()) { return false; } return pathname.isDirectory(); } } class ReadableFileFilter implements FileFilter { ReadableFileFilter() { } public boolean accept(File pathname) { return (pathname.isFile() && pathname.canRead() && !pathname.getAbsolutePath().endsWith(".tmp")); } } Index: DebianMirrorFilePool.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/DebianMirrorFilePool.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** DebianMirrorFilePool.java 25 May 2004 23:28:56 -0000 1.9 --- DebianMirrorFilePool.java 1 Jun 2004 18:23:44 -0000 1.10 *************** *** 11,14 **** --- 11,26 ---- import java.util.logging.Level; + /** + * A <code>MirrorFilePool</code> with some specialisations for the Debian archive. + * <br />This Class employes a <code>FileCache</code> to be able to reuse Objects. + * <p>It uses a namespace mechanism (the identifier found + * in the <code>DebianMirrorModuleConf</code>) to create instances. These + * instances are accessable through the <code>getInstance</code> method. + * + * @author Tobias Hertkorn + * @see FileCache + * @see DebianMirrorModuleConf + * @see MirrorFilePool + */ public class DebianMirrorFilePool implements MirrorFilePool { *************** *** 19,22 **** --- 31,35 ---- private FileCache _fileCache; private DebianMirror _debianMirror; + private DebianMirrorPurger _purger; static { *************** *** 24,27 **** --- 37,47 ---- } + /** + * Creates a file pool representation with the given configuration. + * <br />Should never be used directly. Use {@link #getInstance}. + * + * @param mmc the configuration to use. + * @exception IOException is thrown if the root directory could not get created. + */ protected DebianMirrorFilePool(DebianMirrorModuleConf mmc) throws IOException { _config = mmc; *************** *** 31,36 **** --- 51,64 ---- _debianMirror = new DebianMirror(this, _config.getRemoteServer()); + _purger = new DebianMirrorPurger(this, _fileCache); } // end of constructor + /** + * Returns (and if necessary creates) the file pool instance. + * + * @param mmc the configuration to use. + * @return the file pool instance for that configuration. + * @exception IOException is thrown, if the constructure threw one. + */ public static DebianMirrorFilePool getInstance(DebianMirrorModuleConf mmc) throws IOException { DebianMirrorFilePool instance = null; *************** *** 58,61 **** --- 86,92 ---- _logger.finer(fileName + ": returning as a package list."); mf = _debianMirror.getDebianPackageListMirrorFile(fileName); + } else if(_debianMirror.isDebianReleaseFile(fileName)) { + _logger.finer(fileName + ": returning as a release file."); + mf = _debianMirror.getDebianReleaseMirrorFile(fileName); } else { _logger.finer(fileName + " is a cacheable file."); *************** *** 89,95 **** return _debianMirror; } - public DebianMirrorInfo getDebianMirrorInfo() { - return _debianMirror; - } public Logger getLogger() { return _logger; --- 120,123 ---- *************** *** 110,113 **** --- 138,151 ---- } return f; + } + + public String translateFileToPath(File path) { + _logger.finest("Entering; path = " + path.getAbsolutePath()); + + if(!path.getAbsolutePath().startsWith(_rootDir.getAbsolutePath())) { + // whot?!? + return null; + } + return new String(path.getAbsolutePath().substring(_rootDir.getAbsolutePath().length())); } Index: DebianMirrorInfo.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/DebianMirrorInfo.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DebianMirrorInfo.java 25 May 2004 23:28:56 -0000 1.2 --- DebianMirrorInfo.java 1 Jun 2004 18:23:44 -0000 1.3 *************** *** 3,14 **** --- 3,87 ---- import com.debianmirror.debian.DebianPackageListInfo; + /** + * Interface to more Debian specific information about the mirror. + * + * @author Tobias Hertkorn + */ public interface DebianMirrorInfo extends MirrorInfo { + + /** + * Tests whether a file denoted by the path parameter looks like a Debian package list. + * @param path the file path relative to the root of the mirror module. + * @return <code>true</code> if the file looks like a Debian package list. + */ public boolean isDebianPackageList(String path); + + /** + * Tests whether a file denoted by the path parameter looks like a Debian package. + * @param path the file path relative to the root of the mirror module. + * @return <code>true</code> if the file looks like a Debian package. + */ public boolean isDebianMirrorFile(String path); + + /** + * Tests whether a file denoted by the path parameter looks like a Debian Release file. + * @param path the file path relative to the root of the mirror module. + * @return <code>true</code> if the file looks like a Debian Release file. + */ + public boolean isDebianReleaseFile(String path); + + /** + * Returns the size the file is supposed to have. + * <br /><code>-1</code> if no information is available. + * + * @param path the file path relative to the root of the mirror module. + * @return the file size of <code>-1</code> if no info is available. + */ public long getFileSize(String path); + + /** + * Returns the md5sum the file is supposed to have. + * <br /><code>null</code> if no information is available. + * + * @param path the file path relative to the root of the mirror module. + * @return the file's md5sum or <code>null</code> if no info is available. + */ public String getMd5sum(String path); + + /** + * not yet implemented. + */ public String getPackage(String path); + + /** + * not yet implemented. + */ public String getVersion(String path); + + /** + * Returns the Debian package list representation denoted by the path parameter. + * <br /><code>null</code> if there is no such Debian package list. + * + * @param path the file path relative to the root of the mirror module. + * @return the Debian package list or <code>null</code>. + */ public MirrorFile getDebianPackageListMirrorFile(String path); + + /** + * Returns the Debian Release file representation denoted by the path parameter. + * <br /><code>null</code> if there is no such Debian Release file. + * + * @param path the file path relative to the root of the mirror module. + * @return the Debian Release file or <code>null</code>. + */ + public MirrorFile getDebianReleaseMirrorFile(String path); + + /** + * Returns the Debian package list info representation denoted by the path parameter. + * <br /><code>null</code> if there is no such Debian package list info. + * + * @param path the file path relative to the root of the mirror module. + * @return the Debian package list info or <code>null</code>. + */ public DebianPackageListInfo getDebianPackageListInfo(String path); } Index: DebianMirrorSubject.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/DebianMirrorSubject.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DebianMirrorSubject.java 19 May 2004 01:30:37 -0000 1.1 --- DebianMirrorSubject.java 1 Jun 2004 18:23:44 -0000 1.2 *************** *** 1,7 **** --- 1,28 ---- package com.debianmirror.mirror.data; + /** + * The <code>DebianMirrorSubject</code> is used as counterpart of the {@link DebianMirrorObserver}. + * <br />Through this interface Observer can attach themselfs to get information about + * statechanges. + * + * @see DebianMirrorObserver + * @author Tobias Hertkorn + */ public interface DebianMirrorSubject { + /** + * Attach the given <code>DebianMirrorObserver</code> to this instance. + * @param dmo the observer to attach + */ public void attach(DebianMirrorObserver dmo); + + /** + * Detach the given <code>DebianMirrorObserver</code> from this instance. + * @param dmo the observer to detach + */ public void detach(DebianMirrorObserver dmo); + + /** + * Notify the attached observer. + */ public void notifyDebianMirrorObserver(); } Index: DebianPackageListMirrorFile.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/DebianPackageListMirrorFile.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DebianPackageListMirrorFile.java 24 May 2004 09:22:56 -0000 1.2 --- DebianPackageListMirrorFile.java 1 Jun 2004 18:23:44 -0000 1.3 *************** *** 41,45 **** public DebianPackageListMirrorFile(DebianMirrorFilePool mfp, String path, BasicFileInfo bfi, DebianMirror dm) throws IOException, FileInfoException { super(mfp, path, (path.indexOf("binary-i386") > 0)); ! _knownFiles = new HashMap(); _deletedFiles = new TreeSet(); --- 41,45 ---- public DebianPackageListMirrorFile(DebianMirrorFilePool mfp, String path, BasicFileInfo bfi, DebianMirror dm) throws IOException, FileInfoException { super(mfp, path, (path.indexOf("binary-i386") > 0)); ! _knownFiles = new HashMap(1024); _deletedFiles = new TreeSet(); --- NEW FILE: LinkStructureChangedException.java --- package com.debianmirror.mirror.data; public class LinkStructureChangedException extends Exception { public LinkStructureChangedException() { super(); } public LinkStructureChangedException(String message) { super(message); } public LinkStructureChangedException(String message, Throwable cause) { super(message, cause); } public LinkStructureChangedException(Throwable cause) { super(cause); } } Index: DebianMirrorFile.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/DebianMirrorFile.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DebianMirrorFile.java 25 May 2004 23:28:56 -0000 1.4 --- DebianMirrorFile.java 1 Jun 2004 18:23:44 -0000 1.5 *************** *** 11,14 **** --- 11,20 ---- import java.io.FileNotFoundException; + /** + * This is a specialized <code>MirrorFile</code> to mirror Debian package files. + * <br />As of 0.8 it does not provide verification. + * + * @author Tobias Hertkorn + */ public class DebianMirrorFile implements MirrorFile { *************** *** 30,33 **** --- 36,45 ---- private Object _stateLock; + /** + * Creates an instance for a specific configuration and filepath. + * + * @param dmfp the <code>DebianMirrorFilePool</code> to get the configuration information from. + * @param myFileName the filepath the instance should mirror. + */ public DebianMirrorFile(DebianMirrorFilePool dmfp, String myFileName) throws IOException { _filePool = dmfp; *************** *** 42,45 **** --- 54,61 ---- } + /** + * The old way to start the mirroring. + * @deprecated as of 0.7 + */ public void connect() throws java.io.FileNotFoundException, java.net.MalformedURLException,java.io.IOException { mysite = _filePool.getMirrorInfo().translatePathToURL(fileName); *************** *** 65,69 **** return new FileInputStream(localFile); } catch(FileNotFoundException fnfex) { ! if(checkStatus()) {; return getInputStream(); } else { --- 81,85 ---- return new FileInputStream(localFile); } catch(FileNotFoundException fnfex) { ! if(checkStatus()) { return getInputStream(); } else { *************** *** 95,102 **** --- 111,129 ---- } + /** + * @deprecated as of 0.7 + * @exception IllegalStateException is always thrown. + */ public void setIfModifiedSince(long ifModifiedSince) throws IllegalStateException { throw new IllegalStateException("MirrorFile already connected!"); } + /** + * Should get deprecated soon. + * <br />Once the <code>DebianMirrorFile</code> is fully compliant to the new + * interfaces this method will get obsolete. + * + * @return <code>true</code> if the status check created readable files. <code>false</code> otherwise. + */ public boolean checkStatus() { synchronized(_stateLock) { Index: DebianMirror.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/DebianMirror.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DebianMirror.java 25 May 2004 23:28:56 -0000 1.3 --- DebianMirror.java 1 Jun 2004 18:23:44 -0000 1.4 *************** *** 40,50 **** _remoteURL = new URL(remoteURL); _logger = _filePool.getLogger(); ! _debianMirrorFiles = new HashMap(); ! _debianPackageLists = new HashMap(); ! _debianReleaseFiles = new HashMap(); _logger.info("Starting the debian mirror representation"); - // start the maintenance thread _newLists = new LinkedList(); _stateChangePossible = false; start(); } --- 40,50 ---- _remoteURL = new URL(remoteURL); _logger = _filePool.getLogger(); ! _debianMirrorFiles = new HashMap(8192); ! _debianPackageLists = new HashMap(128); ! _debianReleaseFiles = new HashMap(64); _logger.info("Starting the debian mirror representation"); _newLists = new LinkedList(); _stateChangePossible = false; + // start the maintenance thread start(); } *************** *** 67,78 **** } catch(Exception e) {} } - workPendingListChanges(); // implement maintenance if(_stateChangePossible) { _stateChangePossible = false; _logger.fine("Need to check for state changes"); ! // if(releaseFilesChanged()) { ! // restartMirror(); ! // } } } --- 67,93 ---- } catch(Exception e) {} } // implement maintenance if(_stateChangePossible) { _stateChangePossible = false; + synchronized(_stateLock) { + _state = INITIALIZING; + _stateLock.notifyAll(); + } + _logger.fine("Need to check for state changes"); ! try { ! if(releaseFilesChanged()) { ! updatePackageLists(); ! } ! } catch(LinkStructureChangedException lsce) { ! _logger.log(Level.INFO, "The link structure of the remote archive changed -> deep restart of the server", lsce); ! completeRestartMirror(); ! } ! ! } ! workPendingListChanges(); ! synchronized(_stateLock) { ! _state = RUNNING; ! _stateLock.notifyAll(); } } *************** *** 125,128 **** --- 140,149 ---- + public boolean isConsistent() { + synchronized(_stateLock) { + // not initializing and no pending lists + return ((_state != INITIALIZING) && (_newLists.size() == 0)); + } + } public long getLocalMirrorSize() { return -1; *************** *** 158,162 **** } } ! public MirrorFile getDebianPackageListMirrorFile(String path) { try { --- 179,188 ---- } } ! public boolean isDebianReleaseFile(String path) { ! synchronized(_debianReleaseFiles) { ! return _debianReleaseFiles.containsKey(path); ! } ! } ! public MirrorFile getDebianPackageListMirrorFile(String path) { try { *************** *** 177,180 **** --- 203,217 ---- } } + public MirrorFile getDebianReleaseMirrorFile(String path) { + try { + synchronized(_debianReleaseFiles) { + return (MirrorFile)_debianReleaseFiles.get(path); + } + } catch(Exception e) { + _logger.log(Level.INFO, path + " threw an exception", e); + return null; + } + } + public String getMd5sum(String path) { return null; *************** *** 220,225 **** downloadMissingPackageLists(); } - // save memory by creating a hashmap that is EXACTLY the right size for this mirror - _debianReleaseFiles = new HashMap(_debianReleaseFiles); System.gc(); } --- 257,260 ---- *************** *** 315,320 **** private void sortKnownFiles() { _logger.finest("Entering;"); ! _debianPackageLists = new HashMap(); ! _debianMirrorFiles = new HashMap(); DebianReleaseMirrorFile drmf = null; for(Iterator i = _debianReleaseFiles.values().iterator(); i.hasNext(); ) { --- 350,355 ---- private void sortKnownFiles() { _logger.finest("Entering;"); ! _debianPackageLists = new HashMap(128); ! _debianMirrorFiles = new HashMap(8192); DebianReleaseMirrorFile drmf = null; for(Iterator i = _debianReleaseFiles.values().iterator(); i.hasNext(); ) { *************** *** 466,468 **** --- 501,516 ---- } + private boolean releaseFilesChanged() throws LinkStructureChangedException { + // redownload all of them for now + throw new LinkStructureChangedException("Nothing else implemented yet"); + } + private void updatePackageLists() { + } + private void completeRestartMirror() { + try { + startDebianMirror(true); + } catch(Exception e) { + _logger.log(Level.SEVERE, "Something very wrong happened while restarting the Mirror representation", e); + } + } } Index: XmlMirrorConf.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/XmlMirrorConf.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** XmlMirrorConf.java 25 May 2004 23:28:56 -0000 1.12 --- XmlMirrorConf.java 1 Jun 2004 18:23:44 -0000 1.13 *************** *** 18,22 **** * Contains all configuration values used to run the mirror/mirrorcontrol. * ! * $Id$ * @author Tobias Hertkorn */ --- 18,22 ---- * Contains all configuration values used to run the mirror/mirrorcontrol. * ! * <p>$Id$ * @author Tobias Hertkorn */ *************** *** 38,48 **** // initiates a mirrorconfig from the given filename /** ! *<p> Creates a XmlMirrorConf object for the given file name</p> ! * ! * @param myFileName name of the file that is being worked with. */ public XmlMirrorConf() { } public void setExtraInfo(String extrainfo) { fileName = extrainfo; --- 38,50 ---- // initiates a mirrorconfig from the given filename /** ! * Creates an empty XmlMirrorConf object. */ public XmlMirrorConf() { } + /** + * In case of the <code>XmlMirrorConf</code> this extrainfo is the path to the XML document to parse. + * @param extrainfo the path to the XML to parse. + */ public void setExtraInfo(String extrainfo) { fileName = extrainfo; Index: MirrorFile.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/MirrorFile.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MirrorFile.java 19 May 2004 01:28:56 -0000 1.2 --- MirrorFile.java 1 Jun 2004 18:23:44 -0000 1.3 *************** *** 7,11 **** /** ! * <p> The MirrorFile Class is responsible for the framework that is used in both the <code>LocalMirrorFile</code> and the <code>RemoteMirrorFile</code> </p> * * @author E01 - Tobias Hertkorn, Jonas Jagerhok, Jamie Fitz-Gerald --- 7,14 ---- /** ! * Every file that should be send to the client through the engine ! * must inplement this interface. ! * <br />It works as an abstraction layer to present the file to the ! * server, without revealing the details how the data is stored. * * @author E01 - Tobias Hertkorn, Jonas Jagerhok, Jamie Fitz-Gerald *************** *** 18,22 **** /** ! * <p>Returns the InputStream of this File</p> * * @return the InputStream that contains the data of the File --- 21,25 ---- /** ! * Returns the data for this file as an <code>InputStream</code>. * * @return the InputStream that contains the data of the File *************** *** 25,49 **** /** ! * <p>Returns the length of the file</p> */ public long getLength(); /** ! * <p>Returns the mime-type of the file</p> */ public String getMimeType(); /** ! * <p>Returns the last modified date of the file</p> */ public long getLastModified(); public void purge(); public void setState(MirrorFileState mfs); public MirrorFileState getState(); public void checkState(); public boolean forceVerify() throws IOException; public boolean isVerified(); public String getMd5sum(); --- 28,100 ---- /** ! * Returns the length of the file. ! * ! * @return the file length or <code>-1</code> if unknown/unpredictable. */ public long getLength(); /** ! * Returns the mime-type of the file. ! * ! * @return the mime type of the file or <code>null</code> if unknown. */ public String getMimeType(); /** ! * Returns the last modified date of the file. ! *<br />See <code>java.lang.Date</code> for details on the nature ! * of this long number. ! * ! * @return the date of the last modification. */ public long getLastModified(); + /** + * Try to delete itself. + * <br />If this method is called the <code>MirrorFile</code> + * should try to purge itself from any local storage device. + */ public void purge(); + /** + * Set the internal state of the <code>MirrorFile</code>. + * + * @param mfs the new <code>MirrorFileState</code>. + */ public void setState(MirrorFileState mfs); + + /** + * Returns the internal state of the <code>MirrorFile</code>. + * + * @return the internal state. + */ public MirrorFileState getState(); + + /** + * If executed the <code>MirrorFile</code> must check its internal state. + * <br />If it finds a divergence it must try to reset or alter the internal state. + */ public void checkState(); + + /** + * Should be used after a {@link #isVerified()} returned false. + * <br />If this method returns false something substancially is wrong. + * + * @exception IOException if an io error occured while reverifying. + * @return <code>true</code>, if the verification succeeded. <code>false</code> otherwise. + */ public boolean forceVerify() throws IOException; + + /** + * Tests whether the <code>MirrorFile</code> seems to be verified. + * @return <code>true</code>, if it seems to be verified. <code>false</code> otherwise. + */ public boolean isVerified(); + + /** + * Get the Md5sum calculated by the last verification. + * + * @return the md5sum. + */ public String getMd5sum(); Index: FileCache.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/FileCache.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FileCache.java 25 May 2004 23:28:56 -0000 1.2 --- FileCache.java 1 Jun 2004 18:23:44 -0000 1.3 *************** *** 1,13 **** package com.debianmirror.mirror.data; ! import java.util.TreeMap; public class FileCache implements MirrorFileStateObserver, FileCacheSubject, DebianMirrorObserver { ! private TreeMap _fileList; private MirrorFile _fileNotFoundMirrorFile; public FileCache() { ! _fileList = new TreeMap(); _fileNotFoundMirrorFile = new FileNotFoundMirrorFile(); } --- 1,15 ---- package com.debianmirror.mirror.data; ! import java.util.HashMap; ! import java.lang.ref.Reference; ! import java.lang.ref.WeakReference; public class FileCache implements MirrorFileStateObserver, FileCacheSubject, DebianMirrorObserver { ! private HashMap _fileList; private MirrorFile _fileNotFoundMirrorFile; public FileCache() { ! _fileList = new HashMap(8192); _fileNotFoundMirrorFile = new FileNotFoundMirrorFile(); } *************** *** 19,23 **** // there is a key registered // test if WeakReference got lost ! if(_fileList.get(path) == null) { return false; } else { --- 21,26 ---- // there is a key registered // test if WeakReference got lost ! if(((Reference)_fileList.get(path)).get() == null) { ! _fileList.remove(path); return false; } else { *************** *** 31,36 **** --- 34,41 ---- } } catch(ClassCastException cce) { + _fileList.remove(path); return false; } catch(NullPointerException npe) { + _fileList.remove(path); return false; } *************** *** 39,46 **** public MirrorFile get(String path) { try { ! return (MirrorFile)_fileList.get(path); } catch(ClassCastException cce) { return null; } catch(NullPointerException npe) { return null; } --- 44,55 ---- public MirrorFile get(String path) { try { ! synchronized(_fileList) { ! return ((MirrorFile)((Reference)_fileList.get(path)).get()); ! } } catch(ClassCastException cce) { + _fileList.remove(path); return null; } catch(NullPointerException npe) { + _fileList.remove(path); return null; } *************** *** 55,59 **** public void put(String path, MirrorFile mf) { ! _fileList.put(path, mf); } // end put --- 64,70 ---- public void put(String path, MirrorFile mf) { ! synchronized(_fileList) { ! _fileList.put(path, new WeakReference(mf)); ! } } // end put Index: MirrorFilePool.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/MirrorFilePool.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MirrorFilePool.java 19 May 2004 01:28:56 -0000 1.6 --- MirrorFilePool.java 1 Jun 2004 18:23:44 -0000 1.7 *************** *** 7,15 **** --- 7,78 ---- import java.util.logging.Logger; + /** + * The MirrorFilePool is the abstraction of the local file repository. + * <br />That means in particular, that it knows how to translate request path names into + * filesystem <code>File</code> objects and back. + * <br />In addition it knows which <code>MirrorFile</code> is appropriated to create for + * that specific request-path (if it should get stored locally, etc.) by asking the + * <code>MirrorInfo</code>. + * + * @author Tobias Hertkorn + * @see MirrorInfo + */ public interface MirrorFilePool { + + /** + * Creates/reuses the requested <code>MirrorFile</code>. + * + * @param fileName the request path. + * @return the <code>MirrorFile</code> associated with <code>fileName</code>. + */ public MirrorFile getMirrorFile(String fileName); + + /** + * Should get phased out. + * <br />As soon as all <code>MirrorFile</code> are altered to fit new interaction profile. + * + * @return the configuration used to start this file pool instance. + */ + public MirrorModuleConf getConfig(); + + /** + * <code>MirrorFile</code> should use {@link #translatePathToFile} and {@link #translateFileToPath}. + * <br />This direct access is still necessary for the <code>Purger</code>. + * + * @return the abstraction of the root of the local repository. + */ public File getRootDir(); + + /** + * Returns the mirror info for this file pool. + * + * @return the mirror info for this file pool. + * @see MirrorInfo + */ public MirrorInfo getMirrorInfo(); + + /** + * Translates a request path name into a <code>File</code> object. + * <br />In addition it creates all directories nescessary to store the file. + * + * @exception IOException is thrown, if the creation of the subdirectories failed. + * @return the location to store/access the file locally. + */ public File translatePathToFile(String path) throws IOException; + + /** + * Translates a <code>File</code> object back into a request path. + * + * @return the request path as a <code>String</code>. <code>null</code>, if the path couldn't be translated. + */ + public String translateFileToPath(File path); + + /** + * Returns the <code>Logger</code> object associated with this file pool. + * <br />Every instance of e.g. <code>MirrorFile</code> should use this method to get a + * <code>Logger</code>. + * + * @return the <code>Logger</code>. + */ public Logger getLogger(); } Index: BasicFileInfo.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/BasicFileInfo.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** BasicFileInfo.java 19 May 2004 01:30:37 -0000 1.1 --- BasicFileInfo.java 1 Jun 2004 18:23:44 -0000 1.2 *************** *** 1,8 **** --- 1,20 ---- package com.debianmirror.mirror.data; + /** + * Data class to store basic file infos (size and md5sum) in lists. + * <br />These objects are read-only and comparable. Size and md5 are not checked. + * + * @author Tobias Hertkorn + */ public class BasicFileInfo { private String _md5; private long _size; private int _hash; + + /** + * creates a read-only objects with the given size and md5 stored. + * @param size of the file as long + * @param md5 of the file as String + */ public BasicFileInfo(long size, String md5) { _hash = 0; *************** *** 10,19 **** --- 22,54 ---- _md5 = md5; } + /** + * Get the Md5sum stored. + * + * @return the internally stored md5sum + */ public String getMd5() { return _md5; } + /** + * Get the size stored. + * + * @return the internally stored size + */ public long getSize() { return _size; } + /** + * Indicates whether another BasicFileInfo object is equal to this one. + * <br />This <code>equals</code> method returns true, if and only if one of the + * following is true: + * <ul> + * <li>reference points to this object (this == o)</li> + * <li>o.getClass() == this.getClass()<br /> + * and both md5 match<br /> + * and both sizes match</li> + * </ul> + * @param o the reference object with which to compare. + * @return <code>true</code> if this object matches the o argument; <code>false</code> otherwise. + */ public boolean equals(Object o) { try { *************** *** 28,31 **** --- 63,71 ---- return false; } + /** + * Returns a hash code value for the object. + * <br />Uses the <code>hashCode</code> methode of the <code>String</code> class. + * @return the hashCode computed by (new String(_size + _md5)).hashCode(). + */ public int hashCode() { if(_hash == 0) { Index: RemoteMirrorFile.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/RemoteMirrorFile.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RemoteMirrorFile.java 19 May 2004 01:28:56 -0000 1.2 --- RemoteMirrorFile.java 1 Jun 2004 18:23:44 -0000 1.3 *************** *** 10,14 **** /** ! * <p> The RemoteMiorrFile connects to a remote URL to produce an InputFileStream for a given filename from the remote server. </p> * * @author E01 - Tobias Hertkorn, Jamie Fitz-Gerald --- 10,17 ---- /** ! * The RemoteMiorrFile connects to a remote URL to produce an ! * InputStream for a given filename from the remote server. ! * <br />The data does not get stored locally. ! * <p>Should get depreciated soon in favour of {@link UncachedMirrorFile}. * * @author E01 - Tobias Hertkorn, Jamie Fitz-Gerald *************** *** 69,74 **** /** ! * <p>Creates a new RemoteMirrorFile instance</p> * * @param myFileName The name of the file that will be connected to from the remote mirror site. */ --- 72,78 ---- /** ! * Creates a new RemoteMirrorFile instance. * + * @deprecated this is the old way to get <code>MirrorFile</code> instances. * @param myFileName The name of the file that will be connected to from the remote mirror site. */ *************** *** 80,85 **** } ! public RemoteMirrorFile(DebianMirrorFilePool dmfp, String myFileName) { ! this(dmfp.getConfig(),myFileName); } --- 84,95 ---- } ! /** ! * Create a <code>RemoteMirrorFile</code> instance for this MirrorFilePool. ! * ! * @param mfp the MirrorFilePool to use. (To get the config from) ! * @param myFileName the path to the file. ! */ ! public RemoteMirrorFile(MirrorFilePool mfp, String myFileName) { ! this(mfp.getConfig(),myFileName); } *************** *** 140,144 **** return true; } - } // end RemoteMirrorFile --- 150,153 ---- Index: DebianMirrorObserver.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/DebianMirrorObserver.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DebianMirrorObserver.java 19 May 2004 01:30:37 -0000 1.1 --- DebianMirrorObserver.java 1 Jun 2004 18:23:44 -0000 1.2 *************** *** 1,8 **** --- 1,41 ---- package com.debianmirror.mirror.data; + /** + * The <code>DebianMirrorObserver</code> is used as counterpart of the {@link DebianMirrorSubject}. + * <br />All classes implementing this interfaces are interested in a specific type of state + * changes the <code>DebianMirrorSubject</code> goes through. + * + * @see DebianMirrorSubject + * @author Tobias Hertkorn + */ public interface DebianMirrorObserver { + + /** + * Called, if the statechange produced information about new packages. + * + * @param delta the path names of the new Debian packages. + */ public void newDebianPackages(String[] delta); + + /** + * Called, if the statechange produced information about changed packages. + * <br />That means the md5sum and/or the size of the package changed. + * + *@param delta the path names of the changed Debian packages. + */ public void changedDebianPackages(String[] delta); + + /** + * Called, if the statechange produced information about deleted packages. + * <br />That means these packages are no longer listed in any one of the package lists. + * + * @param delta the path names of the deleted Debian packages. + */ public void deletedDebianPackages(String[] delta); + + /** + * Called, if there have been statechanges. + * <br />Used for observer, that do not need the detailed infos. + */ public void possibleMirrorChanges(); } Index: LocalMirrorFile.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/LocalMirrorFile.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LocalMirrorFile.java 19 May 2004 01:28:56 -0000 1.2 --- LocalMirrorFile.java 1 Jun 2004 18:23:44 -0000 1.3 *************** *** 8,12 **** /** ! * <p>The LocalMirrorFile creates an InputStream given a file name that corresponds to a local file.</p> * * @author E01 - Tobias Hertkorn, Jonas Jagerhok, Jamie Fitz-Gerald --- 8,13 ---- /** ! * The LocalMirrorFile creates an InputStream given a file name that corresponds to a local file. ! * <p>Should get depreciated soon, as it is an old-style mirror file. * * @author E01 - Tobias Hertkorn, Jonas Jagerhok, Jamie Fitz-Gerald *************** *** 22,30 **** /** ! * <p>Creates a new instance of the LocalMirrorFile class</p> * * @param myFile This is a File object that corresponds to the local file in the server cache. */ - public LocalMirrorFile(File myFile) { file = myFile; --- 23,30 ---- /** ! * Creates a new instance of the LocalMirrorFile class. * * @param myFile This is a File object that corresponds to the local file in the server cache. */ public LocalMirrorFile(File myFile) { file = myFile; Index: MirrorInfo.java =================================================================== RCS file: /var/lib/cvs/apt-got/apt-got/src/com/debianmirror/mirror/data/MirrorInfo.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MirrorInfo.java 19 May 2004 01:30:38 -0000 1.1 --- MirrorInfo.java 1 Jun 2004 18:23:44 -0000 1.2 *************** *** 4,11 **** --- 4,50 ---- import java.net.MalformedURLException; + /** + * Interface to basic information about mirrors. + * + * @author Tobias Hertkorn + */ public interface MirrorInfo { + /** + * Tests if the infos are consistent. + * <br />That means, if the mirror is done working on pending info changes. + * + * @return <code>true</code> if no <u>immediate</u> changes are expected. + */ + public boolean isConsistent(); + + /** + * Tests whether a file denoted by the path parameter fits into this mirror. + * + * @param path is the file path relative to the root of the mirror module. + * @return <code>true</code> if the file should be cached. + */ public boolean isCacheable(String path); + + /** + * Try to use {@link #translatePathToURL} instead. + * <br />Makes the root of the remote archive to mirror available as <code>URL</code>. + * + * @return the root of the remote archive. + */ public URL getRemoteURL(); + + /** + * Gives an estimate about the mirror size if available. + * @return the size or -1 if not available. + */ public long getLocalMirrorSize(); + + /** + * Translates a local path representation into a remote URL. + * <br />That URL can then be used to fetch the file from the remote archive. + * + * @param path is the file path relative to the root of the mirror module. + * @return the <code>URL</code> of the remote file. + */ public URL translatePathToURL(String path) throws MalformedURLException; } |