FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 02-21-2012, 12:34 PM
Michał Górny
 
Default RFC patch for obs-service.eclass

On Tue, 21 Feb 2012 11:18:44 +0100
Michal Hrusecky <miska@gentoo.org> wrote:

> + find . -exec grep -l /usr/lib/build {} ; | while read i;
> do
> + sed -i 's|/usr/lib/build|/usr/share/suse-build|g'
> "${i}"
> + done

find -type f
-exec sed -i 's|/usr/lib/build|/usr/share/suse-build|g' {} +

--
Best regards,
Michał Górny
 
Old 02-24-2012, 09:27 AM
Michal Hrusecky
 
Default RFC patch for obs-service.eclass

Michal Hrusecky - 11:18 21.02.12 wrote:
> 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.

During last checks before commiting I found an error I overlooked
previously due to some changes elsewhere, so here is the latest patch I
want to commit (also incorporates the feedback I received).

--
Michal Hrusecky <miska@gentoo.org>
? obs-service.eclass.patch
Index: obs-service.eclass
================================================== =================
RCS file: /var/cvsroot/gentoo-x86/eclass/obs-service.eclass,v
retrieving revision 1.1
diff -u -B -r1.1 obs-service.eclass
--- obs-service.eclass 16 Sep 2011 15:49:19 -0000 1.1
+++ obs-service.eclass 24 Feb 2012 10:19:00 -0000
@@ -65,13 +65,25 @@
SRC_URI+=" ${OBS_URI}/${i}"
done

-S="${WORKDIR}"
-
-# @FUNCTION: obs-service_src_configure
+# @FUNCTION: obs-service_src_unpack
# @DESCRIPTION:
# Does nothing. Files are not compressed.
obs-service_src_unpack() {
debug-print-function ${FUNCNAME} "$@"
+ cd "${DISTDIR}"
+ mkdir -p "${S}"
+ cp ${A} "${S}"
+}
+
+# @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 "${S}" -type f -exec
+ sed -i 's|/usr/lib/build|/usr/share/suse-build|g' {} +
}

# @FUNCTION: obs-service_src_install
@@ -81,17 +93,17 @@
debug-print-function ${FUNCNAME} "$@"
debug-print "Installing service "${OBS_SERVICE_NAME}""
exeinto /usr/lib/obs/service
- doexe "${DISTDIR}"/${OBS_SERVICE_NAME}
+ doexe "${S}"/${OBS_SERVICE_NAME}
insinto /usr/lib/obs/service
- doins "${DISTDIR}"/${OBS_SERVICE_NAME}.service
+ doins "${S}"/${OBS_SERVICE_NAME}.service
if [[ -n ${ADDITIONAL_FILES} ]]; then
debug-print "Installing following additional files:"
debug-print " ${ADDITIONAL_FILES}"
exeinto /usr/lib/obs/service/${OBS_SERVICE_NAME}.files
for i in ${ADDITIONAL_FILES}; do
- doexe "${DISTDIR}"/${i}
+ doexe "${S}"/${i}
done
fi
}

-EXPORT_FUNCTIONS src_install src_unpack
+EXPORT_FUNCTIONS src_install src_prepare src_unpack
 

Thread Tools




All times are GMT. The time now is 05:36 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org