[csw-maintainers] mgar merge: pcopy doesn't preserve files epoch; it should...

pfelecan pfelecan at opencsw.org
Tue Feb 12 14:24:13 CET 2013


When using guile in autotools, the detection of its version fails
because the logic of the test is based on filtering the output of
guile-config and when the supplied Scheme scripts are newer than the
pre-compiled ones we get a warning on the same file handle, e.g.:

;;; note: source file /opt/csw/share/guile/2.0/ice-9/eval.scm
;;;       newer than compiled 
/opt/csw/lib/guile/2.0/ccache/ice-9/eval.go
guile-config - Guile version 2.0.7

Thus, the test fails. I agree that the logic of the test is flaky
but this is not the point.

Looking up the incriminated files epoch I can see:

cd ~/opencsw/guile/trunk/work/solaris10-sparc

gls -l --time-style=+%s
pkgroot/opt/csw/share/guile/2.0/ice-9/eval.scm \
   
work/solaris10-sparc/pkgroot/opt/csw/lib/guile/2.0/ccache/ice-9/eval.go
-rw-r--r-- 1 pfelecan csw 13506 1360592755 
pkgroot/opt/csw/lib/guile/2.0/ccache/ice-9/eval.go
-rw-r--r-- 1 pfelecan csw 20920 1360592757 
pkgroot/opt/csw/share/guile/2.0/ice-9/eval.scm

and

gls -l --time-style=+%s 
install-isa-sparcv8plus/opt/csw/share/guile/2.0/ice-9/eval.scm 
work/solaris10-sparc/install-isa-sparcv8plus/opt/csw/lib/guile/2.0/ccache/ice-9/eval.go
-rw-r--r-- 1 pfelecan csw 13506 1360592531 
install-isa-sparcv8plus/opt/csw/lib/guile/2.0/ccache/ice-9/eval.go
-rw-r--r-- 1 pfelecan csw 20920 1360592494 
install-isa-sparcv8plus/opt/csw/share/guile/2.0/ice-9/eval.scm

This means that the epoch is changed when merging; i.e. when pcopy
transfers the files from the installation directory to the packaging
directory.

In my opinion, this is sub-optimal. Can we replace the pcopy with
the good old GNU tar, which have all the required features to
obtain the same effect or modify the copy routine (now provided by
File::Copy module) to preserve all the inode's attributes?

I understand that I can supply a kludgy post-install script which
either compiles the Scheme scripts or recursively touch the
pre-compiled files on the target system to avoid the unwanted
behavior of guile-config. However, this is not what I want /
is required.



More information about the maintainers mailing list