* [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in net-firewall/ipset: ChangeLog metadata.xml ipset-2.3.0.20070828.ebuild [not found] <E1Ip2rU-0003os-Bw@stork.gentoo.org> @ 2007-11-05 18:03 ` Donnie Berkholz 2007-11-07 9:06 ` Peter Volkov 0 siblings, 1 reply; 4+ messages in thread From: Donnie Berkholz @ 2007-11-05 18:03 UTC (permalink / raw To: gentoo-dev, pva On 14:23 Mon 05 Nov , Peter Volkov (pva) wrote: > 1.1 net-firewall/ipset/ipset-2.3.0.20070828.ebuild > > file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-firewall/ipset/ipset-2.3.0.20070828.ebuild?rev=1.1&view=markup > plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-firewall/ipset/ipset-2.3.0.20070828.ebuild?rev=1.1&content-type=text/plain > src_defs() { > # these are used in both of src_compile and src_install > myconf="${myconf} PREFIX=" > myconf="${myconf} LIBDIR=/lib" Should this be get_libdir()? Also seems like instead of having a function to do this, you could just define the variables once in pkg_setup() or src_compile() as globals. > pkg_config() { > cd "${ROOT}${PORTAGE_TMPDIR}" > mkdir patch-o-matic-ng > cd patch-o-matic-ng > > IPTVERINS=`echo $(best_version net-firewall/iptables) | \ > sed -n 's:^[^/]*/[[:alpha:]]*-\([0-9]\+\([.][0-9]\+\)*[a-z]\?\(_\(pre\|p\|beta\|alpha\|rc\)[0-9]*\)*\)\(-r[0-9]\+\)\?$:\1:p'` > > einfo "Unpacking patch-o-matic-ng-${POM_PV}" > tar -jxf "${DISTDIR}"/patch-o-matic-ng-${POM_PV}.tar.bz2 || \ > die "Unable to unpack patch-o-matic-ng-${POM_PV}" > einfo "Unpacking iptables-${IPTVERINS}" > tar -jxf "${DISTDIR}"/iptables-${IPTVERINS}.tar.bz2 || \ > die "Unable to unpack iptables-${IPTVERINS}.tar.bz2" Could you just call unpack() here? > einfo "Enter path to your kernel sources, relative to ${ROOT}" > echo -n "[/usr/src/linux]: " > read K_DIR > [ "${ROOT}${K_DIR}" == "/" ] && K_DIR=${ROOT}/usr/src/linux /usr/src/linux should be what's used here, and if they want to change the kernel to affect, they should change where the symlink points instead of having a secondary config mechanism. Thanks, Donnie -- gentoo-dev@gentoo.org mailing list ^ permalink raw reply [flat|nested] 4+ messages in thread
* [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in net-firewall/ipset: ChangeLog metadata.xml ipset-2.3.0.20070828.ebuild 2007-11-05 18:03 ` [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in net-firewall/ipset: ChangeLog metadata.xml ipset-2.3.0.20070828.ebuild Donnie Berkholz @ 2007-11-07 9:06 ` Peter Volkov 2007-11-07 23:19 ` Donnie Berkholz 0 siblings, 1 reply; 4+ messages in thread From: Peter Volkov @ 2007-11-07 9:06 UTC (permalink / raw To: Donnie Berkholz; +Cc: gentoo-dev [-- Attachment #1: Type: text/plain, Size: 1671 bytes --] On Mon, 05/11/2007 в 10:03 -0800, Donnie Berkholz wrote: > On 14:23 Mon 05 Nov , Peter Volkov (pva) wrote: > > 1.1 net-firewall/ipset/ipset-2.3.0.20070828.ebuild > > > > src_defs() { > > # these are used in both of src_compile and src_install > > myconf="${myconf} PREFIX=" > > myconf="${myconf} LIBDIR=/lib" > > Should this be get_libdir()? Yes. Fixed. > Also seems like instead of having a function to do this, you could just > define the variables once in pkg_setup() or src_compile() as globals. Fixed too. > > pkg_config() { > > tar -jxf "${DISTDIR}"/iptables-${IPTVERINS}.tar.bz2 || \ > > die "Unable to unpack iptables-${IPTVERINS}.tar.bz2" > > Could you just call unpack() here? Ok. Done. BTW, is it possible to force portage to fetch sources if they do not exist in ${DISTDIR}? Also does there exist a better way to find iptables sources than find version without revision: IPTVERINS=`echo $(best_version net-firewall/iptables) | \ sed -n 's:^[^/]*/[[:alpha:]]*-\([0-9]\+\([.][0-9]\+\)*[a-z]\?\(_\(pre\|p\|beta\|alpha\|rc\)[0-9]*\)*\)\(-r[0-9]\+\)\?$:\1:p' and construct package name (iptables-${IPTVERINS}}.tar.bz2)? > > einfo "Enter path to your kernel sources, relative to ${ROOT}" > > echo -n "[/usr/src/linux]: " > > read K_DIR > > [ "${ROOT}${K_DIR}" == "/" ] && K_DIR=${ROOT}/usr/src/linux > > /usr/src/linux should be what's used here, and if they want to change > the kernel to affect, they should change where the symlink points > instead of having a secondary config mechanism. Agree, and fixed too. Thank you, very much, for review. -- Peter. [-- Attachment #2: Эта часть сообщения подписана цифровой подписью --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in net-firewall/ipset: ChangeLog metadata.xml ipset-2.3.0.20070828.ebuild 2007-11-07 9:06 ` Peter Volkov @ 2007-11-07 23:19 ` Donnie Berkholz 2007-11-08 2:04 ` Alec Warner 0 siblings, 1 reply; 4+ messages in thread From: Donnie Berkholz @ 2007-11-07 23:19 UTC (permalink / raw To: gentoo-dev On 12:06 Wed 07 Nov , Peter Volkov wrote: > On Mon, 05/11/2007 в 10:03 -0800, Donnie Berkholz wrote: > > BTW, is it possible to force portage to fetch sources if they do not > exist in ${DISTDIR}? Also does there exist a better way to find > iptables sources than find version without revision: > > IPTVERINS=`echo $(best_version net-firewall/iptables) | \ > sed -n 's:^[^/]*/[[:alpha:]]*-\([0-9]\+\([.][0-9]\+\)*[a-z]\?\(_\(pre\|p\|beta\|alpha\|rc\)[0-9]*\)*\)\(-r[0-9]\+\)\?$:\1:p' > > and construct package name (iptables-${IPTVERINS}}.tar.bz2)? Not that I know of for fetching, but for the version, that sed seems awfully complex. I'd probably use bash substitution like this instead: IPTVERINS=$(best_version net-firewall/iptables) # Strip revision (safe, since nothing else has a hyphen followed by 'r') IPTVERINS=${IPTVERINS%-r*} # Strip category IPTVERINS=${IPTVERINS#*/} I previously brought up the idea of a way to access portage's CATEGORY/PN/PV parser from within ebuilds, but there didn't seem to be a whole lot of interest. Thanks, Donnie -- gentoo-dev@gentoo.org mailing list ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in net-firewall/ipset: ChangeLog metadata.xml ipset-2.3.0.20070828.ebuild 2007-11-07 23:19 ` Donnie Berkholz @ 2007-11-08 2:04 ` Alec Warner 0 siblings, 0 replies; 4+ messages in thread From: Alec Warner @ 2007-11-08 2:04 UTC (permalink / raw To: gentoo-dev On 11/7/07, Donnie Berkholz <dberkholz@gentoo.org> wrote: > On 12:06 Wed 07 Nov , Peter Volkov wrote: > > On Mon, 05/11/2007 в 10:03 -0800, Donnie Berkholz wrote: > > > > BTW, is it possible to force portage to fetch sources if they do not > > exist in ${DISTDIR}? Also does there exist a better way to find > > iptables sources than find version without revision: > > > > IPTVERINS=`echo $(best_version net-firewall/iptables) | \ > > sed -n 's:^[^/]*/[[:alpha:]]*-\([0-9]\+\([.][0-9]\+\)*[a-z]\?\(_\(pre\|p\|beta\|alpha\|rc\)[0-9]*\)*\)\(-r[0-9]\+\)\?$:\1:p' > > > > and construct package name (iptables-${IPTVERINS}}.tar.bz2)? > > Not that I know of for fetching, but for the version, that sed seems > awfully complex. I'd probably use bash substitution like this instead: > > IPTVERINS=$(best_version net-firewall/iptables) > # Strip revision (safe, since nothing else has a hyphen followed by 'r') > IPTVERINS=${IPTVERINS%-r*} > # Strip category > IPTVERINS=${IPTVERINS#*/} > > I previously brought up the idea of a way to access portage's > CATEGORY/PN/PV parser from within ebuilds, but there didn't seem to be a > whole lot of interest. I have some code lying around that does this, I should check it in ;) > > Thanks, > Donnie > -- > gentoo-dev@gentoo.org mailing list > > ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-11-08 2:07 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <E1Ip2rU-0003os-Bw@stork.gentoo.org> 2007-11-05 18:03 ` [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in net-firewall/ipset: ChangeLog metadata.xml ipset-2.3.0.20070828.ebuild Donnie Berkholz 2007-11-07 9:06 ` Peter Volkov 2007-11-07 23:19 ` Donnie Berkholz 2007-11-08 2:04 ` Alec Warner
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox