* [devel] enhanced RPM_SCRIPTS_DEBUG support, implemented debug levels
@ 2007-09-19 10:49 Alexey Tourbin
2007-09-19 13:25 ` Dmitry V. Levin
0 siblings, 1 reply; 2+ messages in thread
From: Alexey Tourbin @ 2007-09-19 10:49 UTC (permalink / raw)
To: devel
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [devel] enhanced RPM_SCRIPTS_DEBUG support, implemented debug levels
2007-09-19 10:49 [devel] enhanced RPM_SCRIPTS_DEBUG support, implemented debug levels Alexey Tourbin
@ 2007-09-19 13:25 ` Dmitry V. Levin
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry V. Levin @ 2007-09-19 13:25 UTC (permalink / raw)
To: ALT Devel discussion list
[-- Attachment #1: Type: text/plain, Size: 2643 bytes --]
On Wed, Sep 19, 2007 at 02:49:11PM +0400, Alexey Tourbin wrote:
> 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". Хто знает ответ?
--target приводит к повторной инициализации, старые макросы теряются.
--
ldv
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-09-19 13:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-19 10:49 [devel] enhanced RPM_SCRIPTS_DEBUG support, implemented debug levels Alexey Tourbin
2007-09-19 13:25 ` Dmitry V. Levin
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