Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 531854 - sys-apps/portage-2.2.15 - CONFIG_PROTECT files which haven't changed are renamed anyway when config-protect-if-modified is not enabled in FEATURES (regression from 2.2.14)
Summary: sys-apps/portage-2.2.15 - CONFIG_PROTECT files which haven't changed are rena...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, REGRESSION
Depends on:
Blocks: 484436
  Show dependency tree
 
Reported: 2014-12-06 23:12 UTC by Andrew Church
Modified: 2015-02-15 05:41 UTC (History)
0 users

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 Andrew Church 2014-12-06 23:12:23 UTC
sys-apps/portage-2.2.15 renames (to ._cfg0000_*) files under CONFIG_PROTECT even when the content is the same as the existing version.  This is a regression from 2.2.14, which simply copied the (identical) new file over the old file in such cases.

$ emerge -1 =sys-apps/portage-2.2.14
$ emerge -1 =sys-apps/pciutils-3.3.0
$ ls -a /etc/conf.d | grep pciparm
pciparm
$ emerge -1 =sys-apps/portage-2.2.15
$ emerge -1 =sys-apps/pciutils-3.3.0
$ ls -a /etc/conf.d | grep pciparm
._cfg0000_pciparm
pciparm
$ diff -u /etc/conf.d/{,._cfg0000_}pciparm; echo $?
0


emerge --info:

Portage 2.2.15 (python 3.4.2-final-0, default/linux/amd64, gcc-4.7.3, glibc-2.20, 3.17.2-gentoo x86_64)
=================================================================
System uname: Linux-3.17.2-gentoo-x86_64-Intel-R-_Core-TM-_i7-4770S_CPU_@_3.10GHz-with-gentoo-2.2
KiB Mem:     8121600 total,   3924348 free
KiB Swap:    4193276 total,   4080256 free
Timestamp of tree: Sat, 06 Dec 2014 10:45:01 +0000
sh bash 4.3_p30-r1
ld GNU ld (Gentoo 2.24 p1.4) 2.24
app-shells/bash:          4.3_p30-r1
dev-java/java-config:     2.2.0
dev-lang/perl:            5.20.1-r3
dev-lang/python:          2.7.8, 3.4.2
dev-util/cmake:           3.0.2
dev-util/pkgconfig:       0.28-r2
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.13.6
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6-r1, 1.13.4, 1.14.1
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.3-r2
sys-devel/make:           4.1-r1
sys-kernel/linux-headers: 3.17-r1 (virtual/os-headers)
sys-libs/glibc:           2.20
Repositories: gentoo crossdev sunrise steam-overlay glc local emul-linux-hacks
Installed sets: @steam, @system
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA AdobeFlash-11.x D1X"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=x86-64 -mtune=core-avx-i -mmmx -msse -msse2 -pipe -fno-strict-aliasing"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/dev /etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=x86-64 -mtune=core-avx-i -mmmx -msse -msse2 -pipe -fno-strict-aliasing"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--misspell-suggestions=n --autounmask=n --quiet-build=n"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs collision-protect distlocks ebuild-locks fixlafiles merge-sync news preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.jaist.ac.jp/pub/Linux/Gentoo"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS=""
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="-O --no-human-readable"
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"
PORTDIR_OVERLAY="/var/lib/crossdev /var/lib/layman/sunrise /var/lib/layman/steam /var/lib/layman/glc /usr/local/portage /usr/local/emul-linux-hacks"
SYNC="rsync://rsync.jp.gentoo.org/gentoo-portage"
USE="aac alsa amd64 apng berkdb cjk cli crypt cxx dri dv dvd fortran gif iconv ipv6 joystick jpeg jpeg2k lame live mad mmx mp3 multilib ncurses nptl nptlonly ogg openmp oss perl png pv3 python quicktime readline scanner sdl session sse sse2 ssl theora tiff truetype unicode vdpau vorbis vpx win32codecs x264 xanim xinerama zlib" ABI_X86="32 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="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby19 ruby20" SANE_BACKENDS="genesys" USERLAND="GNU" VIDEO_CARDS="nvidia vesa" 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="3.4 2.7"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 1 Zac Medico gentoo-dev 2014-12-06 23:37:08 UTC
I suspect that your /etc/conf.d/pciparm is a symlink for some reason, and causes it to behave differently since the changes from bug #485598.
Comment 2 Andrew Church 2014-12-06 23:55:04 UTC
$ ls -l /etc/conf.d/pciparm
-rw-r--r--   1 root     root          988 Dec  7 08:05 /etc/conf.d/pciparm
Comment 3 Andrew Church 2014-12-06 23:55:49 UTC
Also, this happens with all config files -- /etc/conf.d/pciparm was just an example (as it was the first file I noticed this problem with).
Comment 4 Andrew Church 2014-12-07 00:13:09 UTC
I think I see the problem: https://github.com/gentoo/portage/commit/02417188225758b1822d176abd8902a92300a371 changed the meaning of FEATURES=-config-protect-if-modified from "protect unless file to be installed matches existing file, regardless of whether existing file has been changed from previously installed file" to "protect, always".  If I enable config-protect-if-modified, the files are not backed up, as I would expect.

If this is an intentional change then I suppose this bug is INVALID, though then I don't see a way to get the previous effect of disabling config-protect-if-modified (which is my desired setup).
Comment 5 Zac Medico gentoo-dev 2014-12-07 00:14:50 UTC
(In reply to Andrew Church from comment #4)
> If this is an intentional change then I suppose this bug is INVALID, though
> then I don't see a way to get the previous effect of disabling
> config-protect-if-modified (which is my desired setup).

It was not intended. It was just the unintended result of *lots* of changes.
Comment 6 Zac Medico gentoo-dev 2014-12-07 00:49:06 UTC
There's a patch in this branch:

	https://github.com/zmedico/portage/tree/bug_531854

I've posted it for review here:

	http://thread.gmane.org/gmane.linux.gentoo.portage.devel/4908
Comment 7 Andrew Church 2014-12-07 00:53:06 UTC
The patch works for me -- thanks for the quick fix!
Comment 8 Zac Medico gentoo-dev 2014-12-07 01:00:00 UTC
This is in the master branch now:

https://github.com/gentoo/portage/commit/cea71687f6bbe0077d3c6271a39b15f6cc8bf325
Comment 9 Brian Dolbec gentoo-dev 2015-02-15 05:41:45 UTC
Released in portage-2.2.16.