Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 507656 - =sys-devel/patch-2.7.1-r3 bails a dry run when a symlink is removed and a file with the same name is subsequently written
Summary: =sys-devel/patch-2.7.1-r3 bails a dry run when a symlink is removed and a fil...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-14 20:18 UTC by Tom Wijsman (TomWij) (RETIRED)
Modified: 2014-04-16 14:04 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2014-04-14 20:18:02 UTC
This is regarding distfile patch-3.15-rc1.xz from package =sys-kernel/git-sources--3.15_rc1 that'll soon be online; alternatively, it can be downloaded from kernel.org.

kernel-2.eclass runs a dry-run prior to applying a patch; today we stumbled across a patch that applies fine (patch level 1), but during dry run bails out as it doesn't seem to correctly dry run the file mode. This results in the following output:

    checking symbolic link arch/microblaze/boot/dts/system.dts                         
    File arch/microblaze/boot/dts/system.dts is not a regular file -- refusing to patch
    1 out of 1 hunk ignored                                                            

When doing a grep for it this reveals it being removed and added:

 $ grep 'boot.*system.dts' patch-3.15-rc1 -C1 | pcregrep -M '^---\N*\n\+\+\+'
--- a/arch/microblaze/boot/dts/system.dts
+++ /dev/null
--- /dev/null
+++ b/arch/microblaze/boot/dts/system.dts

Before the first one "deleted file mode 120000" can be found in the patch; as for the second one, that one reads "new file mode 100644".

So, temporarily we ended up skipping the dry run; a warning that explains it:

####################################################################
# IMPORTANT: This is temporary code to support Linux git 3.15_rc1! #
#                                                                  #
# The patch contains a removal of a symlink, followed by addition  #
# of a file with the same name as the symlink in the same          #
# location; this causes the dry-run to fail, filed bug #______.    #
####################################################################

Not entirely sure if this is truly the issue, but this is the only line that is non-checking; as well as clearly states "refusing to patch", so, it would be appreciated if this was looked into such that we can get rid of this hack.

Make sure to remove the if code block under the IMPORTANT warning to test this; for reproducing, that removal followed by emerging again suffices to reproduce.

Thank you very much in advance.

Portage HEAD (default/linux/amd64/13.0/desktop/gnome, gcc-4.8.2, glibc-2.19, 3.14.0-rc5 x86_64)
=================================================================
System uname: Linux-3.14.0-rc5-x86_64-Intel-R-_Core-TM-_i7_CPU_Q_720_@_1.60GHz-with-gentoo-2.2
KiB Mem:     8156844 total,    208952 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Unknown
ld GNU ld (GNU Binutils) 2.24
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.9 [enabled]
app-shells/bash:          4.2_p46-r1
dev-java/java-config:     2.2.0
dev-lang/python:          2.6.9, 2.7.6, 3.2.5-r3, 3.3.5, 3.4.0
dev-util/ccache:          3.1.9-r3
dev-util/cmake:           2.8.12.2
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.14.1
sys-devel/binutils:       2.24-r2
sys-devel/gcc:            4.8.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.14 (virtual/os-headers)
sys-libs/glibc:           2.19
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -fomit-frame-pointer -frecord-gcc-switches"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib/systemd/system-generators/ /usr/lib/systemd/system/ /usr/lib64/systemd/system-generators/ /usr/lib64/systemd/systemd/ /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.1/conf /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/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="-O2 -pipe -march=native -fomit-frame-pointer -frecord-gcc-switches"
DISTDIR="/Personal/Downloads/distfiles/"
EMERGE_DEFAULT_OPTS="-av --jobs=4 --load-average=8 --autounmask-write --autounmask-keep-mask=y --tree --unordered-display --keep-going --with-bdeps=y --backtrack=1"
FCFLAGS="-O2 -pipe -frecord-gcc-switches"
FEATURES="assume-digests binpkg-logs ccache clean-logs collision-protect compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync metadata-transfer multilib-strict news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms sign splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe -frecord-gcc-switches"
GENTOO_MIRRORS="http://gentoo.tiscali.nl"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=sysv"
MAKEOPTS="-j20 -l9"
PKGDIR="/usr/portage/packages"
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/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://88.198.51.10/gentoo-portage"
USE="PUEL X a52 aac acl acpi additions ads alsa amd64 apache2 bash-completion berkdb bidi bluetooth bogofilter branding bzip2 cairo cdda cdio cdr clang cleartype cli corefonts cracklib crypt cups cx231xx cxx dbus directfb dri dts dvb dvd dvdr emboss encode evo exif external-fuse fam fbcon ffmpeg firefox flac fontconfig fortran fpm freetype g3dvl gallium gd gdbm gdm geoloc gif gnome gnome-keyring gpm graphviz gstreamer gtk gtkstyle hal hpijs httpd i18n iconv icu intl introspection ipc jabber jit jpeg lame latex lcdfilter lcms libnotify libsecret live llvm lua mad matroska minimal mmx mng modemmanager modules mp3 mp4 mpeg msn multilib mysql mysqli mysqlnd nautilus ncurses networkmanager new-login nls nptl nss ogg oggvorbis opengl openmp pam pango pcre pdf pdo png policykit ppds ppp pulseaudio qt3support qt4 readline samba scanner sdl session snmp socialweb spamassassin spell sqlite sse sse2 ssl startup-notification static-ppds stream subversion suid svg systemd tcpd theora threads tidy tiff tk truetype type1 type3 udev unicode upcall upnp upower usb v4l vaapi vala vcd vdpau vlm vorbis weather wxwidgets wxwindows x264 xcb xinerama xml xv xvid youtube zeroconf zlib" 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" DVB_CARDS="cx231xx" 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" GRUB_PLATFORMS="pc efi-64" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_US en en_GB" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2 python3_3" QEMU_SOFTMMU_TARGETS="arm x86_64" QEMU_USER_TARGETS="arm x86_64" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="nvidia nouveau" 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"
USE_PYTHON="2.7 3.2 3.3 2.7-pypy-2.0"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS