On Wed, Sep 23, 2009 at 6:15 PM, Dan McGee <dpmcgee@gmail.com> wrote:
On Wed, Sep 23, 2009 at 6:04 PM, Aaron Griffin <aaronmgriffin@gmail.com> wrote:
On Wed, Sep 23, 2009 at 5:25 PM, Xavier <shiningxc@gmail.com> wrote:
Today I got very strange results downloading packages with pacman. For example : gnome-common-2.28.0... 8,9K 112,2K/s 00:00:00 [#####################] 21167%
ls -lh /var/cache/pacman/pkg/gnome-common-2.28.0-1-any.pkg.tar.gz -rw-r--r-- 1 root root 8,9K sept. 24 00:17 /var/cache/pacman/pkg/gnome-common-2.28.0-1-any.pkg.tar.gz
/var/lib/pacman/sync/gnome-unstable/gnome-common-2.28.0-1/desc:%CSIZE% /var/lib/pacman/sync/gnome-unstable/gnome-common-2.28.0-1/desc-43
43 bytes instead of 8900 ? wtf ?
Hmmm repo-add problem with symlinks? The any packages are symlinks... maybe it needs fixing for how it determines filesize
Ding! We have a winner, the symlink size itself is 43:
$ ll /srv/ftp/gnome-unstable/os/i686/gnome-common-2.28.0-1-any.pkg.tar.gz lrwxrwxrwx 1 jgc ftp-extra 43 2009-09-21 18:35 /srv/ftp/gnome-unstable/os/i686/gnome-common-2.28.0-1-any.pkg.tar.gz -> ../any/gnome-common-2.28.0-1-any.pkg.tar.gz
Too bad you point this out the day after we release, hah. Looks like we need to add the -L option to the stat call in sizecmd, but let's talk about that on the pacman ML.
For now I added -L to the repo-add script on gerolde; that will be blown away the next time we update though.
-Dan
Whoops, we are on pacman-dev! Proposed patch, and BSD/Darwin should be safe to add -L too according to http://www.freebsd.org/cgi/man.cgi?query=stat&apropos=0&sektion=1&manpath=FreeBSD+7.2-RELEASE&format=html diff --git a/configure.ac b/configure.ac index 1e9ab35..9f3445d 100644 --- a/configure.ac +++ b/configure.ac @@ -184,11 +184,11 @@ GCC_VISIBILITY_CC GCC_GNU89_INLINE_CC # Host-dependant definitions -SIZECMD="stat -c %s" +SIZECMD="stat -L -c %s" SEDINPLACE="sed -i" case "${host_os}" in *bsd*) - SIZECMD="stat -f %z" + SIZECMD="stat -L -f %z" SEDINPLACE="sed -i ''" ;; cygwin*) @@ -197,7 +197,7 @@ case "${host_os}" in ;; darwin*) host_os_darwin=yes - SIZECMD="/usr/bin/stat -f %z" + SIZECMD="/usr/bin/stat -L -f %z" SEDINPLACE="/usr/bin/sed -i ''" ;; esac