On 04/07/10 07:02 PM, Eduard Bloch wrote: > #include <hallo.h> > * M. Vefa Bicakci [Sun, Jul 04 2010, 03:15:21PM]:
Hello! > >> [snip] >> Here are a few sample lines from apt-cacher.err: >> >> === >> Sun Jul 4 15:03:40 >> 2010|/var/cache/apt-cacher-ng/debrep/dists/unstable/Release storage error >> [503 Server disagrees on file size, cleaning up]: Resource temporarily >> unavailable >> Sun Jul 4 15:03:41 >> 2010|/var/cache/apt-cacher-ng/debrep/dists/unstable/contrib/binary-i386/Packages.diff/Index >> storage error [503 Server disagrees on file size, cleaning up]: Resource >> temporarily unavailable >> Sun Jul 4 15:04:58 >> 2010|/var/cache/apt-cacher-ng/debrep/dists/unstable/contrib/binary-i386/Packages.bz2 >> storage error [503 Server disagrees on file size, cleaning up]: Resource >> temporarily unavailable > > That's confusing. The server didn't like the requested range and refused > to resume the download, maybe because of bad value, maybe because the > server is just confused because of wrong timestamps. I can reproduce this by simply issuing "apt-get update" multiple times. >> === >> # apt-get dist-upgrade >> >> Reading package lists... Done >> Building dependency tree >> Reading state information... Done >> Calculating upgrade... Done >> The following packages will be upgraded: >> firebird2.1-common-doc hpijs hplip hplip-cups hplip-data initscripts >> libhpmud0 libsoup-gnome2.4-1 libsoup2.4-1 libtelepathy-glib0 sysv-rc >> sysvinit sysvinit-utils >> 13 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. >> Need to get 14.2MB/14.5MB of archives. >> After this operation, 635kB of additional disk space will be used. >> Do you want to continue [Y/n]? y >> Get:1 http://localhost unstable/main initscripts 2.88dsf-11 [69.8kB] >> Err http://localhost unstable/main firebird2.1-common-doc >> 2.1.3.18185-0.ds1-10 >> Bad header line > > Now that's interesting. Could you run: > > apt-get -dy dist-upgrade -o Debug::Acquire::Http=true > > ... please? You might also set the Debug value in acng.conf to 4. I am sorry. I didn't mention that this was on another computer which was configured using a "Acquire::http:proxy" line in apt.conf. Here's the output of the command you suggested: === 8< === Reading package lists... Building dependency tree... Reading state information... The following packages will be upgraded: brasero brasero-common ftp-ssl grub-common grub-pc grub2 libbrasero-media0 libiw30 libpulse0 manpages python2.6 python2.6-minimal syslinux syslinux-common virtualbox-ose-guest-utils virtualbox-ose-guest-x11 wireless-tools GET http://ftp.tr.debian.org/debian/pool/main/b/brasero/brasero-common_2.30.2-1_all.deb HTTP/1.1 Host: ftp.tr.debian.org Range: bytes=14985- If-Range: Sun, 04 Jul 2010 14:32:04 GMT User-Agent: Debian APT-HTTP/1.3 (0.7.25.3) GET http://ftp.tr.debian.org/debian/pool/main/b/brasero/brasero_2.30.2-1_i386.deb HTTP/1.1 Host: ftp.tr.debian.org User-Agent: Debian APT-HTTP/1.3 (0.7.25.3) GET http://ftp.tr.debian.org/debian/pool/main/b/brasero/libbrasero-media0_2.30.2-1_i386.deb HTTP/1.1 Host: ftp.tr.debian.org User-Agent: Debian APT-HTTP/1.3 (0.7.25.3) GET http://ftp.tr.debian.org/debian/pool/main/w/wireless-tools/libiw30_30~pre9-5_i386.deb HTTP/1.1 Host: ftp.tr.debian.org User-Agent: Debian APT-HTTP/1.3 (0.7.25.3) GET http://ftp.tr.debian.org/debian/pool/main/p/pulseaudio/libpulse0_0.9.21-3_i386.deb HTTP/1.1 Host: ftp.tr.debian.org User-Agent: Debian APT-HTTP/1.3 (0.7.25.3) GET http://ftp.tr.debian.org/debian/pool/main/p/python2.6/python2.6_2.6.5+20100703-1_i386.deb HTTP/1.1 Host: ftp.tr.debian.org User-Agent: Debian APT-HTTP/1.3 (0.7.25.3) GET http://ftp.tr.debian.org/debian/pool/main/p/python2.6/python2.6-minimal_2.6.5+20100703-1_i386.deb HTTP/1.1 Host: ftp.tr.debian.org User-Agent: Debian APT-HTTP/1.3 (0.7.25.3) GET http://ftp.tr.debian.org/debian/pool/main/s/syslinux/syslinux_4.01+dfsg-1_i386.deb HTTP/1.1 Host: ftp.tr.debian.org User-Agent: Debian APT-HTTP/1.3 (0.7.25.3) GET http://ftp.tr.debian.org/debian/pool/main/s/syslinux/syslinux-common_4.01+dfsg-1_all.deb HTTP/1.1 Host: ftp.tr.debian.org User-Agent: Debian APT-HTTP/1.3 (0.7.25.3) GET http://ftp.tr.debian.org/debian/pool/main/v/virtualbox-ose/virtualbox-ose-guest-x11_3.2.6-dfsg-2_i386.deb HTTP/1.1 Host: ftp.tr.debian.org User-Agent: Debian APT-HTTP/1.3 (0.7.25.3) HTTP/1.1 206 Partial Response Content-Length: 64360088989315 Content-Range: bytes 17496580076480779--5224466291009740840/-5314247457217970159 Last-Modified: Sun, 04 Jul 2010 14:32:04 GMT Date: Mon Jul 5 17:20:58 2010 Server: Debian Apt-Cacher NG/0.4.8 Content-Type: application/octet-stream X-Original-Source: http://ftp.debian.org/debian/pool/main/b/brasero/brasero-common_2.30.2-1_all.deb 17 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 16.0MB/16.7MB of archives. After this operation, 809kB of additional disk space will be used. Get:1 http://ftp.tr.debian.org unstable/main brasero-common 2.30.2-1 [4,074kB] GET http://ftp.tr.debian.org/debian/pool/main/v/virtualbox-ose/virtualbox-ose-guest-utils_3.2.6-dfsg-2_i386.deb HTTP/1.1 Host: ftp.tr.debian.org User-Agent: Debian APT-HTTP/1.3 (0.7.25.3) === >8 === Note the content length and range, which are too large to be real. To get more information, I tried to build apt-cacher-ng with debugging info using the command make all DEBUG=1 which failed with a lot of messages. Then I tried make acng DEBUG=1 which did work. To my amazement, when I changed the DAEMON= line in /etc/init.d/apt-cacher-ng script to refer to my newly built binary, everything started to work properly. I didn't get any 503 errors in the log files, and the other computer configured using apt.conf stopped getting errors. Then I built a binary *without* DEBUG=1, e.g. with just "make acng", and that binary worked without problems as well. Could this be a compiler related problem? Okay, I think I found the problem: Here's a sample output line from "make acng" command: g++ -c -g -Os -Wall -D_FILE_OFFSET_BITS=64 "-I/home/zzz/src/acng/apt-cacher-ng-0.4.8/include" source/fileitem.cc -o fileitem.o Now, here's a sample output line from "dpkg-buildpackage ..." command: g++ -c -Wall -g "-I/home/zzz/src/acng/apt-cacher-ng-0.4.8/include" source/acbuf.cc -o acbuf.o As you can see, the build by dpkg-buildpackage does not include the _FILE_OFFSET_BITS=64 define statement. This is because of the following line in the Makefile: === 8< === CXXFLAGS ?= -g -Os -Wall -D_FILE_OFFSET_BITS=64 === >8 === It looks like CXXFLAGS is now being defined by dpkg-buildflags, and because of this your custom CXXFLAGS were not being set. So this causes file sizes to be messed up because of 32-bit wide integers, which explains why I kept getting file size related 503 errors. When I replaced the "?=" with "+=" in the Makefile, I was able to get a working binary via dpkg-buildpackage. Regards, M. Vefa Bicakci -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org