From 81de17180f1b870e2bc4ade50814f46ae9d6bf9d Mon Sep 17 00:00:00 2001 From: jbj Date: Wed, 11 Jul 2001 14:23:01 +0000 Subject: [PATCH] - fix: adjust arg count for --POPTdesc/--POPTargs deletion. - add linux per-platform macro %_smp_mflags . - document more popt aliases for --help usage. - remove --tarbuild from man page(s), use -t[abpcils] instead (#48666). CVS patchset: 4936 CVS date: 2001/07/11 14:23:01 --- CHANGES | 4 ++++ doc/rpm.8 | 1 - doc/rpmbuild.8 | 1 - platform.in | 4 ++++ popt/poptconfig.c | 5 +++- rpmpopt.in | 69 +++++++++++++++++++++++++++++++++---------------------- 6 files changed, 54 insertions(+), 30 deletions(-) diff --git a/CHANGES b/CHANGES index 298e3ca..f65ced1 100644 --- a/CHANGES +++ b/CHANGES @@ -160,6 +160,10 @@ - fix: -i CLI context broken Yet Again. - unlink all __db.nnn files before 1st db open. - python bindings should not segfault when fed bad data. + - fix: adjust arg count for --POPTdesc/--POPTargs deletion. + - add linux per-platform macro %_smp_mflags . + - document more popt aliases for --help usage. + - remove --tarbuild from man page(s), use -t[abpcils] instead (#48666). 4.0 -> 4.0.[12] - add doxygen and lclint annotations most everywhere. diff --git a/doc/rpm.8 b/doc/rpm.8 index 39f2415..5850229 100644 --- a/doc/rpm.8 +++ b/doc/rpm.8 @@ -34,7 +34,6 @@ rpm \- RPM Package Manager \fBrpm\fR {\fB--rebuild|--recompile\fR} \fB\fISOURCEPKG\fB\fR\fI ...\fR -\fBrpm\fR \fB--tarbuild\fR \fB\fITARBALL\fB\fR\fI ...\fR .SS "MISCELLANEOUS:" .PP diff --git a/doc/rpmbuild.8 b/doc/rpmbuild.8 index 5553929..50ae3ac 100644 --- a/doc/rpmbuild.8 +++ b/doc/rpmbuild.8 @@ -16,7 +16,6 @@ rpmbuild \- Build RPM Package(s) \fBrpmbuild\fR {\fB--rebuild|--recompile\fR} \fB\fISOURCEPKG\fB\fR\fI ...\fR -\fBrpmbuild\fR \fB--tarbuild\fR \fB\fITARBALL\fB\fR\fI ...\fR .SS "MISCELLANEOUS:" .PP diff --git a/platform.in b/platform.in index 7f38d2f..31bf5c6 100644 --- a/platform.in +++ b/platform.in @@ -72,6 +72,10 @@ infodir=%{?buildroot:%{buildroot}}%{_infodir} \\\ install +%_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \ + && RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \ + [ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-j${RPM_BUILD_NCPUS}") + @MULTILIBSTART@ #--------------------------------------------------------------------- # Multilibs diff --git a/popt/poptconfig.c b/popt/poptconfig.c index 6aafde8..c103265 100644 --- a/popt/poptconfig.c +++ b/popt/poptconfig.c @@ -66,8 +66,11 @@ static void configLine(poptContext con, char * line) if (j != i) item->argv[j] = item->argv[i]; } - if (j != i) + if (j != i) { item->argv[j] = NULL; + item->argc = j; + } + /*@=modobserver@*/ if (!strcmp(entryType, "alias")) diff --git a/rpmpopt.in b/rpmpopt.in index 168d367..b02f09c 100644 --- a/rpmpopt.in +++ b/rpmpopt.in @@ -4,6 +4,13 @@ # This file *should not be modified*. Local customizations # belong in /etc/popt, not here. This file will be replaced # whenever a new version of RPM is installed. +# +# Note: Not all popt aliases are documented. This is a decision on my +# part as to which are the more important aliases. Feel free to clip +# a copy of the alias/exec here and place in /etc/popt or ~/.popt with +# your own words added. It's easier than arguing about how many options +# fit on the head of an executable :-) +# rpm alias --scripts --qf '\ %|PREIN?{preinstall scriptlet\ @@ -27,12 +34,13 @@ rpm alias --scripts --qf '\ --POPTdesc=$"list install/erase scriptlets from package(s)" rpm alias --setperms -q --qf '[\[ -L %{FILENAMES:shescape} \] || chmod %7.7{FILEMODES:octal} %{FILENAMES:shescape}\n]' \ - --pipe "grep -v \(none\) | sed 's/chmod .../chmod /' | sh" + --pipe "grep -v \(none\) | sed 's/chmod .../chmod /' | sh" \ + --POPTdesc=$"set permissions of files in a package" rpm alias --setugids -q --qf \ '[ch %{FILEUSERNAME:shescape} %{FILEGROUPNAME:shescape} %{FILENAMES:shescape}\n]' \ - --pipe "(echo 'ch() { chown -- \"$1\" \"$3\";chgrp -- \"$2\" \"$3\"; }';grep -v \(none\))|sh" - + --pipe "(echo 'ch() { chown -- \"$1\" \"$3\";chgrp -- \"$2\" \"$3\"; }';grep -v \(none\))|sh" \ + --POPTdesc=$"set user/group ownership of files in a package" rpm alias --conflicts --qf \ "[%{CONFLICTNAME} %{CONFLICTFLAGS:depflags} %{CONFLICTVERSION}\n]" \ @@ -77,8 +85,11 @@ rpm alias --last --qf '%|INSTALLTIME?{%{INSTALLTIME}}:{000000000}| %{NAME}-%{VER rpm alias --filesbypkg --qf '[%-25{=NAME} %{FILENAMES}\n]' \ --POPTdesc=$"list all files from each package" -rpm alias --redhatprovides -q --define '_dbpath /usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/redhat' --whatprovides -rpm alias --redhatrequires -q --define '_dbpath /usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/redhat' --whatrequires +rpm alias --redhatprovides -q --define '_dbpath /usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/redhat' --whatprovides \ + --POPTdesc=$"find package name that contains a provided capability (needs rpmdb-redhat package installed)" + +rpm alias --redhatrequires -q --define '_dbpath /usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/redhat' --whatrequires \ + --POPTdesc=$"find package name that contains a required capability (needs rpmdb-redhat package installed)" # colon separated i18n domains to use as PO catalogue lookaside for * retrieving header group/description/summary. @@ -87,7 +98,9 @@ rpm alias --redhatrequires -q --define '_dbpath /usr/lib/rpmdb/%{_arch}-%{_vendo rpm alias --i18ndomains --define '_i18ndomains !#:+' # Build policies enabled from command line. Last policy applies. -rpm alias --buildpolicy --define '__os_install_post @RPMCONFIGDIR@/brp-!#:+' +rpm alias --buildpolicy --define '__os_install_post @RPMCONFIGDIR@/brp-!#:+' \ + --POPTdesc=$"set buildroot (e.g. compress man pages)" \ + --POPTargs=$"" # Choose db interface: # 0 same as 1 @@ -164,8 +177,12 @@ rpm exec -V rpmv -V rpm exec -y rpmv -y rpm exec --verify rpmv --verify -rpm alias --with --define "_with_!#:+ --with-!#:+" -rpm alias --without --define "_without_!#:+ --without-!#:+" +rpm alias --with --define "_with_!#:+ --with-!#:+" \ + --POPTdesc=$"enable configure