emerge-delta-webrsync got deltas and applied patches and synced portage tree but failed to build new tarball for updated tree, because source portage-XXX.tar has been removed very soon: ------------------------------------------------------ Looking for available base versions for a delta Checking digest ... fetching patches Checking digest ... Checking digest ... Checking digest ... Checking digest ... Fetching file snapshot-20140328-20140329.patch.bz2.md5sum ... failed fetching snapshot-20140328-20140329.patch.bz2.md5sum verbosity level(1) patch_type=8 patch_type=8 disabling bufferless, patch_count(2) == 1 || forced_reorder(1) size1=447662080, size2=447682560 reconstruction return=0, commands=23006 result was 23006 commands versions size is 447682560 index_size = 11503 size1=447682560, size2=447897600 reconstruction return=0, commands=39456 result was 39456 commands versions size is 447897600 applied 2 patches reordering commands? 1 reconstructing target file based off of dcbuff commands... collapsing processing src 0: 0 commands. processing src 1: 9992 commands. processing src 2: 19580 commands. processing src 3: 9884 commands. reconstruction completed successfully verifying uncompressed md5 Checking digest ... recompressing. (backgrounding) beginning update to the tree Syncing local tree ... /var/portage/tmp/portage/delta-webrsync-oyMcDm/portage-20140328.tar: Number of files: 176942 Number of files transferred: 0 Total file size: 318.69M bytes Total transferred file size: 0 bytes Literal data: 0 bytes Matched data: 0 bytes File list size: 4.28M File list generation time: 0.001 seconds File list transfer time: 0.000 seconds Total bytes sent: 4.30M Total bytes received: 25.61K sent 4.30M bytes received 25.61K bytes 320.65K bytes/sec total size is 318.69M speedup is 73.62 Cleaning up ... doing final md5 stuff 6.496:1, 1.232 bits/byte, 84.60% saved, 447897600 in, 68954206 out. bzip2: I/O or other error, bailing out. Possible reason follows. bzip2: No such file or directory Input file = /var/portage/tmp/portage/delta-webrsync-oyMcDm/portage-20140328.tar, output file = /var/portage/tmp/portage/delta-webrsync-oyMcDm/portage-20140328.tar.bz2 bzip2: WARNING: deletion of output file suppressed bzip2: since input file no longer exists. Output file bzip2: `/var/portage/tmp/portage/delta-webrsync-oyMcDm/portage-20140328.tar.bz2' may be incomplete. bzip2: I suggest doing an integrity test (bzip2 -tv) of it. file has been removed verifying generated tarball Checking digest ... md5sum: /var/portage/tmp/portage/delta-webrsync-oyMcDm/portage-20140328.tar.bz2: No such file or directory compressed md5 differs, but uncompressed md5 says it right. bzip2 version incompatability in other words saving the md5 md5sum: /var/portage/tmp/portage/delta-webrsync-oyMcDm/portage-20140328.tar.bz2: No such file or directory mv: cannot stat `/var/portage/tmp/portage/delta-webrsync-oyMcDm/portage-20140328.tar.bz2': No such file or directory ------------------------------------------------------ from output above you can see "Cleaning up..." line before "doing final md5 stuff" Reproducible: Always Steps to Reproduce: 1. run emerge-delta-webrsync 2. if you have not app-arch/tarsync installed, you probably would get errors I've got 3. Actual Results: tarball of synced tree is not created. Expected Results: tarball of synced tree being created. $ emerge --info Portage 2.2.10 (default/linux/amd64/13.0/desktop, gcc-4.5.3, unavailable, 3.5.1-gentoo x86_64) ================================================================= System uname: Linux-3.5.1-gentoo-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T5800_@_2.00GHz-with-gentoo-2.2 KiB Mem: 4010416 total, 2014480 free KiB Swap: 1023996 total, 1023996 free Timestamp of tree: Sat, 29 Mar 2014 00:45:01 +0000 ld GNU ld (GNU Binutils) 2.22 distcc 3.1 x86_64-pc-linux-gnu [disabled] ccache version 3.1.5 [disabled] app-shells/bash: 4.2_p39-r1 dev-java/java-config: 2.1.12-r1 dev-lang/python: 2.6.8-r1, 2.7.3-r3, 3.2.3-r2 dev-util/ccache: 3.1.5 dev-util/cmake: 2.8.10.2-r1 dev-util/pkgconfig: 0.27.1 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.11.8 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.68 sys-devel/automake: 1.9.6-r3, 1.10.2, 1.11.1-r1, 1.12.6, 1.13.1 sys-devel/binutils: 2.22-r1 sys-devel/gcc: 4.5.3-r2, 4.6.3 sys-devel/gcc-config: 1.8 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 2.6.38 (virtual/os-headers) sys-libs/glibc: 2.16.0 Repositories: gentoo betagarden bitcoin mpd steam-overlay sunrise reith ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=core2 -O2 -fno-tree-vectorize -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /usr/share/polkit-1/actions" CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=core2 -O2 -fno-tree-vectorize -pipe" DISTDIR="/usr/portage/distfiles/source" EMERGE_DEFAULT_OPTS=" --buildpkg " FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs buildpkg candy config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j2" PKGDIR="/usr/portage/distfiles/binpkg" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/portage/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/var/lib/layman/betagarden /var/lib/layman/bitcoin /var/lib/layman/mpd /var/lib/layman/steam /var/lib/layman/sunrise /usr/local/portage/overlay" SYNC="rsync://rsync3.de.gentoo.org/gentoo-portage" USE="X a52 aac acl acpi alsa amd64 berkdb bidi bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif gpm iconv ipv6 jpeg laptop lcms ldap libnotify mad mmx mng modules mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds qt3support readline sdl session spell sse sse2 ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vim-syntax vorbis wxwidgets x264 xcb xml xv xvid zlib zsh-completion" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="event evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en fa" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="intel v4l modesetting" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Created attachment 373850 [details, diff] remove unnecessary portage-XXX.tar removal
(In reply to Ameretat.Reith from comment #1) > Created attachment 373850 [details, diff] [details, diff] > remove unnecessary portage-XXX.tar removal The intention is really to clean up "${TMPDIR}"/portage there, because it's a temporary copy of the *whole* portage tree, and it's no longer needed after that point.
(In reply to Zac Medico from comment #2) > (In reply to Ameretat.Reith from comment #1) > > Created attachment 373850 [details, diff] [details, diff] [details, diff] > > remove unnecessary portage-XXX.tar removal > > The intention is really to clean up "${TMPDIR}"/portage there, because it's > a temporary copy of the *whole* portage tree, and it's no longer needed > after that point. End of script contains a section to remove "${TMPDIR}" again. Seems to me removing "${TMPDIR}" conditionally is just needed before exiting with codes 5 or 7, but currently I have not a handy environment to test it.
(In reply to Ameretat.Reith from comment #3) > (In reply to Zac Medico from comment #2) > > (In reply to Ameretat.Reith from comment #1) > > > Created attachment 373850 [details, diff] [details, diff] [details, diff] [details, diff] > > > remove unnecessary portage-XXX.tar removal > > > > The intention is really to clean up "${TMPDIR}"/portage there, because it's > > a temporary copy of the *whole* portage tree, and it's no longer needed > > after that point. > > End of script contains a section to remove "${TMPDIR}" again. Seems to me > removing "${TMPDIR}" conditionally is just needed before exiting with codes > 5 or 7, but currently I have not a handy environment to test it. Yeah, your patch is good, thanks. I've added emerge-delta-webrsync-3.7.2-r1 to the tree, and it uses sed to remove those 3 lines. I'll leave this bug open until your patch makes it into git.
Created attachment 386250 [details, diff] emerge-delta-webrsync: fix bug #506192 This fixes the sync_local function so that it doesn't prematurely remove the whole TMPDIR when tarsync is not installed. In this case, we reallyonly want to remove the "${TMPDIR}"/portage directory which contains a temporary copy of the portage tree. The faulty code was introduced in commit 24f6a9599bcf445c468022264cd6952aad4d4076 when a bunch of code from emerge-webrsync was merged into emerge-delta-webrsync.
This is in git now: https://github.com/gentoo/portage/commit/84bba68958ccf8d84a271f110fdb858e4f7700b4