From: Alexey Tourbin <at@altlinux.ru> To: devel@lists.altlinux.org Subject: [devel] enhanced RPM_SCRIPTS_DEBUG support, implemented debug levels Date: Wed, 19 Sep 2007 14:49:11 +0400 Message-ID: <20070919104911.GA17683@solemn.turbinal> (raw) [-- Attachment #1: Type: text/plain, Size: 2371 bytes --] On Sun, Mar 04, 2007 at 09:47:34PM +0300, Alexey Tourbin wrote: > Just setting -x is very noisy. Here is a better plan. I implement 3 > debug levels: verbose (1), debug (2, implies verbose) and -x (3, implies > debug). I move RPM_SCRIPTS_DEBUG test from scripts to scripts/functions, > as well as provide Verbose() and Debug() shell functions for use in scripts. > > Furthermore, _scripts_debug macro is now automatically set when rpmbuild > is invoked with --verbose option. Use -vv for debug and -vvv for -x. > --- > autodeps/linux.prov.in | 2 -- > autodeps/linux.req.in | 2 -- > rpmqv.c | 14 ++++++++++++-- > scripts/functions | 18 ++++++++++++++++++ > scripts/ldd.in | 2 -- > 5 files changed, 30 insertions(+), 8 deletions(-) > У меня есть вопрос по rpmpopt. > diff --git a/rpmqv.c b/rpmqv.c > index e0acd57..de191cb 100755 > --- a/rpmqv.c > +++ b/rpmqv.c > @@ -942,7 +942,12 @@ int main(int argc, const char ** argv) > case MODE_REBUILD: > case MODE_RECOMPILE: > { const char * pkg; > - while (!rpmIsVerbose()) > + const char * scripts_debug = (rpmlogSetMask(0) >= RPMLOG_MASK(RPMMESS_DEBUG)<<1) > + ? "3" : rpmIsDebug() ? "2" : rpmIsVerbose() ? "1" : NULL; > + if (scripts_debug) > + addMacro(NULL, "_scripts_debug", NULL, scripts_debug, -1); > + > + while (!rpmIsVerbose()) > rpmIncreaseVerbosity(); > > if (!poptPeekArg(optCon)) > @@ -980,7 +985,12 @@ int main(int argc, const char ** argv) > case MODE_BUILD: > case MODE_TARBUILD: > { const char * pkg; > - while (!rpmIsVerbose()) > + const char * scripts_debug = (rpmlogSetMask(0) >= RPMLOG_MASK(RPMMESS_DEBUG)<<1) > + ? "3" : rpmIsDebug() ? "2" : rpmIsVerbose() ? "1" : NULL; > + if (scripts_debug) > + addMacro(NULL, "_scripts_debug", NULL, scripts_debug, -1); > + > + while (!rpmIsVerbose()) > rpmIncreaseVerbosity(); > > switch (ba->buildChar) { Я сделал вот такой хак, чтобы rmpbuild --verbose автоматически выставлял %_scripts_debug. Теперь вот какая ситуация: rpmbuild -ba ... -- _scripts_debug выставляется rpmbuild -ba --target i586 ... -- _scripts_debug не выставляется То есть при указании target где-то что-то теряется. Где и что? В /usr/lib/rpmpopt есть какой-то "exec --target". Хто знает ответ? [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next reply other threads:[~2007-09-19 10:49 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-09-19 10:49 Alexey Tourbin [this message] 2007-09-19 13:25 ` Dmitry V. Levin
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=20070919104911.GA17683@solemn.turbinal \ --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