summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-03-10 08:17:02 +0000
committerZac Medico <zmedico@gentoo.org>2006-03-10 08:17:02 +0000
commit3a601a4759f98ef301faa63e4bb4b98c9787b5d3 (patch)
treee677efab907c8cfb26802bc754df85620796d6ae
parentMove the install phase qa checks from ebuild.sh to misc-functions.sh and add ... (diff)
downloadportage-multirepo-3a601a4759f98ef301faa63e4bb4b98c9787b5d3.tar.gz
portage-multirepo-3a601a4759f98ef301faa63e4bb4b98c9787b5d3.tar.bz2
portage-multirepo-3a601a4759f98ef301faa63e4bb4b98c9787b5d3.zip
Move dyn_rpm and dyn_spec from ebuild.sh to misc-functions.sh.
svn path=/main/trunk/; revision=2838
-rwxr-xr-xbin/ebuild.sh48
-rw-r--r--bin/misc-functions.sh40
-rw-r--r--pym/portage.py2
3 files changed, 41 insertions, 49 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 070b118c..810aa1d8 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -1061,44 +1061,6 @@ dyn_preinst() {
[ "$(type -t post_pkg_preinst)" == "function" ] && post_pkg_preinst
}
-dyn_spec() {
- tar czf "/usr/src/redhat/SOURCES/${PF}.tar.gz" "${O}/${PF}.ebuild" "${O}/files" || die "Failed to create base rpm tarball."
-
- cat <<__END1__ > ${PF}.spec
-Summary: ${DESCRIPTION}
-Name: ${PN}
-Version: ${PV}
-Release: ${PR}
-Copyright: GPL
-Group: portage/${CATEGORY}
-Source: ${PF}.tar.gz
-Buildroot: ${D}
-%description
-${DESCRIPTION}
-
-${HOMEPAGE}
-
-%prep
-%setup -c
-
-%build
-
-%install
-
-%clean
-
-%files
-/
-__END1__
-
-}
-
-dyn_rpm() {
- 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"
-}
-
dyn_help() {
echo
echo "Portage"
@@ -1617,16 +1579,6 @@ for myarg in $*; do
set +x
fi
;;
- rpm)
- export SANDBOX_ON="0"
- if [ "$PORTAGE_DEBUG" != "1" ]; then
- dyn_${myarg}
- else
- set -x
- dyn_${myarg}
- set +x
- fi
- ;;
depend)
export SANDBOX_ON="0"
set -f
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index 88ae29f8..8ae5149f 100644
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -422,6 +422,46 @@ dyn_package() {
touch .packaged || die "Failed to 'touch .packaged' in ${PORTAGE_BUILDDIR}"
}
+dyn_spec() {
+ tar czf "/usr/src/redhat/SOURCES/${PF}.tar.gz" "${O}/${PF}.ebuild" "${O}/files" || die "Failed to create base rpm tarball."
+
+ cat <<__END1__ > ${PF}.spec
+Summary: ${DESCRIPTION}
+Name: ${PN}
+Version: ${PV}
+Release: ${PR}
+Copyright: GPL
+Group: portage/${CATEGORY}
+Source: ${PF}.tar.gz
+Buildroot: ${D}
+%description
+${DESCRIPTION}
+
+${HOMEPAGE}
+
+%prep
+%setup -c
+
+%build
+
+%install
+
+%clean
+
+%files
+/
+__END1__
+
+}
+
+dyn_rpm() {
+ addwrite /usr/src/redhat/
+ 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"
+}
+
if [ -n "${MISC_FUNCTIONS_ARGS}" ]; then
[ "$PORTAGE_DEBUG" == "1" ] && set -x
for x in ${MISC_FUNCTIONS_ARGS}; do
diff --git a/pym/portage.py b/pym/portage.py
index 5fc70a7d..1e318623 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -2369,7 +2369,7 @@ def spawnebuild(mydo,actionmap,mysettings,debug,alwaysdep=0,logfile=None):
if retval:
return retval
# spawn ebuild.sh or misc-functions.sh as appropriate
- if mydo in ["package"]:
+ if mydo in ["package","rpm"]:
mycommand = MISC_SH_BINARY + " dyn_" + mydo
else:
mycommand = EBUILD_SH_BINARY + " " + mydo