Bug #190214 - Make the rpm phase use /usr/src/rpm instead of /usr/src/redhat.
authorZac Medico <zmedico@gentoo.org>
Thu, 6 Sep 2007 17:08:51 +0000 (17:08 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 6 Sep 2007 17:08:51 +0000 (17:08 -0000)
Bug #190144 - Use the realpath of DISTDIR so that things like
              subversion.eclass are compatible with sandbox. (trunk r7700)

svn path=/main/branches/2.1.2/; revision=7732

bin/misc-functions.sh
pym/portage.py

index 55802daadabce5e9b9f8d55e61006da143c82a5a..eecf21855e8c91d99d9d83423723702b7a62bfc4 100755 (executable)
@@ -517,7 +517,9 @@ dyn_package() {
 }
 
 dyn_spec() {
-       tar czf "/usr/src/redhat/SOURCES/${PF}.tar.gz" "${O}/${PF}.ebuild" "${O}/files" || die "Failed to create base rpm tarball."
+       tar czf "/usr/src/rpm/SOURCES/${PF}.tar.gz" \
+               "${O}/${PF}.ebuild" "${O}/files" || \
+               die "Failed to create base rpm tarball."
 
        cat <<__END1__ > ${PF}.spec
 Summary: ${DESCRIPTION}
@@ -549,11 +551,13 @@ __END1__
 }
 
 dyn_rpm() {
-       addwrite /usr/src/redhat/
-       addwrite ${RPMDIR}
+       addwrite /usr/src/rpm
+       addwrite "${RPMDIR}"
        dyn_spec
        rpmbuild -bb "${PF}.spec" || die "Failed to integrate rpm spec file"
-       install -D "/usr/src/redhat/RPMS/i386/${PN}-${PV}-${PR}.i386.rpm" "${RPMDIR}/${CATEGORY}/${PN}-${PV}-${PR}.rpm" || die "Failed to move rpm"
+       install -D "/usr/src/rpm/RPMS/i386/${PN}-${PV}-${PR}.i386.rpm" \
+               "${RPMDIR}/${CATEGORY}/${PN}-${PV}-${PR}.rpm" || \
+               die "Failed to move rpm"
 }
 
 if [ -n "${MISC_FUNCTIONS_ARGS}" ]; then
index 7be9f72c7afb7a8451dab7ba51b928a0fcd09757..e39d2fb9d0a55a346e5585cbae20ed1f90aa9a66 100644 (file)
@@ -3299,6 +3299,9 @@ def doebuild_environment(myebuild, mydo, myroot, mysettings, debug, use_cache, m
        mysettings["PF"]       = mypv
 
        mysettings["PORTDIR"] = os.path.realpath(mysettings["PORTDIR"])
+       mysettings["DISTDIR"] = os.path.realpath(mysettings["DISTDIR"])
+       mysettings["RPMDIR"]  = os.path.realpath(mysettings["RPMDIR"])
+
        mysettings["ECLASSDIR"]   = mysettings["PORTDIR"]+"/eclass"
        mysettings["SANDBOX_LOG"] = mycpv.replace("/", "_-_")