zoo creates archives with wrong date and time on the filesystem

Bug #1090290 reported by zapman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zoo (Ubuntu)
In Progress
Undecided
Unassigned

Bug Description

After creating an archive with zoo, if you check its date and time with say dir -lha, you'll see that it's rather inconsistent. It seems very close to the date of the original file which is archived (so if you archive a very old file, or if you modify the date of the file you're going to archive, ls -lha will show that date or something close to it for the archive rather than the actual time).

The date of the file contained in the archive is correct, i.e. zoo -list will display the correct time and date.

I tested this with zoo 2.10-21 and 2.10-27 on Ubuntu 10.04.4 Lucid Lynx amd64 too and the result is the same.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: zoo 2.10-24
ProcVersionSignature: Ubuntu 3.2.0-29.46-generic-pae 3.2.24
Uname: Linux 3.2.0-29-generic-pae i686
ApportVersion: 2.0.1-0ubuntu12
Architecture: i386
CasperVersion: 1.315
Date: Fri Dec 14 09:45:18 2012
LiveMediaBuild: Ubuntu 12.04.1 LTS "Precise Pangolin" - Release i386 (20120817.3)
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: zoo
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
zapman (zapman) wrote :
Revision history for this message
zapman (zapman) wrote :

Looking a bit closer at that issue, it seems that only the last modification time is taken into account, the access time doesn't seem to matter. The following terminal log should be self-explanatory:

zapman@ubuntu:~/work/bugs/zoo$ touch -d "2004-02-29 16:21:42" testfile
zapman@ubuntu:~/work/bugs/zoo$ zoo -add test1.zoo testfile
Zoo: testfile -- ( 0%) added
zapman@ubuntu:~/work/bugs/zoo$ dir -lha
total 12K
drwxr-xr-x 2 zapman zapman 4.0K 2012-12-14 14:04 .
drwxr-xr-x 4 zapman zapman 4.0K 2012-12-14 13:56 ..
-rw-r--r-- 1 zapman zapman 169 2004-02-29 16:21 test1.zoo
-rw-r--r-- 1 zapman zapman 0 2004-02-29 16:21 testfile
zapman@ubuntu:~/work/bugs/zoo$ touch -d "2005-02-22 16:28:42" testfile
zapman@ubuntu:~/work/bugs/zoo$ zoo -add test2.zoo testfile
Zoo: testfile -- ( 0%) added
zapman@ubuntu:~/work/bugs/zoo$ arj a -hk test2.arj testfile
ARJ32 v 3.10, Copyright (c) 1998-2004, ARJ Software Russia. [18 Dec 2009]

Creating archive : test2.arj
Adding testfile 0.0%
Working...
  1x .
ARJ-PROTECT data size 4096 bytes (3276.8%)
     1 file(s)
AUTO ARJ-PROTECT enabled (1x)
zapman@ubuntu:~/work/bugs/zoo$ dir -lha
total 24K
drwxr-xr-x 2 zapman zapman 4.0K 2012-12-14 14:05 .
drwxr-xr-x 4 zapman zapman 4.0K 2012-12-14 13:56 ..
-rw-r--r-- 1 zapman zapman 169 2004-02-29 16:21 test1.zoo
-rw-r--r-- 1 zapman zapman 4.2K 2012-12-14 14:05 test2.arj
-rw-r--r-- 1 zapman zapman 169 2005-02-22 16:28 test2.zoo
-rw-r--r-- 1 zapman zapman 0 2005-02-22 16:28 testfile
zapman@ubuntu:~/work/bugs/zoo$ date
Fri Dec 14 14:06:21 CET 2012
zapman@ubuntu:~/work/bugs/zoo$ touch -d "2017-02-22 16:28:42" testfile
zapman@ubuntu:~/work/bugs/zoo$ zoo -add test3.zoo testfile
Zoo: testfile -- ( 0%) added
zapman@ubuntu:~/work/bugs/zoo$ dir -lha
total 28K
drwxr-xr-x 2 zapman zapman 4.0K 2012-12-14 14:13 .
drwxr-xr-x 4 zapman zapman 4.0K 2012-12-14 13:56 ..
-rw-r--r-- 1 zapman zapman 169 2004-02-29 16:21 test1.zoo
-rw-r--r-- 1 zapman zapman 4.2K 2012-12-14 14:05 test2.arj
-rw-r--r-- 1 zapman zapman 169 2005-02-22 16:28 test2.zoo
-rw-r--r-- 1 zapman zapman 169 2017-02-22 16:28 test3.zoo
-rw-r--r-- 1 zapman zapman 0 2017-02-22 16:28 testfile

Revision history for this message
Jari Aalto (jari-aalto) wrote :

It took me a white to undertand where the date problem was, but I think you're referring to this:

# Commands run in *one* big line so that date discrepancies are minimized

   cd <some safe dir>

  rm -f *.zoo *.bak *.txt; \
  touch -d "2000-02-01 01:01:00" 1-oldest.txt; \
  touch -d "2000-03-01 01:01:00" 2-newest.txt; \
  date +"# now: %Y-%m-%d %H:%M:%S"; \
  zoo -add archive.zoo *.txt > /dev/null ; \
  ls -la | grep -Ev 'total| [.]' ; \
  zoo -list *.zoo

# now: 2013-05-28 10:25:22
-rw-r--r-- 1 user src 0 2000-02-01 01:01 1-oldest.txt
-rw-r--r-- 1 user src 0 2000-03-01 01:01 2-newest.txt
-rw-r--r-- 1 user src 240 2000-02-29 00:01 archive.zoo

Archive archive.zoo:
Length CF Size Now Date Time
-------- --- -------- --------- --------
       0 0% 0 1 Feb 00 01:01:00+64 0000 1-oldest.txt
       0 0% 0 1 Mar 00 01:01:00+64 0000 2-newest.txt
-------- --- -------- --------- --------
       0 0% 0 2 files

NOTES

The date of the *.zoo archive is not the current date it was created, but taken somehow from the date of the file that was added to it.

This looks characteristics to zoo; This also happens with options -update and -freshen.

Revision history for this message
Jari Aalto (jari-aalto) wrote :

A fix is being implemented for the 2.10-28 zoo release. Wath changelog at http://packages.qa.debian.org/z/zoo.html

Changed in zoo (Ubuntu):
status: New → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.