Bug #190214 - Make the rpm phase use /usr/src/rpm instead of /usr/src/redhat.
authorZac Medico <zmedico@gentoo.org>
Sat, 25 Aug 2007 19:41:15 +0000 (19:41 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 25 Aug 2007 19:41:15 +0000 (19:41 -0000)
Bug #190144 - Use the realpath of DISTDIR so that things like subversion.eclass are compatible with sandbox.

svn path=/main/trunk/; revision=7700

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

index 1c79822d2494d97530a77be1421804ebee05201f..04c73fc652a4e807672dfb15f1ce1aa8670d5cad 100755 (executable)
@@ -523,7 +523,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}
@@ -555,11 +557,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 1f6d49c22c7d0443cde8d073e7f97163eb122376..e11b8f41979efe9d2abcc375e37414a1f5c68c14 100644 (file)
@@ -3342,6 +3342,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("/", "_-_")