Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 15990

Summary: emerge-webrsync redownloads snapshots if no newer snapshots are available
Product: Portage Development Reporter: Daniel Milne <d>
Component: UnclassifiedAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: minor CC: marc.reynes, mholzer
Priority: High Keywords: InVCS
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 21794, 35535    
Bug Blocks:    
Attachments: emerge-webrsync in python
Another webrsync script

Description Daniel Milne 2003-02-19 07:03:55 UTC
emerge-webrsync will download a snapshot even if it's previously been downloaded. 



Reproducible: Always
Steps to Reproduce:
1. emerge-webrsync
2. emerge-webrsync


Actual Results:  
emerge-rsync will download the same snapshot at step 2.

Expected Results:  
It should reply with a message "No New Snapshot Available" or such and exit -1.

This could be easy to fix by getting emerge-webrsync to add a file: 
/var/tmp/emerge-webrsync/.timestamp 

The contents of this file could be for example: "portage-20030217.tar.bz2"

Then, before downloading, 

file="portage-${year}${month}${day}.tar.bz2"

CURPORTAGE=`cat ${SYNCPATH}/.timestamp`

if [[ ${CURPORTAGE} != ${file} ]]; then
    sync_local
    echo ${file} > ${SYNCPATH}/.timestamp
fi

Or something like that Maybe?

Portage 2.0.46-r12 (default-1.0, gcc-2.95.3, glibc-2.2.5-r2,2.2.5-r7)
=================================================================
System uname: 2.4.19-gentoo-r9 i686 Pentium III (Coppermine)
GENTOO_MIRRORS="http://www.ibiblio.org/pub/Linux/distributions/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config
/usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/kde/3/share/config
/usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY="/usr/local/portage"
USE="x86 oss 3dnow libg++ mikmod ncurses pdflib qtmt quicktime alsa arts bonobo
cdr esd gdbm gif gnome-libs gpm gtk gtkhtml guile imlib libwww motif mozilla nls
pam perl postgres python readline scanner sdl slang tcltk tcpd tetex tiff apm
avi berkdb crypt cups dvd encode gd gnome imap java jpeg kde mpeg mysql mmx
mozsvg mozcalendar nvidia oggvorbis opengl png postgresql qt spell sse ssl svga
truetype X xml xml2 xmms xv zlib"
COMPILER=""
CHOST="i686-pc-linux-gnu"
CFLAGS="-s -march=i686 -O2 -pipe -fomit-frame-pointer -fexpensive-optimizations
-frerun-cse-after-loop -frerun-loop-opt -malign-functions=4"
CXXFLAGS="-s -march=i686 -O2 -pipe -fomit-frame-pointer
-fexpensive-optimizations -frerun-cse-after-loop -frerun-loop-opt
-malign-functions=4"
ACCEPT_KEYWORDS="x86"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache"
Comment 1 Marc 'huz' REYNES 2003-02-20 08:30:03 UTC
Created attachment 8539 [details]
emerge-webrsync in python
Comment 2 Marc 'huz' REYNES 2003-02-20 08:30:43 UTC
hello, I just written a new emerge-webrsync in python which fix this bug and the one which appear since there is some print statement in /usr/lib/python2.2/site-packages/portage.py when the module is loaded

it is not really terminated but the basic fonctionnalities are there. I would like to know if you think it useful i finish it before loosing too much time

/huz
Comment 3 Daniel Milne 2003-02-20 08:36:47 UTC
Created attachment 8540 [details]
Another webrsync script

I've written one also. I've used it where I work quite a bit, but it should be
examined by a pro.
Comment 4 Brian Harring (RETIRED) gentoo-dev 2004-08-10 23:04:30 UTC
We should have the md5 for the snapshots posted along side the snapshots; once they are (if they aren't already), pull the md5, and md5 the local file.
That would be a better approach imo, added gives us a way to verify no corruption in fetching.
Comment 5 Brian Harring (RETIRED) gentoo-dev 2004-08-13 01:07:37 UTC
Modifed emerge-webrsync as my last comment described.
Comment 6 Brian Harring (RETIRED) gentoo-dev 2004-08-16 10:47:10 UTC
pre18 is out, w/ a version that should support this.
Please reopen if it is funky; been testing it for osx and x86, but possible I missed something