From: Alexey Tourbin <at@altlinux.ru> To: devel@lists.altlinux.org Subject: Re: [devel] [git update] packages/rpm: heads/master Date: Fri, 2 Mar 2007 00:28:57 +0300 Message-ID: <20070301212857.GN32320@localhost.localdomain> (raw) In-Reply-To: <20070211220836.97D3E42C08D7@ssh.git.local.altlinux.org> [-- Attachment #1: Type: text/plain, Size: 5029 bytes --] On Mon, Feb 12, 2007 at 01:08:36AM +0300, Dmitry V. Levin wrote: > Update of /people/ldv/packages/rpm.git > > Changes statistics since `4.0.4-alt72-g6a53902' follows: > autodeps/linux.prov.in | 2 ++ > autodeps/linux.req.in | 29 +++++++++++++++++++++++++++++ > platform.in | 4 ++-- > 3 files changed, 33 insertions(+), 2 deletions(-) > > Changelog since `4.0.4-alt72-g6a53902' follows: > commit 7227d450caf39c13da3596bd17b60dc4d20c575a > Merge: 6a53902827037e9f38fbbdbc2509996fc12b52b5 280e69d9a539cf066a3a072e9c8fda6e97a420f1 > Author: Dmitry V. Levin <ldv@altlinux> > Date: Sun Feb 11 22:02:54 2007 +0000 > > Merge branch 'master' of git.alt:/people/damir/packages/rpm > > commit 280e69d9a539cf066a3a072e9c8fda6e97a420f1 > Author: Damir Shayhutdinov <damir@altlinux> > Date: Sat Feb 10 19:16:04 2007 +0300 > > Added hooks for Java autoreq facility. > > Signed-off-by: Damir Shayhutdinov <damir@altlinux> > > Full diff since `4.0.4-alt72-g6a53902' follows: > diff --git a/autodeps/linux.prov.in b/autodeps/linux.prov.in > index cd59580..fc9fb8f 100755 > --- a/autodeps/linux.prov.in > +++ b/autodeps/linux.prov.in > @@ -52,6 +52,8 @@ ParseMethod() > FIND_SHELL= > FIND_TCL= > ;; > + java|nojava) > + ;; > lib) > FIND_LIBS=1 > ;; > diff --git a/autodeps/linux.req.in b/autodeps/linux.req.in > index f1980e2..80dfa45 100755 > --- a/autodeps/linux.req.in > +++ b/autodeps/linux.req.in > @@ -36,6 +36,7 @@ exit_handler() > trap exit_handler EXIT > > FIND_FILES= > +FIND_JAVA= > FIND_LIBPERL= > FIND_LIBS= > FIND_MONO= > @@ -54,6 +55,7 @@ ParseMethod() > case "${t/%,}" in > no|none|off|false) > FIND_FILES= > + FIND_JAVA= > FIND_LIBPERL= > FIND_LIBS= > FIND_MONO= > @@ -64,6 +66,12 @@ ParseMethod() > FIND_SHELL= > FIND_TCL= > ;; > + java) > + FIND_JAVA=1 > + ;; > + nojava) > + FIND_JAVA= > + ;; > lib|library) > FIND_LIBS=1 > ;; > @@ -131,6 +139,7 @@ ParseMethod() > FIND_LIBPERL=1 > FIND_LIBS=1 > FIND_MONO=1 > + FIND_JAVA=1 > FIND_PAM=1 > FIND_PERL=1 > FIND_PKGCONFIG=1 > @@ -159,6 +168,7 @@ if [ -n "$FIND_PAM" -o \ > fi > > if [ -z "$FIND_FILES" -a \ > + -z "$FIND_JAVA" -a \ > -z "$FIND_LIBPERL" -a \ > -z "$FIND_LIBS" -a \ > -z "$FIND_MONO" -a \ > @@ -187,11 +197,23 @@ case "$LD_PRELOAD" in > esac > > FOUND_REQS= > +LIST_JAVA= > LIST_MONO= > LIST_PERL= > LIST_PYTHON= > LIST_TCL= > > +FindJavaReqs() > +{ > + [ -n "$FIND_JAVA" -a -n "$LIST_JAVA" -a -x "@RPMCONFIGDIR@/java.req" ] || return 0 > + > + local r > + r="$(printf %s\\n "$LIST_JAVA" | > + @RPMCONFIGDIR@/java.req "$RPM_BUILD_DIR" "$RPM_BUILD_ROOT" "$RPM_LIBDIR")" || return 1 А какой смысл передавать дополнительные параметры скрипту, если, во-первых, эти параметры по-прежнему доступны через environment; а во-вторых, PRM_BUILD_DIR раскрывается совсем не в то, во что хочется, а в `rpm --eval %_builddir`, который одинаковый для всех пакетов? По-моему, параметры лучше зарезервировать для того, чтобы брать файлы из командной строки, а если командная строка пустая, тогда читать список файлов из stdin. Кстати, второе обстоятельство довольно тягостно: чтобы получить информацию из сборочного каталога на стадии find-requires, приходится копировать ее в %buildroot на стадии %install. Может кто-то припоминает левые файлы в %buildroot с названием /.perl.req. > + [ -z "$FOUND_REQS" ] && FOUND_REQS="$r" || FOUND_REQS="$FOUND_REQS > +$r" > +} > + > FindMonoReqs() > { > [ -n "$FIND_MONO" -a -n "$LIST_MONO" -a -x "@RPMCONFIGDIR@/mono.req" ] || return 0 > @@ -425,9 +447,16 @@ $f" > elif [ -z "${t##*MS Windows PE*}" ]; then > [ -z "$LIST_MONO" ] && LIST_MONO="$f" || LIST_MONO="$LIST_MONO > $f" > + elif [ -z "${t##*Zip archive data*}" -a -z "${f##*.jar}" ] || > + [ -z "${t##*compiled Java class data*}" ]; then > + [ -z "$LIST_JAVA" ] && LIST_JAVA="$f" || LIST_JAVA="$LIST_JAVA > +$f" > fi > done > > +# Find requires in listed Java files, if any > +FindJavaReqs > + > # Find requires in listed .Net files, if any > FindMonoReqs > > diff --git a/platform.in b/platform.in > index 19c778e..3bce5dd 100644 > --- a/platform.in > +++ b/platform.in > @@ -454,8 +454,8 @@ > @alt@%_tcl_req_skip "" > @alt@%_fixup_method binconfig pkgconfig libtool > @alt@%_strip_method %{?_enable_debug:none}%{!?_enable_debug:executable shared} > -@alt@%_findreq_default_method files lib mono pam perl pkgconfig python shell tcl > -@alt@%_findprov_default_method lib mono pam perl pkgconfig python shell tcl > +@alt@%_findreq_default_method files java lib mono pam perl pkgconfig python shell tcl > +@alt@%_findprov_default_method java lib mono pam perl pkgconfig python shell tcl > @alt@ > @alt@%_cleanup_topdir %nil > @alt@%_compress_topdir %_usr [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
parent reply other threads:[~2007-03-01 21:28 UTC|newest] Thread overview: expand[flat|nested] mbox.gz Atom feed [parent not found: <20070211220836.97D3E42C08D7@ssh.git.local.altlinux.org>]
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=20070301212857.GN32320@localhost.localdomain \ --to=at@altlinux.ru \ --cc=devel@lists.altlinux.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
ALT Linux Team development discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \ devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru public-inbox-index devel Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.devel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git