search for: st_mtime

Displaying 20 results from an estimated 142 matches for "st_mtime".

2020 Aug 26
2
[supermin PATCH] rpm: check for SQLite-based RPM DB
...anged, 4 insertions(+), 1 deletion(-) diff --git a/src/ph_rpm.ml b/src/ph_rpm.ml index dbe3bda..0821126 100644 --- a/src/ph_rpm.ml +++ b/src/ph_rpm.ml @@ -234,7 +234,10 @@ let rpm_package_name pkg = rpm.name let rpm_get_package_database_mtime () = - (lstat "/var/lib/rpm/Packages").st_mtime + try + (lstat "/var/lib/rpm/rpmdb.sqlite").st_mtime + with Unix_error (ENOENT, _, _) -> + (lstat "/var/lib/rpm/Packages").st_mtime (* Return the best provider of a particular RPM requirement. * -- 2.26.2
2020 Aug 27
1
Re: [supermin PATCH] rpm: check for SQLite-based RPM DB
...l > > index dbe3bda..0821126 100644 > > --- a/src/ph_rpm.ml > > +++ b/src/ph_rpm.ml > > @@ -234,7 +234,10 @@ let rpm_package_name pkg = > > rpm.name > > > > let rpm_get_package_database_mtime () = > > - (lstat "/var/lib/rpm/Packages").st_mtime > > + try > > + (lstat "/var/lib/rpm/rpmdb.sqlite").st_mtime > > + with Unix_error (ENOENT, _, _) -> > > + (lstat "/var/lib/rpm/Packages").st_mtime > > > > (* Return the best provider of a particular RPM requirement. > > Y...
2023 Jan 03
1
mips64el stat/time/…? problem
...ode is roughly: // const char *opnd1 = "a"; // const char *opnd2 = "b"; // struct stat b1, b2; // int s; return (test_stat(opnd1, &b1) == 0 && (((s = test_stat(opnd2, &b2)) == 0 && mtimecmp(&b1, &b2) > 0) || s < 0)); // #define st_mtimensec st_mtim.tv_nsec // #define HAVE_ST_MTIMENSEC 1 static int mtimecmp(const struct stat *sb1, const struct stat *sb2) { if (sb1->st_mtime < sb2->st_mtime) return (-1); if (sb1->st_mtime > sb2->st_mtime) return (1); #if HAVE_ST_MTIMENSEC if (sb1->st_mtimensec < sb2-&...
2016 Jan 20
2
[PATCH] Consider nanoseconds when quick-checking for unchanged files
I wrote on Fri, 02 Jan 2015 16:02:27 +0100: > --- a/generator.c 2014-06-14 01:05:08.000000000 +0200 > +++ b/generator.c 2015-01-02 15:50:30.000000000 +0100 > @@ -588,7 +588,14 @@ > if (ignore_times) > return 0; > - return cmp_time(st->st_mtime, file->modtime) == 0; > + return cmp_time(st->st_mtime, file->modtime) == 0 > +#ifdef ST_MTIME_NSEC > + ? st->st_mtime == file->modtime > + && NSEC_BUMP(file) ? (uint32)st->ST_MTIME_NSEC == > F_MOD_NSEC(file) > +...
2004 Apr 10
0
patches for copying atimes
...retrieving revision 1.28 diff -u -w -r1.28 backup.c --- backup.c 13 Mar 2004 20:18:03 -0000 1.28 +++ backup.c 10 Apr 2004 23:28:35 -0000 @@ -101,7 +101,7 @@ "make_bak_dir stat %s failed: %s\n", full_fname(rel), strerror(errno)); } else { - set_modtime(fullpath, st.st_mtime); + set_times(fullpath, st.st_mtime, time(NULL)); do_lchown(fullpath, st.st_uid, st.st_gid); do_chmod(fullpath, st.st_mode); } Index: batch.c =================================================================== RCS file: /cvsroot/rsync/batch.c,v retrieving revision 1.31 diff -u -w -...
2020 Aug 26
0
Re: [supermin PATCH] rpm: check for SQLite-based RPM DB
...iff --git a/src/ph_rpm.ml b/src/ph_rpm.ml > index dbe3bda..0821126 100644 > --- a/src/ph_rpm.ml > +++ b/src/ph_rpm.ml > @@ -234,7 +234,10 @@ let rpm_package_name pkg = > rpm.name > > let rpm_get_package_database_mtime () = > - (lstat "/var/lib/rpm/Packages").st_mtime > + try > + (lstat "/var/lib/rpm/rpmdb.sqlite").st_mtime > + with Unix_error (ENOENT, _, _) -> > + (lstat "/var/lib/rpm/Packages").st_mtime > > (* Return the best provider of a particular RPM requirement. Yes this looks fine, ACK. If you really...
2004 Apr 20
1
improved atime patch
...retrieving revision 1.28 diff -u -w -r1.28 backup.c --- backup.c 13 Mar 2004 20:18:03 -0000 1.28 +++ backup.c 20 Apr 2004 21:06:17 -0000 @@ -101,7 +101,7 @@ "make_bak_dir stat %s failed: %s\n", full_fname(rel), strerror(errno)); } else { - set_modtime(fullpath, st.st_mtime); + set_times(fullpath, st.st_mtime, time(NULL)); do_lchown(fullpath, st.st_uid, st.st_gid); do_chmod(fullpath, st.st_mode); } Index: batch.c =================================================================== RCS file: /cvsroot/rsync/batch.c,v retrieving revision 1.31 diff -u -w -...
2019 Jan 25
0
[klibc:update-dash] builtin: Greater resolution in test -nt / test -ot
...mp;& + stat (f2, &b2) == 0 && + ( b1.st_mtim.tv_sec > b2.st_mtim.tv_sec || + (b1.st_mtim.tv_sec == b2.st_mtim.tv_sec && (b1.st_mtim.tv_nsec > b2.st_mtim.tv_nsec ))) + ); +#else return (stat (f1, &b1) == 0 && stat (f2, &b2) == 0 && b1.st_mtime > b2.st_mtime); +#endif } static int @@ -486,9 +494,17 @@ olderf (const char *f1, const char *f2) { struct stat b1, b2; +#ifdef HAVE_ST_MTIM + return (stat (f1, &b1) == 0 && + stat (f2, &b2) == 0 && + (b1.st_mtim.tv_sec < b2.st_mtim.tv_sec || + (b1.st_mtim...
2020 Mar 28
0
[klibc:update-dash] dash: builtin: Greater resolution in test -nt / test -ot
...mp;& + stat (f2, &b2) == 0 && + ( b1.st_mtim.tv_sec > b2.st_mtim.tv_sec || + (b1.st_mtim.tv_sec == b2.st_mtim.tv_sec && (b1.st_mtim.tv_nsec > b2.st_mtim.tv_nsec ))) + ); +#else return (stat (f1, &b1) == 0 && stat (f2, &b2) == 0 && b1.st_mtime > b2.st_mtime); +#endif } static int @@ -486,9 +494,17 @@ olderf (const char *f1, const char *f2) { struct stat b1, b2; +#ifdef HAVE_ST_MTIM + return (stat (f1, &b1) == 0 && + stat (f2, &b2) == 0 && + (b1.st_mtim.tv_sec < b2.st_mtim.tv_sec || + (b1.st_mtim...
2019 Aug 09
0
[PATCH] Switch to utimensat for newer POSIX versions
...et_file_stats_(const char *filename, struct flac_stat_s *stats) { - struct utimbuf srctime; - FLAC__ASSERT(0 != filename); FLAC__ASSERT(0 != stats); +#if _POSIX_C_SOURCE >= 200809L + struct timespec srctime[2] = {}; + srctime[0].tv_sec = stats->st_atime; + srctime[1].tv_sec = stats->st_mtime; +#else + struct utimbuf srctime; srctime.actime = stats->st_atime; srctime.modtime = stats->st_mtime; +#endif (void)flac_chmod(filename, stats->st_mode); (void)flac_utime(filename, &srctime); #if !defined _MSC_VER && !defined __BORLANDC__ && !defined __MINGW32...
2010 Jul 19
1
Oplocks
.../D8_03_Ivet_98/06aa6459-a011-40f8-bfb1-25d15e7ada61", O_RDWR|O_CREAT|O_EXCL, 0744) = 121 8711 14:57:50.766030 fstat(121, {st_dev=makedev(0, 23), st_ino=3079419, st_mode=S_IFREG|0744, st_nlink=1, st_uid=40022, st_gid=400, st_blksize=262144, st_blocks=0, st_size=0, st_atime=2010/07/13-14:57:50, st_mtime=2010/07/13-14:57:50, st_ctime=2010/07/13-14:57:50}) = 0 8711 14:57:50.766129 fcntl(12, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=8260, len=1}) = 0 8711 14:57:50.766214 fcntl(121, F_SETSIG, 0x23) = 0 8711 14:57:50.766275 fcntl(121, F_SETLEASE, 0x1) = 0 [...] 8711 14:57:50.789570 stat(&quot...
2016 Jun 02
2
[PATCH] Link count attribute extension
...-0000 @@ -56,6 +56,8 @@ a->perm = 0; a->atime = 0; a->mtime = 0; + a->has_nlink = 0; + a->nlink = 0; } /* Convert from struct stat to filexfer attribs */ @@ -74,6 +76,9 @@ a->flags |= SSH2_FILEXFER_ATTR_ACMODTIME; a->atime = st->st_atime; a->mtime = st->st_mtime; + a->flags |= SSH2_FILEXFER_ATTR_EXTENDED; + a->has_nlink = 1; + a->nlink = st->st_nlink; } /* Convert from filexfer attribs to struct stat */ @@ -94,6 +99,11 @@ st->st_atime = a->atime; st->st_mtime = a->mtime; } + if (a->flags & SSH2_FILEXFER_ATTR_EXTEN...
2011 Jan 16
0
fs quota backend bug
..."357 getquotaroot \"INBOX\"\r\n", 1259) = 26 stat("/home/vmail/ofight.org/team at ofight.org/tmp", {st_dev=makedev(253, 2), st_ino=475158, st_mode=S_IFDIR|0700, st_nlink=2, st_uid=1042, st_gid=102, st_b lksize=4096, st_blocks=0, st_size=1, st_atime=2011/01/16-10:07:59, st_mtime=2011/01/16-10:07:59, st_ctime=2011/01/16-10:07:59}) = 0 stat("/home/vmail/ofight.org/team at ofight.org", {st_dev=makedev(253, 2), st_ino=475157, st_mode=S_IFDIR|0700, st_nlink=11, st_uid=1042, st_gid=102, st_blks ize=4096, st_blocks=16, st_size=4096, st_atime=2009/05/18-12:07:57, st_mtim...
2002 Sep 10
0
[PATCH] Add --preserve-atime switch to rsync
...15:21:56 2002 *************** *** 110,116 **** rprintf(FERROR,"make_bak_dir stat %s : %s\n",fullpath,strerror(errno)); } else { st2=&st; ! set_modtime(fullpath,st2->st_mtime); if(do_lchown(fullpath,st2->st_uid,st2->st_gid)!=0) { rprintf(FERROR,"make_bak_dir chown %s : %s\n",fullpath,strerror(errno)); }; --- 110,117 ---- rprintf(FERROR,"make_bak_dir stat %s : %s\...
2019 Mar 04
2
[supermin PATCH] rebuild the output it when SUPERMIN_KERNEL or SUPERMIN_MODULES are defined
...---- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/supermin.ml b/src/supermin.ml index 7c7135b3..b997643 100644 --- a/src/supermin.ml +++ b/src/supermin.ml @@ -236,13 +236,17 @@ appliance automatically. *) if if_newer then ( try - let odate = (lstat outputdir).st_mtime in - let idates = List.map (fun d -> (lstat d).st_mtime) inputs in - let pdate = (get_package_handler ()).ph_get_package_database_mtime () in - if List.for_all (fun idate -> idate < odate) (pdate :: idates) then ( - if debug >= 1 then - printf "superm...
2005 Mar 05
2
dovecot-pgsql.conf can't find in chroot? (debian)
...1] fstat64(5, <unfinished ...> [pid 18209] <... fcntl64 resumed> ) = 0 [pid 18211] <... fstat64 resumed> {st_dev=makedev(22, 1), st_ino=917830, st_mode=S_IFREG|060 0, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=16, st_size=4264, st_atime=200 5/03/04-22:09:07, st_mtime=2005/03/04-22:09:06, st_ctime=2005/03/04-22:09:06}) = 0 [pid 18211] old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0 x40019000 [pid 18211] fstat64(5, {st_dev=makedev(22, 1), st_ino=917830, st_mode=S_IFREG|0600, st_nlink =1, st_uid=0, st_gid=0, st_blksize=4096, st_...
2020 Apr 03
5
[supermin PATCH v2 0/4] Check for output results for --if-newer (RHBZ#1813809)
This is an attempt to make supermin check for the existing results of an output when checking whether the appliance must be rebuilt using --if-newer. At the moment it is implemented only for the ext2 output format of the build mode. Changes from v1: - drop empty stub for the prepare mode - add patch to ignore --if-newer on modes different than build - squash patch with stub for the build mode
2020 Apr 03
5
[supermin PATCH 0/4] Check for output results for --if-newer (RHBZ#1813809)
This is an attempt to make supermin check for the existing results of an output when checking whether the appliance must be rebuilt using --if-newer. At the moment it is implemented only for the build mode, and for its ext2 output format. Pino Toscano (4): build: factor ext2 filenames Tighten Unix_error check for missing outputdir Extend modes with list of outputs build: set
2020 Apr 03
0
[supermin PATCH 3/4] Extend modes with list of outputs
...s] gets the potential outputs for the + appliance. *) diff --git a/src/supermin.ml b/src/supermin.ml index 80c48e6..4091f1d 100644 --- a/src/supermin.ml +++ b/src/supermin.ml @@ -236,10 +236,15 @@ appliance automatically. *) if if_newer then ( try - let odate = (lstat outputdir).st_mtime in + let mode_outputs = + match mode with + | Prepare -> Mode_prepare.get_outputs args inputs + | Build -> Mode_build.get_outputs args inputs in + let mode_outputs = List.map ((//) outputdir) mode_outputs in + let odates = List.map (fun d -> (lstat d).st...
2020 Apr 03
0
[supermin PATCH v2 4/4] build: check for outputs in --if-newer check (RHBZ#1813809)
...tputs for the + appliance. *) diff --git a/src/supermin.ml b/src/supermin.ml index 6e93b83..e923111 100644 --- a/src/supermin.ml +++ b/src/supermin.ml @@ -236,10 +236,12 @@ appliance automatically. *) if mode = Build && if_newer then ( try - let odate = (lstat outputdir).st_mtime in + let outputs = Mode_build.get_outputs args inputs in + let outputs = List.map ((//) outputdir) outputs in + let odates = List.map (fun d -> (lstat d).st_mtime) (outputdir :: outputs) in let idates = List.map (fun d -> (lstat d).st_mtime) inputs in let pdate =...