summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaúl Porcel <armin76@gentoo.org>2008-03-26 19:40:30 +0000
committerRaúl Porcel <armin76@gentoo.org>2008-03-26 19:40:30 +0000
commit4b2e8d7236e04f232d920f7c9435f7315334205a (patch)
treef43630759aeaf5ddc74e759c12583c113159c4eb /net-ftp/lftp/files
parentold (diff)
downloadgentoo-2-4b2e8d7236e04f232d920f7c9435f7315334205a.tar.gz
gentoo-2-4b2e8d7236e04f232d920f7c9435f7315334205a.tar.bz2
gentoo-2-4b2e8d7236e04f232d920f7c9435f7315334205a.zip
old
(Portage version: 2.1.4.4)
Diffstat (limited to 'net-ftp/lftp/files')
-rw-r--r--net-ftp/lftp/files/lftp-3.5.10-time-mdtm.patch367
1 files changed, 0 insertions, 367 deletions
diff --git a/net-ftp/lftp/files/lftp-3.5.10-time-mdtm.patch b/net-ftp/lftp/files/lftp-3.5.10-time-mdtm.patch
deleted file mode 100644
index fd607ae0a734..000000000000
--- a/net-ftp/lftp/files/lftp-3.5.10-time-mdtm.patch
+++ /dev/null
@@ -1,367 +0,0 @@
-Index: ChangeLog
-===================================================================
-RCS file: /home/lav/cvsroot/lftp/src/ChangeLog,v
-retrieving revision 1.1062.2.7
-diff -u -p -r1.1062.2.7 ChangeLog
---- ChangeLog 26 Mar 2007 07:26:13 -0000 1.1062.2.7
-+++ ChangeLog 5 Apr 2007 13:10:40 -0000
-@@ -1,3 +1,10 @@
-+2007-04-05 Alexander V. Lukyanov <lav@yars.free.net>
-+
-+ * FileAccess.h, FileCopy.cc, FileCopy.h, FileSet.cc, FileSet.h,
-+ FileSetOutput.cc, Filter.cc, Filter.h, MirrorJob.cc, NetAccess.cc:
-+ (FileTimestamp) new struct; use it where needed; submit even
-+ imprecise timestamp from MirrorJob to CopyJob.
-+
- 2007-03-26 Alexander V. Lukyanov <lav@yars.free.net>
-
- * LocalAccess.cc: prevent double-delete of args in LocalDirList
-Index: FileAccess.h
-===================================================================
-RCS file: /home/lav/cvsroot/lftp/src/FileAccess.h,v
-retrieving revision 1.93
-diff -u -p -r1.93 FileAccess.h
---- FileAccess.h 27 Jul 2006 07:22:39 -0000 1.93
-+++ FileAccess.h 5 Apr 2007 13:10:04 -0000
-@@ -43,10 +43,6 @@
- #include "FileSet.h"
- #include "LsCache.h"
-
--#define NO_SIZE ((off_t)-1L)
--#define NO_SIZE_YET ((off_t)-2L)
--#define NO_DATE ((time_t)-1L)
--#define NO_DATE_YET ((time_t)-2L)
- #define FILE_END ((off_t)-1L)
- #define UNKNOWN_POS ((off_t)-1L)
-
-@@ -143,7 +139,7 @@ protected:
- off_t real_pos;
- off_t limit;
-
-- time_t *opt_date;
-+ FileTimestamp *opt_date;
- off_t *opt_size;
-
- static void NonBlock(int fd);
-@@ -248,7 +244,7 @@ public:
- void SetLimit(off_t lim) { limit=lim; }
- void SetSize(off_t s) { entity_size=s; }
- void SetDate(time_t d) { entity_date=d; }
-- void WantDate(time_t *d) { opt_date=d; }
-+ void WantDate(FileTimestamp *d) { opt_date=d; }
- void WantSize(off_t *s) { opt_size=s; }
- void AsciiTransfer() { ascii=true; }
- virtual void Close();
-Index: FileCopy.cc
-===================================================================
-RCS file: /home/lav/cvsroot/lftp/src/FileCopy.cc,v
-retrieving revision 1.126
-diff -u -p -r1.126 FileCopy.cc
---- FileCopy.cc 25 Jul 2006 08:38:31 -0000 1.126
-+++ FileCopy.cc 5 Apr 2007 13:10:04 -0000
-@@ -637,10 +637,10 @@ void FileCopyPeer::SetSize(off_t s)
- seek_pos=0;
- }
- }
--void FileCopyPeer::SetDate(time_t d)
-+void FileCopyPeer::SetDate(time_t d,int p)
- {
-- date=d;
-- if(date==NO_DATE || date==NO_DATE_YET)
-+ date.set(d,p);
-+ if(d==NO_DATE || d==NO_DATE_YET)
- date_set=true;
- else
- date_set=false;
-@@ -680,7 +680,6 @@ FileCopyPeer::FileCopyPeer(dir_t m) : IO
- start_transfer=true;
- size=NO_SIZE_YET;
- e_size=NO_SIZE;
-- date=NO_DATE_YET;
- seek_pos=0;
- can_seek=false;
- can_seek0=false;
-@@ -961,7 +960,7 @@ void FileCopyPeerFA::OpenSession()
- session->AsciiTransfer();
- if(want_size && size==NO_SIZE_YET)
- session->WantSize(&size);
-- if(want_date && date==NO_DATE_YET)
-+ if(want_date && (date==NO_DATE_YET || date.ts_prec>1))
- session->WantDate(&date);
- if(mode==GET)
- {
-Index: FileCopy.h
-===================================================================
-RCS file: /home/lav/cvsroot/lftp/src/FileCopy.h,v
-retrieving revision 1.69
-diff -u -p -r1.69 FileCopy.h
---- FileCopy.h 4 Jul 2006 05:15:36 -0000 1.69
-+++ FileCopy.h 5 Apr 2007 13:10:05 -0000
-@@ -47,7 +47,7 @@ protected:
- bool start_transfer;
- off_t size;
- off_t e_size;
-- time_t date;
-+ FileTimestamp date;
-
- off_t seek_pos;
- bool can_seek;
-@@ -89,7 +89,7 @@ public:
- time_t GetDate() { return date; }
- off_t GetSize() { if(size>=0 && pos>size) WantSize(); return size; }
-
-- void SetDate(time_t d);
-+ void SetDate(time_t d,int p=0);
- void SetSize(off_t s);
- void SetEntitySize(off_t s) { e_size=s; }
-
-@@ -225,7 +225,8 @@ public:
- off_t GetBytesCount() { return bytes_count; }
- double GetTimeSpent();
-
-- void SetDate(time_t t) { get->SetDate(t); }
-+ void SetDate(time_t t,int p=0) { get->SetDate(t,p); }
-+ void SetDate(const FileTimestamp &t) { SetDate(t.ts,t.ts_prec); }
- void SetSize(off_t s) { get->SetSize(s); }
-
- bool Done() { return state==ALL_DONE; }
-Index: FileSet.cc
-===================================================================
-RCS file: /home/lav/cvsroot/lftp/src/FileSet.cc,v
-retrieving revision 1.52
-diff -u -p -r1.52 FileSet.cc
---- FileSet.cc 29 Aug 2006 07:25:26 -0000 1.52
-+++ FileSet.cc 5 Apr 2007 13:10:05 -0000
-@@ -42,11 +42,6 @@
- #include "IdNameCache.h"
- #include "PatternSet.h"
-
--#define NO_SIZE (-1L)
--#define NO_SIZE_YET (-2L)
--#define NO_DATE ((time_t)-1L)
--#define NO_DATE_YET ((time_t)-2L)
--
- void FileInfo::Merge(const FileInfo& f)
- {
- if(strcmp(name,f.name))
-@@ -55,8 +50,8 @@ void FileInfo::Merge(const FileInfo& f)
- int dif=(~defined)&f.defined;
- if(dif&MODE)
- SetMode(f.mode);
-- if(dif&DATE || (defined&DATE && f.defined&DATE && f.date_prec<date_prec))
-- SetDate(f.date,f.date_prec);
-+ if(dif&DATE || (defined&DATE && f.defined&DATE && f.date.ts_prec<date.ts_prec))
-+ SetDate(f.date,f.date.ts_prec);
- if(dif&TYPE)
- SetType(f.filetype);
- if(dif&SYMLINK)
-@@ -421,9 +416,9 @@ bool FileInfo::SameAs(const FileInfo *f
-
- if(defined&DATE && fi->defined&DATE && !(ignore&DATE))
- {
-- time_t p=date_prec;
-- if(p<fi->date_prec)
-- p=fi->date_prec;
-+ time_t p=date.ts_prec;
-+ if(p<fi->date.ts_prec)
-+ p=fi->date.ts_prec;
- if(!(ignore&IGNORE_DATE_IF_OLDER && date<fi->date)
- && labs(date-fi->date)>p)
- return false;
-@@ -588,7 +583,7 @@ void FileSet::LocalUtime(const char *dir
- struct stat st;
- ut.actime=ut.modtime=file->date;
-
-- if(stat(local_name,&st)!=-1 && st.st_mtime!=file->date)
-+ if(stat(local_name,&st)!=-1 && labs(st.st_mtime-file->date)>file->date.ts_prec)
- utime(local_name,&ut);
- }
- }
-@@ -689,7 +684,6 @@ void FileInfo::Init()
- filetype=UNKNOWN;
- mode=(mode_t)-1;
- date=NO_DATE;
-- date_prec=0;
- size=NO_SIZE;
- nlinks=0;
- name=0;
-@@ -712,7 +706,6 @@ FileInfo::FileInfo(const FileInfo &fi)
- filetype=fi.filetype;
- mode=fi.mode;
- date=fi.date;
-- date_prec=fi.date_prec;
- size=fi.size;
- nlinks=fi.nlinks;
- longname=xstrdup(fi.longname);
-Index: FileSet.h
-===================================================================
-RCS file: /home/lav/cvsroot/lftp/src/FileSet.h,v
-retrieving revision 1.38
-diff -u -p -r1.38 FileSet.h
---- FileSet.h 29 Aug 2006 07:25:26 -0000 1.38
-+++ FileSet.h 5 Apr 2007 13:10:05 -0000
-@@ -31,13 +31,28 @@
- class TimeInterval;
- class Range;
-
-+#define NO_SIZE ((off_t)-1L)
-+#define NO_SIZE_YET ((off_t)-2L)
-+#define NO_DATE ((time_t)-1L)
-+#define NO_DATE_YET ((time_t)-2L)
-+
-+struct FileTimestamp
-+{
-+ time_t ts;
-+ int ts_prec;
-+ FileTimestamp() : ts(NO_DATE_YET), ts_prec(0) {}
-+ void set(time_t ts1,int ts1_prec) { ts=ts1; ts_prec=ts1_prec; }
-+ bool is_set() { return ts!=NO_DATE && ts!=NO_DATE_YET; }
-+ operator time_t() const { return ts; }
-+ time_t operator=(time_t t) { set(t,0); return t; }
-+};
-+
- class FileInfo
- {
- public:
- char *name;
- mode_t mode;
-- time_t date;
-- int date_prec;
-+ FileTimestamp date;
- off_t size;
- void *data;
- const char *user, *group;
-@@ -82,7 +97,7 @@ public:
- static FileInfo *parse_ls_line(const char *line,const char *tz);
-
- void SetMode(mode_t m) { mode=m; defined|=MODE; }
-- void SetDate(time_t t,int prec) { date=t; defined|=DATE; date_prec=prec; }
-+ void SetDate(time_t t,int prec) { date.set(t,prec); defined|=DATE; }
- void SetType(type t) { filetype=t; defined|=TYPE; }
- void SetSymlink(const char *s) { xfree(symlink); symlink=xstrdup(s);
- filetype=SYMLINK; defined|=TYPE|SYMLINK_DEF; }
-Index: FileSetOutput.cc
-===================================================================
-RCS file: /home/lav/cvsroot/lftp/src/FileSetOutput.cc,v
-retrieving revision 1.41
-diff -u -p -r1.41 FileSetOutput.cc
---- FileSetOutput.cc 7 Aug 2006 08:55:20 -0000 1.41
-+++ FileSetOutput.cc 5 Apr 2007 13:10:05 -0000
-@@ -144,7 +144,7 @@ void FileSetOutput::print(FileSet &fs, O
- if(!use_fmt || !*use_fmt)
- use_fmt="%b %e %Y\n%b %e %H:%M";
-
-- char *dt_mem = xstrftime(use_fmt, localtime (&f->date));
-+ char *dt_mem = xstrftime(use_fmt, localtime (&f->date.ts));
- char *dt=strtok(dt_mem,"\n|");
- if(recent) {
- char *dt1=strtok(NULL,"\n|");
-Index: Filter.cc
-===================================================================
-RCS file: /home/lav/cvsroot/lftp/src/Filter.cc,v
-retrieving revision 1.39
-diff -u -p -r1.39 Filter.cc
---- Filter.cc 6 Feb 2006 10:57:24 -0000 1.39
-+++ Filter.cc 5 Apr 2007 13:10:05 -0000
-@@ -34,6 +34,7 @@
- #include "SignalHook.h"
- #include "ArgV.h"
- #include "misc.h"
-+#include "FileSet.h"
-
- #ifndef O_BINARY
- # define O_BINARY 0
-@@ -345,11 +346,17 @@ bool OutputFilter::usesfd(int n_fd)
- return n_fd<=2;
- }
-
--void FileStream::setmtime(time_t t)
-+void FileStream::setmtime(const FileTimestamp &ts)
- {
- getfd(); // this might create the file... But can fail retriably. FIXME.
-+
-+ // skip the time update if the timestamp is already accurate enough.
-+ struct stat st;
-+ if(fstat(fd,&st)!=-1 && labs(st.st_mtime-ts)<=ts.ts_prec)
-+ return;
-+
- struct utimbuf ut;
-- ut.actime=ut.modtime=t;
-+ ut.actime=ut.modtime=ts;
- utime(full_name,&ut);
- }
- FileStream::FileStream(const char *fname,int new_mode) : FDStream(-1,fname)
-Index: Filter.h
-===================================================================
-RCS file: /home/lav/cvsroot/lftp/src/Filter.h,v
-retrieving revision 1.23
-diff -u -p -r1.23 Filter.h
---- Filter.h 21 Jun 2005 14:30:04 -0000 1.23
-+++ Filter.h 5 Apr 2007 13:10:05 -0000
-@@ -26,6 +26,7 @@
- #include "ProcWait.h"
-
- class ArgV;
-+class FileTimestamp;
-
- class FDStream
- {
-@@ -57,7 +58,7 @@ public:
- const char *GetCwd() const { return cwd; }
-
- virtual off_t get_size() { return -1; }
-- virtual void setmtime(time_t) {}
-+ virtual void setmtime(const FileTimestamp &) {}
- virtual bool can_setmtime() { return false; }
- virtual void remove_if_empty() {}
- virtual void remove() {}
-@@ -136,7 +137,7 @@ public:
- FileStream(const char *fname,int open_mode);
- ~FileStream();
-
-- void setmtime(time_t t);
-+ void setmtime(const FileTimestamp &);
- bool can_setmtime() { return true; }
- void remove_if_empty();
- void remove();
-Index: MirrorJob.cc
-===================================================================
-RCS file: /home/lav/cvsroot/lftp/src/MirrorJob.cc,v
-retrieving revision 1.139.2.1
-diff -u -p -r1.139.2.1 MirrorJob.cc
---- MirrorJob.cc 6 Jan 2007 06:39:33 -0000 1.139.2.1
-+++ MirrorJob.cc 5 Apr 2007 13:10:05 -0000
-@@ -228,7 +228,7 @@ void MirrorJob::HandleFile(FileInfo *fi
- && (old->defined&file->TYPE) && old->filetype==old->NORMAL
- && (flags&IGNORE_TIME ||
- ((file->defined&file->DATE) && (old->defined&old->DATE)
-- && file->date + file->date_prec < old->date - old->date_prec))
-+ && file->date + file->date.ts_prec < old->date - old->date.ts_prec))
- && (file->defined&file->SIZE) && (old->defined&old->SIZE)
- && file->size >= old->size
- && !use_pget)
-@@ -297,7 +297,7 @@ void MirrorJob::HandleFile(FileInfo *fi
- c->RemoveTargetFirst();
- CopyJob *cp=
- new CopyJob(c,file->name,"mirror");
-- if((file->defined&file->DATE) && file->date_prec<=1)
-+ if(file->defined&file->DATE)
- cp->SetDate(file->date);
- if(file->defined&file->SIZE)
- cp->SetSize(file->size);
-Index: NetAccess.cc
-===================================================================
-RCS file: /home/lav/cvsroot/lftp/src/NetAccess.cc,v
-retrieving revision 1.87
-diff -u -p -r1.87 NetAccess.cc
---- NetAccess.cc 27 Jul 2006 07:44:54 -0000 1.87
-+++ NetAccess.cc 5 Apr 2007 13:10:06 -0000
-@@ -871,7 +871,7 @@ do_again:
- cur->time=NO_DATE;
- cur->get_size = need_size && !(file->defined & file->SIZE);
- cur->get_time = need_time && (!(file->defined & file->DATE)
-- || (file->date_prec>0 && can_get_prec_time));
-+ || (file->date.ts_prec>0 && can_get_prec_time));
- cur->file=0;
-
- if(file->defined & file->TYPE)