zmedico 14/12/20 15:17:14
Modified: portage-2.2.14.ebuild portage-2.2.15.ebuild
ChangeLog
Log:
Add missing get_ownership and new_config_protect functions for bug #533010.
(Portage version: 2.2.15_p128/cvs/Linux x86_64, signed Manifest commit with
key 0xAE5719A3)
Revision Changes Path
1.6 sys-apps/portage/portage-2.2.14.ebuild
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.2.14.ebuild?rev=1.6&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.2.14.ebuild?rev=1.6&content-type=text/plain
diff :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.2.14.ebuild?r1=1.5&r2=1.6
Index: portage-2.2.14.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.2.14.ebuild,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- portage-2.2.14.ebuild 15 Dec 2014 00:09:21 -0000 1.5
+++ portage-2.2.14.ebuild 20 Dec 2014 15:17:14 -0000 1.6
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.2.14.ebuild,v
1.5 2014/12/15 00:09:21 zlogene Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.2.14.ebuild,v
1.6 2014/12/20 15:17:14 zmedico Exp $
EAPI=5
@@ -232,6 +232,36 @@
fi
}
+get_ownership() {
+ case ${USERLAND} in
+ BSD)
+ stat -f '%Su:%Sg' "${1}"
+ ;;
+ *)
+ stat -c '%U:%G' "${1}"
+ ;;
+ esac
+}
+
+new_config_protect() {
+ # Generate a ._cfg file even if the target file
+ # does not exist, ensuring that the user will
+ # notice the config change.
+ local basename=${1##*/}
+ local dirname=${1%/*}
+ local i=0
+ while true ; do
+ local filename=$(
+ echo -n "${dirname}/._cfg"
+ printf "%04d" ${i}
+ echo -n "_${basename}"
+ )
+ [[ -e ${filename} ]] || break
+ (( i++ ))
+ done
+ echo "${filename}"
+}
+
pkg_postinst() {
if ${REPOS_CONF_UPGRADE} ; then
1.3 sys-apps/portage/portage-2.2.15.ebuild
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.2.15.ebuild?rev=1.3&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.2.15.ebuild?rev=1.3&content-type=text/plain
diff :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.2.15.ebuild?r1=1.2&r2=1.3
Index: portage-2.2.15.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.2.15.ebuild,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- portage-2.2.15.ebuild 6 Dec 2014 20:13:44 -0000 1.2
+++ portage-2.2.15.ebuild 20 Dec 2014 15:17:14 -0000 1.3
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.2.15.ebuild,v
1.2 2014/12/06 20:13:44 dolsen Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.2.15.ebuild,v
1.3 2014/12/20 15:17:14 zmedico Exp $
EAPI=5
@@ -232,6 +232,36 @@
fi
}
+get_ownership() {
+ case ${USERLAND} in
+ BSD)
+ stat -f '%Su:%Sg' "${1}"
+ ;;
+ *)
+ stat -c '%U:%G' "${1}"
+ ;;
+ esac
+}
+
+new_config_protect() {
+ # Generate a ._cfg file even if the target file
+ # does not exist, ensuring that the user will
+ # notice the config change.
+ local basename=${1##*/}
+ local dirname=${1%/*}
+ local i=0
+ while true ; do
+ local filename=$(
+ echo -n "${dirname}/._cfg"
+ printf "%04d" ${i}
+ echo -n "_${basename}"
+ )
+ [[ -e ${filename} ]] || break
+ (( i++ ))
+ done
+ echo "${filename}"
+}
+
pkg_postinst() {
if ${REPOS_CONF_UPGRADE} ; then
1.1423 sys-apps/portage/ChangeLog
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.1423&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.1423&content-type=text/plain
diff :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?r1=1.1422&r2=1.1423
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v
retrieving revision 1.1422
retrieving revision 1.1423
diff -u -r1.1422 -r1.1423
--- ChangeLog 15 Dec 2014 00:09:21 -0000 1.1422
+++ ChangeLog 20 Dec 2014 15:17:14 -0000 1.1423
@@ -1,6 +1,10 @@
# ChangeLog for sys-apps/portage
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.1422
2014/12/15 00:09:21 zlogene Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.1423
2014/12/20 15:17:14 zmedico Exp $
+
+ 20 Dec 2014; Zac Medico <[email protected]> portage-2.2.14.ebuild,
+ portage-2.2.15.ebuild:
+ Add missing get_ownership and new_config_protect functions for bug #533010.
15 Dec 2014; Mikle Kolyada <[email protected]> portage-2.2.14.ebuild:
x86 stable wrt bug #531594