public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Michal Hrusecky <miska@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] RFC patch for obs-service.eclass
Date: Tue, 21 Feb 2012 11:18:44 +0100	[thread overview]
Message-ID: <20120221101843.GA17026@misibook.miska.isageek.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 1273 bytes --]

Hi,

any objections against following patch? I guess I'm the only one using
this eclass anyway. So what the patch does. In gentoo we have build
renamed to avoid clashes and moved to the different directory. More and
more services are using parts of the build, so instead of patching all
services, I think it would be better to do it in eclass.

--- obs-service.eclass	16 Sep 2011 15:49:19 -0000	1.1
+++ obs-service.eclass	21 Feb 2012 10:03:43 -0000
@@ -74,6 +74,18 @@
 	debug-print-function ${FUNCNAME} "$@"
 }
 
+# @FUNCTION: obs-service_src_prepare
+# @DESCRIPTION:
+# Replaces all /usr/lib/build directories with /usr/share/suse-build to reflect
+# where suse-build is installed in Gentoo.
+obs-service_src_prepare() {
+	debug-print-function ${FUNCNAME} "$@"
+	debug-print "Replacing all paths to find suse-build in Gentoo"
+	find . -exec grep -l /usr/lib/build \{\} \; | while read i; do
+		sed -i 's|/usr/lib/build|/usr/share/suse-build|g' "${i}"
+	done
+}
+
 # @FUNCTION: obs-service_src_install
 # @DESCRIPTION:
 # Does the installation of the downloaded files.
@@ -94,4 +106,4 @@
 	fi
 }
 
-EXPORT_FUNCTIONS src_install src_unpack
+EXPORT_FUNCTIONS src_install src_prepare src_unpack


-- 
	Michal Hrusecky <miska@gentoo.org>

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 230 bytes --]

             reply	other threads:[~2012-02-21 10:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-21 10:18 Michal Hrusecky [this message]
2012-02-21 13:34 ` [gentoo-dev] RFC patch for obs-service.eclass Michał Górny
2012-02-24 10:27 ` Michal Hrusecky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120221101843.GA17026@misibook.miska.isageek.net \
    --to=miska@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox