Merge changes from rpm-4.2.1 development.
CVS patchset: 6959 CVS date: 2003/11/23 19:50:52
This commit is contained in:
parent
fda9ddca9b
commit
3dcfeb3f9a
50
CHANGES
50
CHANGES
|
@ -1,27 +1,53 @@
|
|||
4.2 -> 4.3:
|
||||
- upgrade to zlib-1.2.beta7.
|
||||
- fix: short option help missing string terminator.
|
||||
- unify signal handling in librpmio, use condvar to deliver signal.
|
||||
- permit secondary tag match patterns with RPMQV_ALL.
|
||||
- fix: cut-n-paste error setting nopromote for Conflicts: (#81965).
|
||||
- don't use error string after gzclose (Dmitry V. Levin).
|
||||
|
||||
4.2 -> 4.2.1:
|
||||
- fix: nested %if handling, optind initialization posix vs. glibc.
|
||||
- add version check for package with provides and obsoletes.
|
||||
- hack out O_DIRECT support in db4 for now.
|
||||
- build with external beecrypt-3.0.0.
|
||||
- x86_64 -> athlon, ppc64[ip]series -> ppc64 arch compatibility.
|
||||
- treat missing epoch's exactly the same as Epoch: 0.
|
||||
- pass structure pointer, not args, through headerSprintf call chain.
|
||||
- add ":xml" header format modifier.
|
||||
- --queryformat '[%%{*:xml}\n]' to dump header content in XML.
|
||||
- fix: short option help missing string terminator.
|
||||
- unify signal handling in librpmio, use condvar to deliver signal.
|
||||
- resurrect manifests, RPMRC_NOTFOUND returned by readLead().
|
||||
- permit secondary tag match patterns with RPMQV_ALL.
|
||||
- python: missed tuple refcount in IDTXload/IDTXglob.
|
||||
- fix: IDTXglob should return REMOVETID sorted headers (#89857).
|
||||
- fix: cut-n-paste error setting nopromote for Conflicts: (#81965).
|
||||
- don't use error string after gzclose (Dmitry V. Levin).
|
||||
- fix: nested %if handling, optind initialization posix vs. glibc.
|
||||
- add version check for package with provides and obsoletes.
|
||||
- x86_64 -> athlon, ppc64[ip]series -> ppc64 arch compatibility.
|
||||
- treat missing epoch's exactly the same as Epoch: 0.
|
||||
- add ".arch" suffix to erase colored packages with identical NEVR.
|
||||
- update ja man pages (#92261).
|
||||
- backport rpmsw stopwatch, insturment rpmts operations.
|
||||
? toy method to enable --stats through bindings.
|
||||
- fdCLose typo (#97257).
|
||||
- brp-python-bytecompile to automagically bytecode compile python.
|
||||
? update for fr.po (#97829).
|
||||
- don't attempt to remove dbenv on --rebuilddb.
|
||||
- autorelocate ix86 package file paths on ia64.
|
||||
- resurrect manifests, RPMRC_NOTFOUND returned by readLead().
|
||||
- python: missed tuple refcount in IDTXload/IDTXglob.
|
||||
- fix: IDTXglob should return REMOVETID sorted headers (#89857).
|
||||
- resolve elf32/elf64 file conflicts to prefer elf64.
|
||||
- apply debugedit patch necessary to produce kernel -debuginfo files.
|
||||
? ia64: autorelocate only colored, not every, file when installing.
|
||||
? repair find-debuginfo.sh to avoid recursing in /usr/lib/debug.
|
||||
? fix: ia64: don't attempt autorelocate on .src.rpm's.
|
||||
? fix: debuginfo: -not -path /usr/lib/debug needed -prune too.
|
||||
? fix: packages w/o file colors segfault.
|
||||
? add amd64 as alias for x86_64 (#99553).
|
||||
? fix: add -n to brp-compress to avoid needless file conflicts.
|
||||
? fix: ia32 on ia64 segfaults because of automagic file relocations.
|
||||
? speed up convertdb1 (#103206).
|
||||
? revert i18n table change to preserve help array size.
|
||||
? add config directories for ppc64pseries/ppc64iseries.
|
||||
? filter GLIBC_PRIVATE dependencies.
|
||||
- fix: check added provides against installed conflicts (#110317).
|
||||
- changes for python 2.3
|
||||
- changes for libtool-1.5
|
||||
- changes for automake-1.7.8
|
||||
- changes for db-4.2.42.
|
||||
- splint fiddles.
|
||||
|
||||
4.1 -> 4.2:
|
||||
- set cachesize without a dbenv, the default is far too small.
|
||||
|
|
|
@ -75,8 +75,10 @@ rpmd.o: $(top_srcdir)/rpmqv.c
|
|||
$(COMPILE) -DIAM_RPMDB -o $@ -c rpmqv.c
|
||||
|
||||
rpmi_SOURCES =
|
||||
rpmi_LDFLAGS = $(myLDFLAGS) $(staticLDFLAGS)
|
||||
rpmi_LDADD = rpmi.o $(myLDADD) @WITH_LIBELF_LIB@ @WITH_BEECRYPT_LIB@
|
||||
#rpmi_LDFLAGS = $(myLDFLAGS) $(staticLDFLAGS)
|
||||
#rpmi_LDADD = rpmi.o $(myLDADD) @WITH_LIBELF_LIB@ @WITH_BEECRYPT_LIB@
|
||||
rpmi_LDFLAGS = $(myLDFLAGS)
|
||||
rpmi_LDADD = rpmi.o $(myLDADD)
|
||||
rpmi.o: $(top_srcdir)/rpmqv.c
|
||||
$(COMPILE) -DIAM_RPMEIU -o $@ -c rpmqv.c
|
||||
|
||||
|
|
10
autogen.sh
10
autogen.sh
|
@ -3,20 +3,20 @@
|
|||
export CFLAGS
|
||||
export LDFLAGS
|
||||
|
||||
LTV="libtoolize (GNU libtool) 1.4.3"
|
||||
LTV="libtoolize (GNU libtool) 1.5"
|
||||
ACV="autoconf (GNU Autoconf) 2.57"
|
||||
AMV="automake (GNU automake) 1.7.5"
|
||||
AMV="automake (GNU automake) 1.7.8"
|
||||
USAGE="
|
||||
This script documents the versions of the tools I'm using to build rpm:
|
||||
libtool-1.4.3
|
||||
libtool-1.5
|
||||
autoconf-2.57
|
||||
automake-1.7.5
|
||||
automake-1.7.8
|
||||
Simply edit this script to change the libtool/autoconf/automake versions
|
||||
checked if you need to, as rpm should build (and has built) with all
|
||||
recent versions of libtool/autoconf/automake.
|
||||
"
|
||||
|
||||
[ "`libtoolize --version`" != "$LTV" ] && echo "$USAGE" && exit 1
|
||||
[ "`libtoolize --version | head -1`" != "$LTV" ] && echo "$USAGE" && exit 1
|
||||
[ "`autoconf --version | head -1`" != "$ACV" ] && echo "$USAGE" && exit 1
|
||||
[ "`automake --version | head -1 | sed -e 's/1\.4[a-z]/1.4/'`" != "$AMV" ] && echo "$USAGE" && exit 1
|
||||
|
||||
|
|
|
@ -23,10 +23,12 @@
|
|||
/* XXX from /usr/include/bits/sigest.h in glibc-2.2.4 */
|
||||
/*@-sizeoftype@*/
|
||||
# define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int)))
|
||||
/*@-redef@*/
|
||||
typedef struct
|
||||
{
|
||||
unsigned long int __val[_SIGSET_NWORDS];
|
||||
} __sigset_t;
|
||||
/*@=redef@*/
|
||||
/*@=sizeoftype@*/
|
||||
#endif
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ librpmbuild_la_SOURCES = \
|
|||
parseBuildInstallClean.c parseChangelog.c parseDescription.c \
|
||||
parseFiles.c parsePreamble.c parsePrep.c parseReqs.c parseScript.c \
|
||||
parseSpec.c poptBT.c reqprov.c rpmfc.c spec.c
|
||||
librpmbuild_la_LDFLAGS = -release @VERSION@ $(LDFLAGS) \
|
||||
librpmbuild_la_LDFLAGS = -release 4.3 $(LDFLAGS) \
|
||||
$(top_builddir)/lib/librpm.la \
|
||||
$(top_builddir)/rpmdb/librpmdb.la \
|
||||
$(top_builddir)/rpmio/librpmio.la \
|
||||
|
|
47
configure.ac
47
configure.ac
|
@ -23,9 +23,9 @@ echo "
|
|||
* *
|
||||
* This is source code from the development branch of rpm-4.3. *
|
||||
* *
|
||||
* If you want the "production" rpm-4.2 code, then you should *
|
||||
* use an rpm-4.1.1 or rpm-4.2 src.rpm. Alternatively, if using a *
|
||||
* CVS checkout, do the following: *
|
||||
* If you want the "production" rpm-4.2.1 code, then you should use a *
|
||||
* rpm-4.2.1 src.rpm. Alternatively, if using a CVS checkout, do *
|
||||
* the following: *
|
||||
* *
|
||||
* cvs -d :pserver:anonymous@cvs.rpm.org:/cvs/devel login *
|
||||
* (no password, just carriage return) *
|
||||
|
@ -787,11 +787,11 @@ AC_TRY_LINK([#include <time.h>],printf("%ld", timezone),
|
|||
AC_MSG_RESULT($HAS_TIMEZONE)
|
||||
|
||||
dnl Check for missing typedefs
|
||||
AC_TYPE_MODE_T
|
||||
AC_TYPE_OFF_T
|
||||
AC_TYPE_PID_T
|
||||
AC_TYPE_MODE_T
|
||||
AC_TYPE_SIZE_T
|
||||
AC_STRUCT_ST_RDEV
|
||||
AC_TYPE_ST_RDEV_T
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_FUNC_ALLOCA
|
||||
|
@ -890,28 +890,41 @@ AC_ARG_WITH(python, [ --with-python build rpm python bindings ])
|
|||
WITH_PYTHON_VERSION=$withval
|
||||
if test $withval = auto ; then
|
||||
|
||||
AC_MSG_CHECKING(for python 2.2)
|
||||
AC_TRY_RUN([
|
||||
#include <python2.2/Python.h>
|
||||
AC_MSG_CHECKING(for python 2.3)
|
||||
AC_TRY_RUN([
|
||||
#include <python2.3/Python.h>
|
||||
main() {
|
||||
exit(strncmp("2.2", PY_VERSION, 3));
|
||||
exit(strncmp("2.3", PY_VERSION, 3));
|
||||
} ],
|
||||
withval=yes, withval=no, withval=yes)
|
||||
AC_MSG_RESULT($withval)
|
||||
if test $withval = yes ; then
|
||||
WITH_PYTHON_VERSION="2.2"
|
||||
WITH_PYTHON_VERSION="2.3"
|
||||
else
|
||||
|
||||
AC_MSG_CHECKING(for python 1.5.2)
|
||||
|
||||
AC_MSG_CHECKING(for python 2.2)
|
||||
AC_TRY_RUN([
|
||||
#include <python1.5/Python.h>
|
||||
main() {
|
||||
exit(strcmp("1.5.2", PY_VERSION));
|
||||
} ],
|
||||
#include <python2.2/Python.h>
|
||||
main() {
|
||||
exit(strncmp("2.2", PY_VERSION, 3));
|
||||
} ],
|
||||
withval=yes, withval=no, withval=yes)
|
||||
AC_MSG_RESULT($withval)
|
||||
if test $withval = yes ; then
|
||||
WITH_PYTHON_VERSION="1.5"
|
||||
WITH_PYTHON_VERSION="2.2"
|
||||
else
|
||||
|
||||
AC_MSG_CHECKING(for python 1.5.2)
|
||||
AC_TRY_RUN([
|
||||
#include <python1.5/Python.h>
|
||||
main() {
|
||||
exit(strcmp("1.5.2", PY_VERSION));
|
||||
} ],
|
||||
withval=yes, withval=no, withval=yes)
|
||||
AC_MSG_RESULT($withval)
|
||||
if test $withval = yes ; then
|
||||
WITH_PYTHON_VERSION="1.5"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Free Software Foundation, Inc.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2001-09-04'
|
||||
timestamp='2003-06-17'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
|
@ -24,8 +24,9 @@ timestamp='2001-09-04'
|
|||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Written by Per Bothner <bothner@cygnus.com>.
|
||||
# Please send patches to <config-patches@gnu.org>.
|
||||
# Originally written by Per Bothner <per@bothner.com>.
|
||||
# Please send patches to <config-patches@gnu.org>. Submit a context
|
||||
# diff and a properly formatted ChangeLog entry.
|
||||
#
|
||||
# This script attempts to guess a canonical system name similar to
|
||||
# config.sub. If it succeeds, it prints the system name on stdout, and
|
||||
|
@ -87,30 +88,42 @@ if test $# != 0; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
trap 'exit 1' 1 2 15
|
||||
|
||||
dummy=dummy-$$
|
||||
trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
|
||||
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
|
||||
# compiler to aid in system detection is discouraged as it requires
|
||||
# temporary files to be created and, as you can see below, it is a
|
||||
# headache to deal with in a portable fashion.
|
||||
|
||||
# CC_FOR_BUILD -- compiler used by this script.
|
||||
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
|
||||
# use `HOST_CC' if defined, but it is deprecated.
|
||||
|
||||
set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
|
||||
,,) echo "int dummy(){}" > $dummy.c ;
|
||||
for c in cc gcc c89 ; do
|
||||
($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
|
||||
if test $? = 0 ; then
|
||||
# Portable tmp directory creation inspired by the Autoconf team.
|
||||
|
||||
set_cc_for_build='
|
||||
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
|
||||
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
|
||||
: ${TMPDIR=/tmp} ;
|
||||
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
||||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
|
||||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
|
||||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
|
||||
dummy=$tmp/dummy ;
|
||||
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
|
||||
case $CC_FOR_BUILD,$HOST_CC,$CC in
|
||||
,,) echo "int x;" > $dummy.c ;
|
||||
for c in cc gcc c89 c99 ; do
|
||||
if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
|
||||
CC_FOR_BUILD="$c"; break ;
|
||||
fi ;
|
||||
done ;
|
||||
rm -f $dummy.c $dummy.o $dummy.rel ;
|
||||
if test x"$CC_FOR_BUILD" = x ; then
|
||||
CC_FOR_BUILD=no_compiler_found ;
|
||||
fi
|
||||
;;
|
||||
,,*) CC_FOR_BUILD=$CC ;;
|
||||
,*,*) CC_FOR_BUILD=$HOST_CC ;;
|
||||
esac'
|
||||
esac ;'
|
||||
|
||||
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
|
||||
# (ghazi@noc.rutgers.edu 1994-08-24)
|
||||
|
@ -123,33 +136,41 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
|
|||
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
||||
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
||||
|
||||
## for Red Hat Linux
|
||||
if test -f /etc/redhat-release ; then
|
||||
VENDOR=redhat ;
|
||||
else
|
||||
VENDOR= ;
|
||||
fi
|
||||
|
||||
# Note: order is significant - the case branches are not exclusive.
|
||||
|
||||
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
*:NetBSD:*:*)
|
||||
# Netbsd (nbsd) targets should (where applicable) match one or
|
||||
# NetBSD (nbsd) targets should (where applicable) match one or
|
||||
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
|
||||
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
|
||||
# switched to ELF, *-*-netbsd* would select the old
|
||||
# object file format. This provides both forward
|
||||
# compatibility and a consistent mechanism for selecting the
|
||||
# object file format.
|
||||
# Determine the machine/vendor (is the vendor relevant).
|
||||
case "${UNAME_MACHINE}" in
|
||||
amiga) machine=m68k-unknown ;;
|
||||
arm32) machine=arm-unknown ;;
|
||||
atari*) machine=m68k-atari ;;
|
||||
sun3*) machine=m68k-sun ;;
|
||||
mac68k) machine=m68k-apple ;;
|
||||
macppc) machine=powerpc-apple ;;
|
||||
hp3[0-9][05]) machine=m68k-hp ;;
|
||||
ibmrt|romp-ibm) machine=romp-ibm ;;
|
||||
*) machine=${UNAME_MACHINE}-unknown ;;
|
||||
#
|
||||
# Note: NetBSD doesn't particularly care about the vendor
|
||||
# portion of the name. We always set it to "unknown".
|
||||
sysctl="sysctl -n hw.machine_arch"
|
||||
UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
|
||||
/usr/sbin/$sysctl 2>/dev/null || echo unknown)`
|
||||
case "${UNAME_MACHINE_ARCH}" in
|
||||
armeb) machine=armeb-unknown ;;
|
||||
arm*) machine=arm-unknown ;;
|
||||
sh3el) machine=shl-unknown ;;
|
||||
sh3eb) machine=sh-unknown ;;
|
||||
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
|
||||
esac
|
||||
# The Operating System including object format, if it has switched
|
||||
# to ELF recently, or will in the future.
|
||||
case "${UNAME_MACHINE}" in
|
||||
i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
|
||||
case "${UNAME_MACHINE_ARCH}" in
|
||||
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
|
||||
eval $set_cc_for_build
|
||||
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep __ELF__ >/dev/null
|
||||
|
@ -166,75 +187,112 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
;;
|
||||
esac
|
||||
# The OS release
|
||||
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
# Debian GNU/NetBSD machines have a different userland, and
|
||||
# thus, need a distinct triplet. However, they do not need
|
||||
# kernel version information, so it can be replaced with a
|
||||
# suitable tag, in the style of linux-gnu.
|
||||
case "${UNAME_VERSION}" in
|
||||
Debian*)
|
||||
release='-gnu'
|
||||
;;
|
||||
*)
|
||||
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
;;
|
||||
esac
|
||||
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
|
||||
# contains redundant information, the shorter form:
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
||||
echo "${machine}-${os}${release}"
|
||||
exit 0 ;;
|
||||
amiga:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
arc:OpenBSD:*:*)
|
||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
hp300:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mac68k:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
macppc:OpenBSD:*:*)
|
||||
echo powerpc-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mvme68k:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mvme88k:OpenBSD:*:*)
|
||||
echo m88k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mvmeppc:OpenBSD:*:*)
|
||||
echo powerpc-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
pmax:OpenBSD:*:*)
|
||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sgi:OpenBSD:*:*)
|
||||
echo mipseb-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun3:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
wgrisc:OpenBSD:*:*)
|
||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:OpenBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
alpha:OSF1:*:*)
|
||||
if test $UNAME_RELEASE = "V4.0"; then
|
||||
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
|
||||
fi
|
||||
# According to Compaq, /usr/sbin/psrinfo has been available on
|
||||
# OSF/1 and Tru64 systems produced since 1995. I hope that
|
||||
# covers most systems running today. This code pipes the CPU
|
||||
# types through head -n 1, so we only detect the type of CPU 0.
|
||||
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
|
||||
case "$ALPHA_CPU_TYPE" in
|
||||
"EV4 (21064)")
|
||||
UNAME_MACHINE="alpha" ;;
|
||||
"EV4.5 (21064)")
|
||||
UNAME_MACHINE="alpha" ;;
|
||||
"LCA4 (21066/21068)")
|
||||
UNAME_MACHINE="alpha" ;;
|
||||
"EV5 (21164)")
|
||||
UNAME_MACHINE="alphaev5" ;;
|
||||
"EV5.6 (21164A)")
|
||||
UNAME_MACHINE="alphaev56" ;;
|
||||
"EV5.6 (21164PC)")
|
||||
UNAME_MACHINE="alphapca56" ;;
|
||||
"EV5.7 (21164PC)")
|
||||
UNAME_MACHINE="alphapca57" ;;
|
||||
"EV6 (21264)")
|
||||
UNAME_MACHINE="alphaev6" ;;
|
||||
"EV6.7 (21264A)")
|
||||
UNAME_MACHINE="alphaev67" ;;
|
||||
"EV6.8CB (21264C)")
|
||||
UNAME_MACHINE="alphaev68" ;;
|
||||
"EV6.8AL (21264B)")
|
||||
UNAME_MACHINE="alphaev68" ;;
|
||||
"EV6.8CX (21264D)")
|
||||
UNAME_MACHINE="alphaev68" ;;
|
||||
"EV6.9A (21264/EV69A)")
|
||||
UNAME_MACHINE="alphaev69" ;;
|
||||
"EV7 (21364)")
|
||||
UNAME_MACHINE="alphaev7" ;;
|
||||
"EV7.9 (21364A)")
|
||||
UNAME_MACHINE="alphaev79" ;;
|
||||
esac
|
||||
# A Vn.n version is a released version.
|
||||
# A Tn.n version is a released field test version.
|
||||
# A Xn.n version is an unreleased experimental baselevel.
|
||||
# 1.2 uses "1.2" for uname -r.
|
||||
cat <<EOF >$dummy.s
|
||||
.data
|
||||
\$Lformat:
|
||||
.byte 37,100,45,37,120,10,0 # "%d-%x\n"
|
||||
|
||||
.text
|
||||
.globl main
|
||||
.align 4
|
||||
.ent main
|
||||
main:
|
||||
.frame \$30,16,\$26,0
|
||||
ldgp \$29,0(\$27)
|
||||
.prologue 1
|
||||
.long 0x47e03d80 # implver \$0
|
||||
lda \$2,-1
|
||||
.long 0x47e20c21 # amask \$2,\$1
|
||||
lda \$16,\$Lformat
|
||||
mov \$0,\$17
|
||||
not \$1,\$18
|
||||
jsr \$26,printf
|
||||
ldgp \$29,0(\$26)
|
||||
mov 0,\$16
|
||||
jsr \$26,exit
|
||||
.end main
|
||||
EOF
|
||||
eval $set_cc_for_build
|
||||
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
|
||||
if test "$?" = 0 ; then
|
||||
case `./$dummy` in
|
||||
0-0)
|
||||
UNAME_MACHINE="alpha"
|
||||
;;
|
||||
1-0)
|
||||
UNAME_MACHINE="alphaev5"
|
||||
;;
|
||||
1-1)
|
||||
UNAME_MACHINE="alphaev56"
|
||||
;;
|
||||
1-101)
|
||||
UNAME_MACHINE="alphapca56"
|
||||
;;
|
||||
2-303)
|
||||
UNAME_MACHINE="alphaev6"
|
||||
;;
|
||||
2-307)
|
||||
UNAME_MACHINE="alphaev67"
|
||||
;;
|
||||
2-1307)
|
||||
UNAME_MACHINE="alphaev68"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
rm -f $dummy.s $dummy
|
||||
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
exit 0 ;;
|
||||
Alpha*:OpenVMS:*:*)
|
||||
echo alpha-hp-vms
|
||||
exit 0 ;;
|
||||
Alpha\ *:Windows_NT*:*)
|
||||
# How do we know it's Interix rather than the generic POSIX subsystem?
|
||||
# Should we change UNAME_MACHINE based on the output of uname instead
|
||||
|
@ -247,29 +305,11 @@ EOF
|
|||
Amiga*:UNIX_System_V:4.0:*)
|
||||
echo m68k-unknown-sysv4
|
||||
exit 0;;
|
||||
amiga:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:[Aa]miga[Oo][Ss]:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-amigaos
|
||||
exit 0 ;;
|
||||
arc64:OpenBSD:*:*)
|
||||
echo mips64el-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
arc:OpenBSD:*:*)
|
||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
hkmips:OpenBSD:*:*)
|
||||
echo mips-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
pmax:OpenBSD:*:*)
|
||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sgi:OpenBSD:*:*)
|
||||
echo mips-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
wgrisc:OpenBSD:*:*)
|
||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||
*:[Mm]orph[Oo][Ss]:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-morphos
|
||||
exit 0 ;;
|
||||
*:OS/390:*:*)
|
||||
echo i370-ibm-openedition
|
||||
|
@ -291,6 +331,13 @@ EOF
|
|||
NILE*:*:*:dcosx)
|
||||
echo pyramid-pyramid-svr4
|
||||
exit 0 ;;
|
||||
DRS?6000:unix:4.0:6*)
|
||||
echo sparc-icl-nx6
|
||||
exit 0 ;;
|
||||
DRS?6000:UNIX_SV:4.2*:7*)
|
||||
case `/usr/bin/uname -p` in
|
||||
sparc) echo sparc-icl-nx7 && exit 0 ;;
|
||||
esac ;;
|
||||
sun4H:SunOS:5.*:*)
|
||||
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
|
@ -319,7 +366,7 @@ EOF
|
|||
echo m68k-sun-sunos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun*:*:4.2BSD:*)
|
||||
UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
|
||||
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
|
||||
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
|
||||
case "`/bin/arch`" in
|
||||
sun3)
|
||||
|
@ -333,12 +380,6 @@ EOF
|
|||
aushp:SunOS:*:*)
|
||||
echo sparc-auspex-sunos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sparc*:NetBSD:*)
|
||||
echo `uname -p`-unknown-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
atari*:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
# The situation for MiNT is a little confusing. The machine name
|
||||
# can be virtually everything (everything which is not
|
||||
# "atarist" or "atariste" at least should have a processor
|
||||
|
@ -365,18 +406,6 @@ EOF
|
|||
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
|
||||
echo m68k-unknown-mint${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun3*:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mac68k:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mvme68k:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mvme88k:OpenBSD:*:*)
|
||||
echo m88k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
powerpc:machten:*:*)
|
||||
echo powerpc-apple-machten${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
|
@ -415,15 +444,20 @@ EOF
|
|||
exit (-1);
|
||||
}
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy \
|
||||
&& ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
|
||||
&& rm -f $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c \
|
||||
&& $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
|
||||
&& exit 0
|
||||
echo mips-mips-riscos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
Motorola:PowerMAX_OS:*:*)
|
||||
echo powerpc-motorola-powermax
|
||||
exit 0 ;;
|
||||
Motorola:*:4.3:PL8-*)
|
||||
echo powerpc-harris-powermax
|
||||
exit 0 ;;
|
||||
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
|
||||
echo powerpc-harris-powermax
|
||||
exit 0 ;;
|
||||
Night_Hawk:Power_UNIX:*:*)
|
||||
echo powerpc-harris-powerunix
|
||||
exit 0 ;;
|
||||
|
@ -496,8 +530,7 @@ EOF
|
|||
exit(0);
|
||||
}
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
|
||||
echo rs6000-ibm-aix3.2.5
|
||||
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||
echo rs6000-ibm-aix3.2.4
|
||||
|
@ -506,7 +539,7 @@ EOF
|
|||
fi
|
||||
exit 0 ;;
|
||||
*:AIX:*:[45])
|
||||
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
|
||||
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
|
||||
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
|
||||
IBM_ARCH=rs6000
|
||||
else
|
||||
|
@ -546,10 +579,8 @@ EOF
|
|||
9000/31? ) HP_ARCH=m68000 ;;
|
||||
9000/[34]?? ) HP_ARCH=m68k ;;
|
||||
9000/[678][0-9][0-9])
|
||||
case "${HPUX_REV}" in
|
||||
11.[0-9][0-9])
|
||||
if [ -x /usr/bin/getconf ]; then
|
||||
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
|
||||
if [ -x /usr/bin/getconf ]; then
|
||||
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
|
||||
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
|
||||
case "${sc_cpu_version}" in
|
||||
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
|
||||
|
@ -558,13 +589,13 @@ EOF
|
|||
case "${sc_kernel_bits}" in
|
||||
32) HP_ARCH="hppa2.0n" ;;
|
||||
64) HP_ARCH="hppa2.0w" ;;
|
||||
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
|
||||
esac ;;
|
||||
esac
|
||||
fi ;;
|
||||
esac
|
||||
if [ "${HP_ARCH}" = "" ]; then
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
fi
|
||||
if [ "${HP_ARCH}" = "" ]; then
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
|
||||
#define _HPUX_SOURCE
|
||||
#include <stdlib.h>
|
||||
|
@ -597,11 +628,21 @@ EOF
|
|||
exit (0);
|
||||
}
|
||||
EOF
|
||||
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
|
||||
if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
|
||||
rm -f $dummy.c $dummy
|
||||
fi ;;
|
||||
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
|
||||
test -z "$HP_ARCH" && HP_ARCH=hppa
|
||||
fi ;;
|
||||
esac
|
||||
if [ ${HP_ARCH} = "hppa2.0w" ]
|
||||
then
|
||||
# avoid double evaluation of $set_cc_for_build
|
||||
test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
|
||||
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
|
||||
then
|
||||
HP_ARCH="hppa2.0w"
|
||||
else
|
||||
HP_ARCH="hppa64"
|
||||
fi
|
||||
fi
|
||||
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
|
||||
exit 0 ;;
|
||||
ia64:HP-UX:*:*)
|
||||
|
@ -635,8 +676,7 @@ EOF
|
|||
exit (0);
|
||||
}
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
|
||||
echo unknown-hitachi-hiuxwe2
|
||||
exit 0 ;;
|
||||
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
|
||||
|
@ -664,9 +704,6 @@ EOF
|
|||
parisc*:Lites*:*:*)
|
||||
echo hppa1.1-hp-lites
|
||||
exit 0 ;;
|
||||
hppa*:OpenBSD:*:*)
|
||||
echo hppa-unknown-openbsd
|
||||
exit 0 ;;
|
||||
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
|
||||
echo c1-convex-bsd
|
||||
exit 0 ;;
|
||||
|
@ -685,9 +722,6 @@ EOF
|
|||
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
|
||||
echo c4-convex-bsd
|
||||
exit 0 ;;
|
||||
CRAY*X-MP:*:*:*)
|
||||
echo xmp-cray-unicos
|
||||
exit 0 ;;
|
||||
CRAY*Y-MP:*:*:*)
|
||||
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
|
@ -700,27 +734,21 @@ EOF
|
|||
CRAY*TS:*:*:*)
|
||||
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY*T3D:*:*:*)
|
||||
echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY*T3E:*:*:*)
|
||||
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY*SV1:*:*:*)
|
||||
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY-2:*:*:*)
|
||||
echo cray2-cray-unicos
|
||||
exit 0 ;;
|
||||
*:UNICOS/mp:*:*)
|
||||
echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
|
||||
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
|
||||
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
exit 0 ;;
|
||||
hp300:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
|
@ -730,11 +758,19 @@ EOF
|
|||
*:BSD/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:FreeBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
||||
exit 0 ;;
|
||||
*:OpenBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
*:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
|
||||
# Determine whether the default compiler uses glibc.
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#include <features.h>
|
||||
#if __GLIBC__ >= 2
|
||||
LIBC=gnu
|
||||
#else
|
||||
LIBC=
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
|
||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
|
||||
exit 0 ;;
|
||||
i*:CYGWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-cygwin
|
||||
|
@ -745,11 +781,17 @@ EOF
|
|||
i*:PW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-pw32
|
||||
exit 0 ;;
|
||||
x86:Interix*:[34]*)
|
||||
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
|
||||
exit 0 ;;
|
||||
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
|
||||
echo i${UNAME_MACHINE}-pc-mks
|
||||
exit 0 ;;
|
||||
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
|
||||
# How do we know it's Interix rather than the generic POSIX subsystem?
|
||||
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
|
||||
# UNAME_MACHINE based on the output of uname instead of i386?
|
||||
echo i386-pc-interix
|
||||
echo i586-pc-interix
|
||||
exit 0 ;;
|
||||
i*:UWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-uwin
|
||||
|
@ -769,23 +811,58 @@ EOF
|
|||
arm*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit 0 ;;
|
||||
cris:Linux:*:*)
|
||||
echo cris-axis-linux-gnu
|
||||
exit 0 ;;
|
||||
ia64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux
|
||||
echo ${UNAME_MACHINE}-${VENDOR:-unknown}-linux-gnu
|
||||
exit 0 ;;
|
||||
m68*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit 0 ;;
|
||||
mips:Linux:*:*)
|
||||
case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
|
||||
big) echo mips-unknown-linux-gnu && exit 0 ;;
|
||||
little) echo mipsel-unknown-linux-gnu && exit 0 ;;
|
||||
esac
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#undef CPU
|
||||
#undef mips
|
||||
#undef mipsel
|
||||
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
|
||||
CPU=mipsel
|
||||
#else
|
||||
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
|
||||
CPU=mips
|
||||
#else
|
||||
CPU=
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
|
||||
test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
|
||||
;;
|
||||
mips64:Linux:*:*)
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#undef CPU
|
||||
#undef mips64
|
||||
#undef mips64el
|
||||
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
|
||||
CPU=mips64el
|
||||
#else
|
||||
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
|
||||
CPU=mips64
|
||||
#else
|
||||
CPU=
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
|
||||
test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
|
||||
;;
|
||||
ppc:Linux:*:*)
|
||||
echo powerpc-unknown-linux-gnu
|
||||
echo powerpc-${VENDOR:-unknown}-linux-gnu
|
||||
exit 0 ;;
|
||||
ppc64:Linux:*:*)
|
||||
echo powerpc64-unknown-linux-gnu
|
||||
echo powerpc64-${VENDOR:-unknown}-linux-gnu
|
||||
exit 0 ;;
|
||||
alpha:Linux:*:*)
|
||||
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
|
||||
|
@ -813,7 +890,10 @@ EOF
|
|||
echo hppa64-unknown-linux-gnu
|
||||
exit 0 ;;
|
||||
s390:Linux:*:* | s390x:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-ibm-linux
|
||||
echo ${UNAME_MACHINE}-${VENDOR:-ibm}-linux-gnu
|
||||
exit 0 ;;
|
||||
sh64*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit 0 ;;
|
||||
sh*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
|
@ -822,13 +902,14 @@ EOF
|
|||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit 0 ;;
|
||||
x86_64:Linux:*:*)
|
||||
echo x86_64-unknown-linux-gnu
|
||||
echo x86_64-${VENDOR:-unknown}-linux-gnu
|
||||
exit 0 ;;
|
||||
i*86:Linux:*:*)
|
||||
# The BFD linker knows what the default object file format is, so
|
||||
# first see if it will tell us. cd to the root directory to prevent
|
||||
# problems with other programs or directories called `ld' in the path.
|
||||
ld_supported_targets=`cd /; ld --help 2>&1 \
|
||||
# Set LC_ALL=C to ensure ld outputs messages in English.
|
||||
ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
|
||||
| sed -ne '/supported targets:/!d
|
||||
s/[ ][ ]*/ /g
|
||||
s/.*supported targets: *//
|
||||
|
@ -840,7 +921,7 @@ EOF
|
|||
;;
|
||||
a.out-i386-linux)
|
||||
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
|
||||
exit 0 ;;
|
||||
exit 0 ;;
|
||||
coff-i386)
|
||||
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
|
||||
exit 0 ;;
|
||||
|
@ -852,32 +933,28 @@ EOF
|
|||
esac
|
||||
# Determine whether the default compiler is a.out or elf
|
||||
eval $set_cc_for_build
|
||||
cat >$dummy.c <<EOF
|
||||
#include <features.h>
|
||||
#ifdef __cplusplus
|
||||
#include <stdio.h> /* for printf() prototype */
|
||||
int main (int argc, char *argv[]) {
|
||||
#else
|
||||
int main (argc, argv) int argc; char *argv[]; {
|
||||
#endif
|
||||
#ifdef __ELF__
|
||||
# ifdef __GLIBC__
|
||||
# if __GLIBC__ >= 2
|
||||
printf ("%s-pc-linux-gnu\n", argv[1]);
|
||||
# else
|
||||
printf ("%s-pc-linux-gnulibc1\n", argv[1]);
|
||||
# endif
|
||||
# else
|
||||
printf ("%s-pc-linux-gnulibc1\n", argv[1]);
|
||||
# endif
|
||||
#else
|
||||
printf ("%s-pc-linux-gnuaout\n", argv[1]);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#include <features.h>
|
||||
#ifdef __ELF__
|
||||
# ifdef __GLIBC__
|
||||
# if __GLIBC__ >= 2
|
||||
LIBC=gnu
|
||||
# else
|
||||
LIBC=gnulibc1
|
||||
# endif
|
||||
# else
|
||||
LIBC=gnulibc1
|
||||
# endif
|
||||
#else
|
||||
#ifdef __INTEL_COMPILER
|
||||
LIBC=gnu
|
||||
#else
|
||||
LIBC=gnuaout
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
|
||||
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR:-pc}-linux-${LIBC}" && exit 0
|
||||
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
|
||||
;;
|
||||
i*86:DYNIX/ptx:4*:*)
|
||||
|
@ -894,6 +971,23 @@ EOF
|
|||
# Use sysv4.2uw... so that sysv4* matches it.
|
||||
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
|
||||
exit 0 ;;
|
||||
i*86:OS/2:*:*)
|
||||
# If we were able to find `uname', then EMX Unix compatibility
|
||||
# is probably installed.
|
||||
echo ${UNAME_MACHINE}-pc-os2-emx
|
||||
exit 0 ;;
|
||||
i*86:XTS-300:*:STOP)
|
||||
echo ${UNAME_MACHINE}-unknown-stop
|
||||
exit 0 ;;
|
||||
i*86:atheos:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-atheos
|
||||
exit 0 ;;
|
||||
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
|
||||
echo i386-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i*86:*DOS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-msdosdjgpp
|
||||
exit 0 ;;
|
||||
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
|
||||
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
|
||||
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
|
||||
|
@ -915,22 +1009,19 @@ EOF
|
|||
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
|
||||
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
|
||||
elif /bin/uname -X 2>/dev/null >/dev/null ; then
|
||||
UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
|
||||
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
|
||||
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
|
||||
UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
|
||||
(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
|
||||
(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
|
||||
&& UNAME_MACHINE=i586
|
||||
(/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
|
||||
(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
|
||||
&& UNAME_MACHINE=i686
|
||||
(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
|
||||
(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
|
||||
&& UNAME_MACHINE=i686
|
||||
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
|
||||
else
|
||||
echo ${UNAME_MACHINE}-pc-sysv32
|
||||
fi
|
||||
exit 0 ;;
|
||||
i*86:*DOS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-msdosdjgpp
|
||||
exit 0 ;;
|
||||
pc:*:*:*)
|
||||
# Left here for compatibility:
|
||||
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
||||
|
@ -954,9 +1045,15 @@ EOF
|
|||
# "miniframe"
|
||||
echo m68010-convergent-sysv
|
||||
exit 0 ;;
|
||||
mc68k:UNIX:SYSTEM5:3.51m)
|
||||
echo m68k-convergent-sysv
|
||||
exit 0 ;;
|
||||
M680?0:D-NIX:5.3:*)
|
||||
echo m68k-diab-dnix
|
||||
exit 0 ;;
|
||||
M68*:*:R3V[567]*:*)
|
||||
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
|
||||
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
|
||||
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
|
||||
OS_REL=''
|
||||
test -r /etc/.relid \
|
||||
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
|
||||
|
@ -973,9 +1070,6 @@ EOF
|
|||
mc68030:UNIX_System_V:4.*:*)
|
||||
echo m68k-atari-sysv4
|
||||
exit 0 ;;
|
||||
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
|
||||
echo i386-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
TSUNAMI:LynxOS:2.*:*)
|
||||
echo sparc-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
|
@ -1047,6 +1141,9 @@ EOF
|
|||
SX-5:SUPER-UX:*:*)
|
||||
echo sx5-nec-superux${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
SX-6:SUPER-UX:*:*)
|
||||
echo sx6-nec-superux${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
Power*:Rhapsody:*:*)
|
||||
echo powerpc-apple-rhapsody${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
|
@ -1054,18 +1151,24 @@ EOF
|
|||
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:Darwin:*:*)
|
||||
echo `uname -p`-apple-darwin${UNAME_RELEASE}
|
||||
case `uname -p` in
|
||||
*86) UNAME_PROCESSOR=i686 ;;
|
||||
powerpc) UNAME_PROCESSOR=powerpc ;;
|
||||
esac
|
||||
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:procnto*:*:* | *:QNX:[0123456789]*:*)
|
||||
if test "${UNAME_MACHINE}" = "x86pc"; then
|
||||
UNAME_PROCESSOR=`uname -p`
|
||||
if test "$UNAME_PROCESSOR" = "x86"; then
|
||||
UNAME_PROCESSOR=i386
|
||||
UNAME_MACHINE=pc
|
||||
fi
|
||||
echo `uname -p`-${UNAME_MACHINE}-nto-qnx
|
||||
echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:QNX:*:4*)
|
||||
echo i386-pc-qnx
|
||||
exit 0 ;;
|
||||
NSR-[KW]:NONSTOP_KERNEL:*:*)
|
||||
NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
|
||||
echo nsr-tandem-nsk${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:NonStop-UX:*:*)
|
||||
|
@ -1088,11 +1191,6 @@ EOF
|
|||
fi
|
||||
echo ${UNAME_MACHINE}-unknown-plan9
|
||||
exit 0 ;;
|
||||
i*86:OS/2:*:*)
|
||||
# If we were able to find `uname', then EMX Unix compatibility
|
||||
# is probably installed.
|
||||
echo ${UNAME_MACHINE}-pc-os2-emx
|
||||
exit 0 ;;
|
||||
*:TOPS-10:*:*)
|
||||
echo pdp10-unknown-tops10
|
||||
exit 0 ;;
|
||||
|
@ -1111,11 +1209,8 @@ EOF
|
|||
*:ITS:*:*)
|
||||
echo pdp10-unknown-its
|
||||
exit 0 ;;
|
||||
i*86:XTS-300:*:STOP)
|
||||
echo ${UNAME_MACHINE}-unknown-stop
|
||||
exit 0 ;;
|
||||
i*86:atheos:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-atheos
|
||||
SEI:*:*:SEIUX)
|
||||
echo mips-sei-seiux${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
esac
|
||||
|
||||
|
@ -1237,8 +1332,7 @@ main ()
|
|||
}
|
||||
EOF
|
||||
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
|
||||
|
||||
# Apollos put the system type in the environment.
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Free Software Foundation, Inc.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2001-09-07'
|
||||
timestamp='2003-06-18'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
|
@ -29,7 +29,8 @@ timestamp='2001-09-07'
|
|||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Please send patches to <config-patches@gnu.org>.
|
||||
# Please send patches to <config-patches@gnu.org>. Submit a context
|
||||
# diff and a properly formatted ChangeLog entry.
|
||||
#
|
||||
# Configuration subroutine to validate and canonicalize a configuration type.
|
||||
# Supply the specified configuration type as an argument.
|
||||
|
@ -117,7 +118,7 @@ esac
|
|||
# Here we must recognize all the valid KERNEL-OS combinations.
|
||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||
case $maybe_os in
|
||||
nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*)
|
||||
nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
;;
|
||||
|
@ -226,32 +227,45 @@ case $basic_machine in
|
|||
1750a | 580 \
|
||||
| a29k \
|
||||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
||||
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
|
||||
| c4x | clipper \
|
||||
| d10v | d30v | dsp16xx \
|
||||
| fr30 \
|
||||
| d10v | d30v | dlx | dsp16xx \
|
||||
| fr30 | frv \
|
||||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||
| i370 | i860 | i960 | ia64 \
|
||||
| ip2k \
|
||||
| m32r | m68000 | m68k | m88k | mcore \
|
||||
| mips16 | mips64 | mips64el | mips64orion | mips64orionel \
|
||||
| mips64vr4100 | mips64vr4100el | mips64vr4300 \
|
||||
| mips64vr4300el | mips64vr5000 | mips64vr5000el \
|
||||
| mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
|
||||
| mipsisa32 \
|
||||
| mips | mipsbe | mipseb | mipsel | mipsle \
|
||||
| mips16 \
|
||||
| mips64 | mips64el \
|
||||
| mips64vr | mips64vrel \
|
||||
| mips64orion | mips64orionel \
|
||||
| mips64vr4100 | mips64vr4100el \
|
||||
| mips64vr4300 | mips64vr4300el \
|
||||
| mips64vr5000 | mips64vr5000el \
|
||||
| mipsisa32 | mipsisa32el \
|
||||
| mipsisa32r2 | mipsisa32r2el \
|
||||
| mipsisa64 | mipsisa64el \
|
||||
| mipsisa64sb1 | mipsisa64sb1el \
|
||||
| mipsisa64sr71k | mipsisa64sr71kel \
|
||||
| mipstx39 | mipstx39el \
|
||||
| mn10200 | mn10300 \
|
||||
| msp430 \
|
||||
| ns16k | ns32k \
|
||||
| openrisc \
|
||||
| openrisc | or32 \
|
||||
| pdp10 | pdp11 | pj | pjl \
|
||||
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
|
||||
| pyramid \
|
||||
| s390 | s390x \
|
||||
| sh | sh[34] | sh[34]eb | shbe | shle \
|
||||
| sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \
|
||||
| stormy16 | strongarm \
|
||||
| tahoe | thumb | tic80 | tron \
|
||||
| v850 \
|
||||
| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh64 | sh64le \
|
||||
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
|
||||
| strongarm \
|
||||
| tahoe | thumb | tic4x | tic80 | tron \
|
||||
| v850 | v850e \
|
||||
| we32k \
|
||||
| x86 | xscale \
|
||||
| x86 | xscale | xstormy16 | xtensa \
|
||||
| z8k)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
|
@ -278,38 +292,56 @@ case $basic_machine in
|
|||
580-* \
|
||||
| a29k-* \
|
||||
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
|
||||
| alphapca5[67]-* | arc-* \
|
||||
| arm-* | armbe-* | armle-* | armv*-* \
|
||||
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
|
||||
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
||||
| avr-* \
|
||||
| bs2000-* \
|
||||
| c[123]* | c30-* | [cjt]90-* | c54x-* \
|
||||
| clipper-* | cray2-* | cydra-* \
|
||||
| d10v-* | d30v-* \
|
||||
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
|
||||
| clipper-* | cydra-* \
|
||||
| d10v-* | d30v-* | dlx-* \
|
||||
| elxsi-* \
|
||||
| f30[01]-* | f700-* | fr30-* | fx80-* \
|
||||
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
|
||||
| h8300-* | h8500-* \
|
||||
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
||||
| i*86-* | i860-* | i960-* | ia64-* \
|
||||
| ip2k-* \
|
||||
| m32r-* \
|
||||
| m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \
|
||||
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
|
||||
| m88110-* | m88k-* | mcore-* \
|
||||
| mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
|
||||
| mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
|
||||
| mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \
|
||||
| mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \
|
||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
|
||||
| mips16-* \
|
||||
| mips64-* | mips64el-* \
|
||||
| mips64vr-* | mips64vrel-* \
|
||||
| mips64orion-* | mips64orionel-* \
|
||||
| mips64vr4100-* | mips64vr4100el-* \
|
||||
| mips64vr4300-* | mips64vr4300el-* \
|
||||
| mips64vr5000-* | mips64vr5000el-* \
|
||||
| mipsisa32-* | mipsisa32el-* \
|
||||
| mipsisa32r2-* | mipsisa32r2el-* \
|
||||
| mipsisa64-* | mipsisa64el-* \
|
||||
| mipsisa64sb1-* | mipsisa64sb1el-* \
|
||||
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
|
||||
| mipstx39-* | mipstx39el-* \
|
||||
| msp430-* \
|
||||
| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
|
||||
| orion-* \
|
||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
||||
| pyramid-* \
|
||||
| romp-* | rs6000-* \
|
||||
| s390-* | s390x-* \
|
||||
| sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \
|
||||
| sparc-* | sparc64-* | sparc86x-* | sparclite-* \
|
||||
| sparcv9-* | sparcv9b-* | stormy16-* | strongarm-* | sv1-* \
|
||||
| t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
|
||||
| v850-* | vax-* \
|
||||
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
|
||||
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||||
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
|
||||
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
|
||||
| tahoe-* | thumb-* \
|
||||
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
||||
| tron-* \
|
||||
| v850-* | v850e-* | vax-* \
|
||||
| we32k-* \
|
||||
| x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \
|
||||
| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
|
||||
| xtensa-* \
|
||||
| ymp-* \
|
||||
| z8k-*)
|
||||
;;
|
||||
|
@ -343,6 +375,9 @@ case $basic_machine in
|
|||
basic_machine=a29k-none
|
||||
os=-bsd
|
||||
;;
|
||||
amd64)
|
||||
basic_machine=x86_64-pc
|
||||
;;
|
||||
amdahl)
|
||||
basic_machine=580-amdahl
|
||||
os=-sysv
|
||||
|
@ -374,6 +409,10 @@ case $basic_machine in
|
|||
basic_machine=ns32k-sequent
|
||||
os=-dynix
|
||||
;;
|
||||
c90)
|
||||
basic_machine=c90-cray
|
||||
os=-unicos
|
||||
;;
|
||||
convex-c1)
|
||||
basic_machine=c1-convex
|
||||
os=-bsd
|
||||
|
@ -394,16 +433,8 @@ case $basic_machine in
|
|||
basic_machine=c38-convex
|
||||
os=-bsd
|
||||
;;
|
||||
cray | ymp)
|
||||
basic_machine=ymp-cray
|
||||
os=-unicos
|
||||
;;
|
||||
cray2)
|
||||
basic_machine=cray2-cray
|
||||
os=-unicos
|
||||
;;
|
||||
[cjt]90)
|
||||
basic_machine=${basic_machine}-cray
|
||||
cray | j90)
|
||||
basic_machine=j90-cray
|
||||
os=-unicos
|
||||
;;
|
||||
crds | unos)
|
||||
|
@ -418,6 +449,14 @@ case $basic_machine in
|
|||
decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
|
||||
basic_machine=mips-dec
|
||||
;;
|
||||
decsystem10* | dec10*)
|
||||
basic_machine=pdp10-dec
|
||||
os=-tops10
|
||||
;;
|
||||
decsystem20* | dec20*)
|
||||
basic_machine=pdp10-dec
|
||||
os=-tops20
|
||||
;;
|
||||
delta | 3300 | motorola-3300 | motorola-delta \
|
||||
| 3300-motorola | delta-motorola)
|
||||
basic_machine=m68k-motorola
|
||||
|
@ -598,14 +637,6 @@ case $basic_machine in
|
|||
basic_machine=m68k-atari
|
||||
os=-mint
|
||||
;;
|
||||
mipsel*-linux*)
|
||||
basic_machine=mipsel-unknown
|
||||
os=-linux-gnu
|
||||
;;
|
||||
mips*-linux*)
|
||||
basic_machine=mips-unknown
|
||||
os=-linux-gnu
|
||||
;;
|
||||
mips3*-*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
|
||||
;;
|
||||
|
@ -620,6 +651,10 @@ case $basic_machine in
|
|||
basic_machine=m68k-rom68k
|
||||
os=-coff
|
||||
;;
|
||||
morphos)
|
||||
basic_machine=powerpc-unknown
|
||||
os=-morphos
|
||||
;;
|
||||
msdos)
|
||||
basic_machine=i386-pc
|
||||
os=-msdos
|
||||
|
@ -692,6 +727,10 @@ case $basic_machine in
|
|||
np1)
|
||||
basic_machine=np1-gould
|
||||
;;
|
||||
nv1)
|
||||
basic_machine=nv1-cray
|
||||
os=-unicosmp
|
||||
;;
|
||||
nsr-tandem)
|
||||
basic_machine=nsr-tandem
|
||||
;;
|
||||
|
@ -699,6 +738,10 @@ case $basic_machine in
|
|||
basic_machine=hppa1.1-oki
|
||||
os=-proelf
|
||||
;;
|
||||
or32 | or32-*)
|
||||
basic_machine=or32-unknown
|
||||
os=-coff
|
||||
;;
|
||||
OSE68000 | ose68000)
|
||||
basic_machine=m68000-ericsson
|
||||
os=-ose
|
||||
|
@ -721,49 +764,55 @@ case $basic_machine in
|
|||
pbb)
|
||||
basic_machine=m68k-tti
|
||||
;;
|
||||
pc532 | pc532-*)
|
||||
pc532 | pc532-*)
|
||||
basic_machine=ns32k-pc532
|
||||
;;
|
||||
pentium | p5 | k5 | k6 | nexgen)
|
||||
pentium | p5 | k5 | k6 | nexgen | viac3)
|
||||
basic_machine=i586-pc
|
||||
;;
|
||||
pentiumpro | p6 | 6x86 | athlon)
|
||||
pentiumpro | p6 | 6x86 | athlon | athlon_*)
|
||||
basic_machine=i686-pc
|
||||
;;
|
||||
pentiumii | pentium2)
|
||||
pentiumii | pentium2 | pentiumiii | pentium3)
|
||||
basic_machine=i686-pc
|
||||
;;
|
||||
pentium-* | p5-* | k5-* | k6-* | nexgen-*)
|
||||
pentium4)
|
||||
basic_machine=i786-pc
|
||||
;;
|
||||
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
|
||||
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumpro-* | p6-* | 6x86-* | athlon-*)
|
||||
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumii-* | pentium2-*)
|
||||
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
|
||||
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentium4-*)
|
||||
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pn)
|
||||
basic_machine=pn-gould
|
||||
;;
|
||||
power) basic_machine=power-ibm
|
||||
;;
|
||||
ppc) basic_machine=powerpc-unknown
|
||||
;;
|
||||
;;
|
||||
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
ppcle | powerpclittle | ppc-le | powerpc-little)
|
||||
basic_machine=powerpcle-unknown
|
||||
;;
|
||||
;;
|
||||
ppcle-* | powerpclittle-*)
|
||||
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
ppc64) basic_machine=powerpc64-unknown
|
||||
;;
|
||||
;;
|
||||
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
|
||||
basic_machine=powerpc64le-unknown
|
||||
;;
|
||||
;;
|
||||
ppc64le-* | powerpc64little-*)
|
||||
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
|
@ -788,6 +837,16 @@ case $basic_machine in
|
|||
basic_machine=a29k-amd
|
||||
os=-udi
|
||||
;;
|
||||
sb1)
|
||||
basic_machine=mipsisa64sb1-unknown
|
||||
;;
|
||||
sb1el)
|
||||
basic_machine=mipsisa64sb1el-unknown
|
||||
;;
|
||||
sei)
|
||||
basic_machine=mips-sei
|
||||
os=-seiux
|
||||
;;
|
||||
sequent)
|
||||
basic_machine=i386-sequent
|
||||
;;
|
||||
|
@ -795,7 +854,10 @@ case $basic_machine in
|
|||
basic_machine=sh-hitachi
|
||||
os=-hms
|
||||
;;
|
||||
sparclite-wrs)
|
||||
sh64)
|
||||
basic_machine=sh64-unknown
|
||||
;;
|
||||
sparclite-wrs | simso-wrs)
|
||||
basic_machine=sparclite-wrs
|
||||
os=-vxworks
|
||||
;;
|
||||
|
@ -862,19 +924,35 @@ case $basic_machine in
|
|||
os=-dynix
|
||||
;;
|
||||
t3e)
|
||||
basic_machine=t3e-cray
|
||||
basic_machine=alphaev5-cray
|
||||
os=-unicos
|
||||
;;
|
||||
t90)
|
||||
basic_machine=t90-cray
|
||||
os=-unicos
|
||||
;;
|
||||
tic54x | c54x*)
|
||||
basic_machine=tic54x-unknown
|
||||
os=-coff
|
||||
;;
|
||||
tic55x | c55x*)
|
||||
basic_machine=tic55x-unknown
|
||||
os=-coff
|
||||
;;
|
||||
tic6x | c6x*)
|
||||
basic_machine=tic6x-unknown
|
||||
os=-coff
|
||||
;;
|
||||
tx39)
|
||||
basic_machine=mipstx39-unknown
|
||||
;;
|
||||
tx39el)
|
||||
basic_machine=mipstx39el-unknown
|
||||
;;
|
||||
toad1)
|
||||
basic_machine=pdp10-xkl
|
||||
os=-tops20
|
||||
;;
|
||||
tower | tower-32)
|
||||
basic_machine=m68k-ncr
|
||||
;;
|
||||
|
@ -899,8 +977,8 @@ case $basic_machine in
|
|||
os=-vms
|
||||
;;
|
||||
vpp*|vx|vx-*)
|
||||
basic_machine=f301-fujitsu
|
||||
;;
|
||||
basic_machine=f301-fujitsu
|
||||
;;
|
||||
vxworks960)
|
||||
basic_machine=i960-wrs
|
||||
os=-vxworks
|
||||
|
@ -921,17 +999,13 @@ case $basic_machine in
|
|||
basic_machine=hppa1.1-winbond
|
||||
os=-proelf
|
||||
;;
|
||||
windows32)
|
||||
basic_machine=i386-pc
|
||||
os=-windows32-msvcrt
|
||||
;;
|
||||
xmp)
|
||||
basic_machine=xmp-cray
|
||||
os=-unicos
|
||||
;;
|
||||
xps | xps100)
|
||||
xps | xps100)
|
||||
basic_machine=xps100-honeywell
|
||||
;;
|
||||
ymp)
|
||||
basic_machine=ymp-cray
|
||||
os=-unicos
|
||||
;;
|
||||
z8k-*-coff)
|
||||
basic_machine=z8k-unknown
|
||||
os=-sim
|
||||
|
@ -952,13 +1026,6 @@ case $basic_machine in
|
|||
op60c)
|
||||
basic_machine=hppa1.1-oki
|
||||
;;
|
||||
mips)
|
||||
if [ x$os = x-linux-gnu ]; then
|
||||
basic_machine=mips-unknown
|
||||
else
|
||||
basic_machine=mips-mips
|
||||
fi
|
||||
;;
|
||||
romp)
|
||||
basic_machine=romp-ibm
|
||||
;;
|
||||
|
@ -978,13 +1045,16 @@ case $basic_machine in
|
|||
we32k)
|
||||
basic_machine=we32k-att
|
||||
;;
|
||||
sh3 | sh4 | sh3eb | sh4eb)
|
||||
sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
|
||||
basic_machine=sh-unknown
|
||||
;;
|
||||
sh64)
|
||||
basic_machine=sh64-unknown
|
||||
;;
|
||||
sparc | sparcv9 | sparcv9b)
|
||||
basic_machine=sparc-sun
|
||||
;;
|
||||
cydra)
|
||||
cydra)
|
||||
basic_machine=cydra-cydrome
|
||||
;;
|
||||
orion)
|
||||
|
@ -999,10 +1069,6 @@ case $basic_machine in
|
|||
pmac | pmac-mpw)
|
||||
basic_machine=powerpc-apple
|
||||
;;
|
||||
c4x*)
|
||||
basic_machine=c4x-none
|
||||
os=-coff
|
||||
;;
|
||||
*-unknown)
|
||||
# Make sure to match an already-canonicalized machine name.
|
||||
;;
|
||||
|
@ -1065,10 +1131,12 @@ case $os in
|
|||
| -chorusos* | -chorusrdb* \
|
||||
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
|
||||
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
|
||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||||
| -os2* | -vos*)
|
||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
||||
| -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-qnx*)
|
||||
|
@ -1080,8 +1148,10 @@ case $os in
|
|||
;;
|
||||
esac
|
||||
;;
|
||||
-nto-qnx*)
|
||||
;;
|
||||
-nto*)
|
||||
os=-nto-qnx
|
||||
os=`echo $os | sed -e 's|nto|nto-qnx|'`
|
||||
;;
|
||||
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
|
||||
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
|
||||
|
@ -1120,14 +1190,20 @@ case $os in
|
|||
-acis*)
|
||||
os=-aos
|
||||
;;
|
||||
-atheos*)
|
||||
os=-atheos
|
||||
;;
|
||||
-386bsd)
|
||||
os=-bsd
|
||||
;;
|
||||
-ctix* | -uts*)
|
||||
os=-sysv
|
||||
;;
|
||||
-nova*)
|
||||
os=-rtmk-nova
|
||||
;;
|
||||
-ns2 )
|
||||
os=-nextstep2
|
||||
os=-nextstep2
|
||||
;;
|
||||
-nsk*)
|
||||
os=-nsk
|
||||
|
@ -1166,8 +1242,14 @@ case $os in
|
|||
-xenix)
|
||||
os=-xenix
|
||||
;;
|
||||
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
|
||||
os=-mint
|
||||
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
|
||||
os=-mint
|
||||
;;
|
||||
-aros*)
|
||||
os=-aros
|
||||
;;
|
||||
-kaos*)
|
||||
os=-kaos
|
||||
;;
|
||||
-none)
|
||||
;;
|
||||
|
@ -1200,10 +1282,14 @@ case $basic_machine in
|
|||
arm*-semi)
|
||||
os=-aout
|
||||
;;
|
||||
c4x-* | tic4x-*)
|
||||
os=-coff
|
||||
;;
|
||||
# This must come before the *-dec entry.
|
||||
pdp10-*)
|
||||
os=-tops20
|
||||
;;
|
||||
pdp11-*)
|
||||
pdp11-*)
|
||||
os=-none
|
||||
;;
|
||||
*-dec | vax-*)
|
||||
|
@ -1230,6 +1316,9 @@ case $basic_machine in
|
|||
mips*-*)
|
||||
os=-elf
|
||||
;;
|
||||
or32-*)
|
||||
os=-coff
|
||||
;;
|
||||
*-tti) # must be before sparc entry or we get the wrong os.
|
||||
os=-sysv3
|
||||
;;
|
||||
|
@ -1293,19 +1382,19 @@ case $basic_machine in
|
|||
*-next)
|
||||
os=-nextstep3
|
||||
;;
|
||||
*-gould)
|
||||
*-gould)
|
||||
os=-sysv
|
||||
;;
|
||||
*-highlevel)
|
||||
*-highlevel)
|
||||
os=-bsd
|
||||
;;
|
||||
*-encore)
|
||||
os=-bsd
|
||||
;;
|
||||
*-sgi)
|
||||
*-sgi)
|
||||
os=-irix
|
||||
;;
|
||||
*-siemens)
|
||||
*-siemens)
|
||||
os=-sysv4
|
||||
;;
|
||||
*-masscomp)
|
||||
|
@ -1377,7 +1466,7 @@ case $basic_machine in
|
|||
-ptx*)
|
||||
vendor=sequent
|
||||
;;
|
||||
-vxsim* | -vxworks*)
|
||||
-vxsim* | -vxworks* | -windiss*)
|
||||
vendor=wrs
|
||||
;;
|
||||
-aux*)
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
+partial
|
||||
+forcehints
|
||||
|
||||
#-warnunixlib
|
||||
-warnposix
|
||||
|
||||
+unixlib
|
||||
|
@ -19,7 +18,7 @@
|
|||
-redecl
|
||||
-bufferoverflowhigh
|
||||
|
||||
-nullpass
|
||||
-nullpass # rpmExpand annoyance
|
||||
|
||||
# --- +partial artifacts
|
||||
-declundef
|
||||
|
|
|
@ -37,7 +37,7 @@ librpm_la_SOURCES = \
|
|||
rpmlead.c rpmlibprov.c rpmps.c rpmrc.c rpmte.c rpmts.c rpmvercmp.c \
|
||||
signature.c stringbuf.c transaction.c \
|
||||
verify.c
|
||||
librpm_la_LDFLAGS = -release @VERSION@ $(LDFLAGS) \
|
||||
librpm_la_LDFLAGS = -release 4.3 $(LDFLAGS) \
|
||||
$(top_builddir)/rpmdb/librpmdb.la \
|
||||
$(top_builddir)/rpmio/librpmio.la \
|
||||
$(top_builddir)/popt/libpopt.la
|
||||
|
|
|
@ -78,8 +78,8 @@ static int intcmp(const void * a, const void * b)
|
|||
*/
|
||||
static int removePackage(rpmts ts, Header h, int dboffset,
|
||||
/*@exposed@*/ /*@dependent@*/ /*@null@*/ alKey depends)
|
||||
/*@globals fileSystem @*/
|
||||
/*@modifies ts, h, fileSystem @*/
|
||||
/*@globals rpmGlobalMacroContext, h_errno, fileSystem @*/
|
||||
/*@modifies ts, h, rpmGlobalMacroContext, fileSystem @*/
|
||||
{
|
||||
rpmte p;
|
||||
|
||||
|
@ -1620,7 +1620,7 @@ int rpmtsCheck(rpmts ts)
|
|||
rpmds provides;
|
||||
|
||||
/*@-nullpass@*/ /* FIX: rpmts{A,O} can return null. */
|
||||
rpmMessage(RPMMESS_DEBUG, "========== +++ %s %s/%s 0x%x\n",
|
||||
rpmMessage(RPMMESS_DEBUG, "========== +++ %s %s/%s 0x%x\n",
|
||||
rpmteNEVR(p), rpmteA(p), rpmteO(p), rpmteColor(p));
|
||||
/*@=nullpass@*/
|
||||
rc = checkPackageDeps(ts, rpmteNEVR(p),
|
||||
|
@ -1631,19 +1631,10 @@ int rpmtsCheck(rpmts ts)
|
|||
if (rc)
|
||||
goto exit;
|
||||
|
||||
#if defined(DYING) || defined(__LCLINT__)
|
||||
/* XXX all packages now have Provides: name = version-release */
|
||||
/* Adding: check name against conflicts matches. */
|
||||
rc = checkDependentConflicts(ts, rpmteN(p));
|
||||
if (rc)
|
||||
goto exit;
|
||||
#endif
|
||||
|
||||
rc = 0;
|
||||
provides = rpmteDS(p, RPMTAG_PROVIDENAME);
|
||||
provides = rpmdsInit(provides);
|
||||
if (provides == NULL || rpmdsN(provides) == NULL)
|
||||
continue;
|
||||
if (provides != NULL)
|
||||
while (rpmdsNext(provides) >= 0) {
|
||||
const char * Name;
|
||||
|
||||
|
@ -1670,7 +1661,7 @@ int rpmtsCheck(rpmts ts)
|
|||
rpmfi fi;
|
||||
|
||||
/*@-nullpass@*/ /* FIX: rpmts{A,O} can return null. */
|
||||
rpmMessage(RPMMESS_DEBUG, "========== --- %s %s/%s 0x%x\n",
|
||||
rpmMessage(RPMMESS_DEBUG, "========== --- %s %s/%s 0x%x\n",
|
||||
rpmteNEVR(p), rpmteA(p), rpmteO(p), rpmteColor(p));
|
||||
/*@=nullpass@*/
|
||||
|
||||
|
|
|
@ -829,8 +829,9 @@ static int filenamesTag(Header h, /*@out@*/ rpmTagType * type,
|
|||
static int fileclassTag(Header h, /*@out@*/ rpmTagType * type,
|
||||
/*@out@*/ const void ** data, /*@out@*/ int_32 * count,
|
||||
/*@out@*/ int * freeData)
|
||||
/*@globals fileSystem @*/
|
||||
/*@modifies h, *type, *data, *count, *freeData, fileSystem @*/
|
||||
/*@globals rpmGlobalMacroContext, h_errno, fileSystem @*/
|
||||
/*@modifies h, *type, *data, *count, *freeData,
|
||||
rpmGlobalMacroContext, fileSystem @*/
|
||||
/*@requires maxSet(type) >= 0 /\ maxSet(data) >= 0
|
||||
/\ maxSet(count) >= 0 /\ maxSet(freeData) >= 0 @*/
|
||||
{
|
||||
|
@ -852,8 +853,9 @@ static int fileclassTag(Header h, /*@out@*/ rpmTagType * type,
|
|||
static int fileprovideTag(Header h, /*@out@*/ rpmTagType * type,
|
||||
/*@out@*/ const void ** data, /*@out@*/ int_32 * count,
|
||||
/*@out@*/ int * freeData)
|
||||
/*@globals fileSystem @*/
|
||||
/*@modifies h, *type, *data, *count, *freeData, fileSystem @*/
|
||||
/*@globals rpmGlobalMacroContext, h_errno, fileSystem @*/
|
||||
/*@modifies h, *type, *data, *count, *freeData,
|
||||
rpmGlobalMacroContext, fileSystem @*/
|
||||
/*@requires maxSet(type) >= 0 /\ maxSet(data) >= 0
|
||||
/\ maxSet(count) >= 0 /\ maxSet(freeData) >= 0 @*/
|
||||
{
|
||||
|
@ -875,8 +877,9 @@ static int fileprovideTag(Header h, /*@out@*/ rpmTagType * type,
|
|||
static int filerequireTag(Header h, /*@out@*/ rpmTagType * type,
|
||||
/*@out@*/ const void ** data, /*@out@*/ int_32 * count,
|
||||
/*@out@*/ int * freeData)
|
||||
/*@globals fileSystem @*/
|
||||
/*@modifies h, *type, *data, *count, *freeData, fileSystem @*/
|
||||
/*@globals rpmGlobalMacroContext, h_errno, fileSystem @*/
|
||||
/*@modifies h, *type, *data, *count, *freeData,
|
||||
rpmGlobalMacroContext, fileSystem @*/
|
||||
/*@requires maxSet(type) >= 0 /\ maxSet(data) >= 0
|
||||
/\ maxSet(count) >= 0 /\ maxSet(freeData) >= 0 @*/
|
||||
{
|
||||
|
|
|
@ -354,8 +354,8 @@ int rpmQueryVerify(QVA_t qva, rpmts ts, const char * arg)
|
|||
* @return 0 always
|
||||
*/
|
||||
int showQueryPackage(QVA_t qva, rpmts ts, Header h)
|
||||
/*@globals fileSystem, internalState @*/
|
||||
/*@modifies ts, h, fileSystem, internalState @*/;
|
||||
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
|
||||
/*@modifies ts, h, rpmGlobalMacroContext, fileSystem, internalState @*/;
|
||||
|
||||
/** \ingroup rpmcli
|
||||
* Display package information.
|
||||
|
|
74
lib/rpmfi.c
74
lib/rpmfi.c
|
@ -659,8 +659,9 @@ Header relocateFileList(const rpmts ts, rpmfi fi,
|
|||
int_32 fileCount;
|
||||
int_32 dirCount;
|
||||
uint_32 * fFlags = NULL;
|
||||
uint_32 * fColors = NULL;
|
||||
uint_32 * dColors = NULL;
|
||||
uint_16 * fModes = NULL;
|
||||
char * skipDirList;
|
||||
Header h;
|
||||
int nrelocated = 0;
|
||||
int fileAlloced = 0;
|
||||
|
@ -829,10 +830,11 @@ assert(p != NULL);
|
|||
xx = hge(h, RPMTAG_DIRINDEXES, NULL, (void **) &dirIndexes, NULL);
|
||||
xx = hge(h, RPMTAG_DIRNAMES, NULL, (void **) &dirNames, &dirCount);
|
||||
xx = hge(h, RPMTAG_FILEFLAGS, NULL, (void **) &fFlags, NULL);
|
||||
xx = hge(h, RPMTAG_FILECOLORS, NULL, (void **) &fColors, NULL);
|
||||
xx = hge(h, RPMTAG_FILEMODES, NULL, (void **) &fModes, NULL);
|
||||
|
||||
skipDirList = alloca(dirCount * sizeof(*skipDirList));
|
||||
memset(skipDirList, 0, dirCount * sizeof(*skipDirList));
|
||||
dColors = alloca(dirCount * sizeof(*dColors));
|
||||
memset(dColors, 0, dirCount * sizeof(*dColors));
|
||||
|
||||
newDirIndexes = alloca(sizeof(*newDirIndexes) * fileCount);
|
||||
memcpy(newDirIndexes, dirIndexes, sizeof(*newDirIndexes) * fileCount);
|
||||
|
@ -859,11 +861,12 @@ assert(p != NULL);
|
|||
}
|
||||
/*@=branchstate@*/
|
||||
|
||||
if (fn == NULL) /* XXX can't happen */
|
||||
continue;
|
||||
assert(fn != NULL); /* XXX can't happen */
|
||||
*fn = '\0';
|
||||
fnlen = stpcpy( stpcpy(fn, dirNames[dirIndexes[i]]), baseNames[i]) - fn;
|
||||
|
||||
if (fColors != NULL)
|
||||
dColors[dirIndexes[i]] |= fColors[i];
|
||||
/*
|
||||
* See if this file path needs relocating.
|
||||
*/
|
||||
|
@ -910,8 +913,6 @@ assert(p != NULL);
|
|||
/*@innercontinue@*/ continue;
|
||||
/*@innerbreak@*/ break;
|
||||
}
|
||||
if (j < dirCount)
|
||||
skipDirList[j] = 1;
|
||||
}
|
||||
if (actions) {
|
||||
actions[i] = FA_SKIPNSTATE;
|
||||
|
@ -981,6 +982,11 @@ assert(p != NULL);
|
|||
for (i = dirCount - 1; i >= 0; i--) {
|
||||
for (j = numRelocations - 1; j >= 0; j--) {
|
||||
|
||||
/* XXX Don't autorelocate uncolored directories. */
|
||||
if (j == p->autorelocatex
|
||||
&& (dColors[i] == 0 || !(dColors[i] & 0x1)))
|
||||
/*@innercontinue@*/ continue;
|
||||
|
||||
if (relocations[j].oldPath == NULL) /* XXX can't happen */
|
||||
/*@innercontinue@*/ continue;
|
||||
len = strcmp(relocations[j].oldPath, "/")
|
||||
|
@ -1295,42 +1301,54 @@ if (fi->actions == NULL)
|
|||
|
||||
if (ts != NULL)
|
||||
if (fi != NULL)
|
||||
if ((p = rpmtsRelocateElement(ts)) != NULL && rpmteType(p) == TR_ADDED) {
|
||||
if ((p = rpmtsRelocateElement(ts)) != NULL && rpmteType(p) == TR_ADDED
|
||||
&& !headerIsEntry(h, RPMTAG_SOURCEPACKAGE)
|
||||
&& !headerIsEntry(h, RPMTAG_ORIGBASENAMES))
|
||||
{
|
||||
const char * fmt = rpmGetPath("%{?_autorelocate_path}", NULL);
|
||||
const char * errstr;
|
||||
char * newPath;
|
||||
const char * march = NULL;
|
||||
const char * harch = NULL;
|
||||
Header foo;
|
||||
|
||||
/* XXX add os (or platform) checks. */
|
||||
rpmGetArchInfo(&march, NULL);
|
||||
|
||||
/* XXX error handling. */
|
||||
newPath = headerSprintf(h, fmt, rpmTagTable, rpmHeaderFormats, &errstr);
|
||||
fmt = _free(fmt);
|
||||
|
||||
if (newPath != NULL && *newPath != '\0'
|
||||
&& hge(h, RPMTAG_ARCH, NULL, (void **) &harch, NULL)
|
||||
&& harch != NULL && !rpmMachineScore(RPM_MACHTABLE_INSTARCH, harch) )
|
||||
#if __ia64__
|
||||
/* XXX On ia64, change leading /emul/ix86 -> /emul/ia32, ick. */
|
||||
if (newPath != NULL && *newPath != '\0'
|
||||
&& strlen(newPath) >= (sizeof("/emul/i386")-1)
|
||||
&& newPath[0] == '/' && newPath[1] == 'e' && newPath[2] == 'm'
|
||||
&& newPath[3] == 'u' && newPath[4] == 'l' && newPath[5] == '/'
|
||||
&& newPath[6] == 'i' && newPath[8] == '8' && newPath[9] == '6')
|
||||
{
|
||||
newPath[7] = 'a';
|
||||
newPath[8] = '3';
|
||||
newPath[9] = '2';
|
||||
}
|
||||
#endif
|
||||
|
||||
/* XXX Make sure autoreloc is not already specified. */
|
||||
i = p->nrelocs;
|
||||
if (newPath != NULL && *newPath != '\0' && p->relocs != NULL)
|
||||
for (i = 0; i < p->nrelocs; i++) {
|
||||
if (strcmp(p->relocs[i].oldPath, "/"))
|
||||
continue;
|
||||
if (strcmp(p->relocs[i].newPath, newPath))
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
|
||||
/* XXX test for incompatible arch triggering autorelocation is dumb. */
|
||||
if (newPath != NULL && *newPath != '\0' && i == p->nrelocs
|
||||
&& p->archScore == 0)
|
||||
{
|
||||
|
||||
#if __ia64__
|
||||
/* XXX On ia64, change leading /emul/ix86 -> /emul/ia32, ick. */
|
||||
if (strlen(newPath) >= (sizeof("/emul/i386")-1)
|
||||
&& newPath[0] == '/' && newPath[1] == 'e' && newPath[2] == 'm'
|
||||
&& newPath[3] == 'u' && newPath[4] == 'l' && newPath[5] == '/'
|
||||
&& newPath[6] == 'i' && newPath[8] == '8' && newPath[9] == '6')
|
||||
{
|
||||
newPath[7] = 'a';
|
||||
newPath[8] = '3';
|
||||
newPath[9] = '2';
|
||||
}
|
||||
#endif
|
||||
p->relocs =
|
||||
xrealloc(p->relocs, (p->nrelocs + 2) * sizeof(*p->relocs));
|
||||
p->relocs[p->nrelocs].oldPath = xstrdup("/");
|
||||
p->relocs[p->nrelocs].newPath = xstrdup(newPath);
|
||||
p->autorelocatex = p->nrelocs;
|
||||
p->nrelocs++;
|
||||
p->relocs[p->nrelocs].oldPath = NULL;
|
||||
p->relocs[p->nrelocs].newPath = NULL;
|
||||
|
|
14
lib/rpmfi.h
14
lib/rpmfi.h
|
@ -496,8 +496,8 @@ rpmfi rpmfiFree(/*@killref@*/ /*@only@*/ /*@null@*/ rpmfi fi)
|
|||
*/
|
||||
/*@null@*/
|
||||
rpmfi rpmfiNew(/*@null@*/ rpmts ts, Header h, rpmTag tagN, int scareMem)
|
||||
/*@globals fileSystem @*/
|
||||
/*@modifies ts, h, fileSystem @*/;
|
||||
/*@globals rpmGlobalMacroContext, h_errno, fileSystem @*/
|
||||
/*@modifies ts, h, rpmGlobalMacroContext, fileSystem @*/;
|
||||
|
||||
/**
|
||||
* Retrieve file classes from header.
|
||||
|
@ -510,8 +510,8 @@ rpmfi rpmfiNew(/*@null@*/ rpmts ts, Header h, rpmTag tagN, int scareMem)
|
|||
*/
|
||||
void rpmfiBuildFClasses(Header h,
|
||||
/*@out@*/ const char *** fclassp, /*@out@*/ int * fcp)
|
||||
/*@globals fileSystem @*/
|
||||
/*@modifies h, *fclassp, *fcp, fileSystem @*/;
|
||||
/*@globals rpmGlobalMacroContext, h_errno, fileSystem @*/
|
||||
/*@modifies h, *fclassp, *fcp, rpmGlobalMacroContext, fileSystem @*/;
|
||||
|
||||
/**
|
||||
* Retrieve per-file dependencies from header.
|
||||
|
@ -525,8 +525,8 @@ void rpmfiBuildFClasses(Header h,
|
|||
*/
|
||||
void rpmfiBuildFDeps(Header h, rpmTag tagN,
|
||||
/*@out@*/ const char *** fdepsp, /*@out@*/ int * fcp)
|
||||
/*@globals fileSystem @*/
|
||||
/*@modifies h, *fdepsp, *fcp, fileSystem @*/;
|
||||
/*@globals rpmGlobalMacroContext, h_errno, fileSystem @*/
|
||||
/*@modifies h, *fdepsp, *fcp, rpmGlobalMacroContext, fileSystem @*/;
|
||||
|
||||
/**
|
||||
* Return file type from mode_t.
|
||||
|
@ -553,7 +553,7 @@ int rpmfiCompare(const rpmfi afi, const rpmfi bfi)
|
|||
* @return file dispostion
|
||||
*/
|
||||
fileAction rpmfiDecideFate(const rpmfi ofi, rpmfi nfi, int skipMissing)
|
||||
/*@globals fileSystem, internalState @*/
|
||||
/*@globals h_errno, fileSystem, internalState @*/
|
||||
/*@modifies nfi, fileSystem, internalState @*/;
|
||||
|
||||
/**
|
||||
|
|
|
@ -787,7 +787,7 @@ int rpmErase(rpmts ts, struct rpmInstallArguments_s * ia,
|
|||
rpmMessage(RPMMESS_ERROR, _("\"%s\" specifies multiple packages\n"),
|
||||
*arg);
|
||||
numFailed++;
|
||||
break;
|
||||
/*@innerbreak@*/ break;
|
||||
}
|
||||
if (recOffset) {
|
||||
(void) rpmtsAddEraseElement(ts, h, recOffset);
|
||||
|
|
24
lib/rpmte.c
24
lib/rpmte.c
|
@ -85,8 +85,8 @@ static void delTE(rpmte p)
|
|||
static void addTE(rpmts ts, rpmte p, Header h,
|
||||
/*@dependent@*/ /*@null@*/ fnpyKey key,
|
||||
/*@null@*/ rpmRelocation * relocs)
|
||||
/*@globals fileSystem @*/
|
||||
/*@modifies ts, p, h, fileSystem @*/
|
||||
/*@globals rpmGlobalMacroContext, h_errno, fileSystem @*/
|
||||
/*@modifies ts, p, h, rpmGlobalMacroContext, fileSystem @*/
|
||||
{
|
||||
int scareMem = 0;
|
||||
HGE_t hge = (HGE_t)headerGetEntryMinMemory;
|
||||
|
@ -106,10 +106,22 @@ static void addTE(rpmts ts, rpmte p, Header h,
|
|||
|
||||
arch = NULL;
|
||||
xx = hge(h, RPMTAG_ARCH, NULL, (void **)&arch, NULL);
|
||||
p->arch = (arch != NULL ? xstrdup(arch) : NULL);
|
||||
if (arch != NULL) {
|
||||
p->arch = xstrdup(arch);
|
||||
p->archScore = rpmMachineScore(RPM_MACHTABLE_INSTARCH, arch);
|
||||
} else {
|
||||
p->arch = NULL;
|
||||
p->archScore = 0;
|
||||
}
|
||||
os = NULL;
|
||||
xx = hge(h, RPMTAG_OS, NULL, (void **)&os, NULL);
|
||||
p->os = (os != NULL ? xstrdup(os) : NULL);
|
||||
if (os != NULL) {
|
||||
p->os = xstrdup(os);
|
||||
p->osScore = rpmMachineScore(RPM_MACHTABLE_INSTOS, os);
|
||||
} else {
|
||||
p->os = NULL;
|
||||
p->osScore = 0;
|
||||
}
|
||||
|
||||
nb = strlen(p->NEVR) + 1;
|
||||
if (p->arch)
|
||||
|
@ -148,6 +160,7 @@ static void addTE(rpmts ts, rpmte p, Header h,
|
|||
p->relocs[i].oldPath = NULL;
|
||||
p->relocs[i].newPath = NULL;
|
||||
}
|
||||
p->autorelocatex = -1;
|
||||
|
||||
p->key = key;
|
||||
p->fd = NULL;
|
||||
|
@ -193,10 +206,10 @@ rpmte rpmteNew(const rpmts ts, Header h,
|
|||
int_32 * ep;
|
||||
int xx;
|
||||
|
||||
p->type = type;
|
||||
addTE(ts, p, h, key, relocs);
|
||||
switch (type) {
|
||||
case TR_ADDED:
|
||||
p->type = type;
|
||||
p->u.addedKey = pkgKey;
|
||||
ep = NULL;
|
||||
xx = headerGetEntry(h, RPMTAG_SIGSIZE, NULL, (void **)&ep, NULL);
|
||||
|
@ -205,7 +218,6 @@ rpmte rpmteNew(const rpmts ts, Header h,
|
|||
p->pkgFileSize += 96 + 256 + *ep;
|
||||
break;
|
||||
case TR_REMOVED:
|
||||
p->type = type;
|
||||
p->u.removed.dependsOnKey = pkgKey;
|
||||
p->u.removed.dboffset = dboffset;
|
||||
break;
|
||||
|
|
|
@ -77,6 +77,8 @@ struct rpmte_s {
|
|||
const char * arch; /*!< Architecture hint. */
|
||||
/*@only@*/ /*@null@*/
|
||||
const char * os; /*!< Operating system hint. */
|
||||
int archScore; /*!< (TR_ADDED) Arch score. */
|
||||
int osScore; /*!< (TR_ADDED) Os score. */
|
||||
|
||||
rpmte parent; /*!< Parent transaction element. */
|
||||
int degree; /*!< No. of immediate children. */
|
||||
|
@ -107,6 +109,7 @@ struct rpmte_s {
|
|||
/*@owned@*/ /*@null@*/
|
||||
rpmRelocation * relocs; /*!< (TR_ADDED) Payload file relocations. */
|
||||
int nrelocs; /*!< (TR_ADDED) No. of relocations. */
|
||||
int autorelocatex; /*!< (TR_ADDED) Auto relocation entry index. */
|
||||
/*@refcounted@*/ /*@null@*/
|
||||
FD_t fd; /*!< (TR_ADDED) Payload file descriptor. */
|
||||
|
||||
|
@ -168,8 +171,8 @@ rpmte rpmteNew(const rpmts ts, Header h, rpmElementType type,
|
|||
/*@null@*/ rpmRelocation * relocs,
|
||||
int dboffset,
|
||||
/*@exposed@*/ /*@dependent@*/ /*@null@*/ alKey pkgKey)
|
||||
/*@globals fileSystem @*/
|
||||
/*@modifies ts, h, fileSystem @*/;
|
||||
/*@globals rpmGlobalMacroContext, h_errno, fileSystem @*/
|
||||
/*@modifies ts, h, rpmGlobalMacroContext, fileSystem @*/;
|
||||
|
||||
/**
|
||||
* Retrieve type of transaction element.
|
||||
|
|
17
lib/rpmts.c
17
lib/rpmts.c
|
@ -185,10 +185,13 @@ int rpmtsVerifyDB(rpmts ts)
|
|||
return rpmdbVerify(ts->rootDir);
|
||||
}
|
||||
|
||||
/*@-boundsread@*/
|
||||
static int isArch(const char * arch)
|
||||
/*@*/
|
||||
{
|
||||
const char ** av;
|
||||
/*@-nullassign@*/
|
||||
/*@observer@*/
|
||||
static const char *arches[] = {
|
||||
"i386", "i486", "i586", "i686", "athlon", "x86_64",
|
||||
"alpha", "alphaev5", "alphaev56", "alphapca56", "alphaev6", "alphaev67",
|
||||
|
@ -206,6 +209,7 @@ static int isArch(const char * arch)
|
|||
"noarch",
|
||||
NULL,
|
||||
};
|
||||
/*@=nullassign@*/
|
||||
|
||||
for (av = arches; *av != NULL; av++) {
|
||||
if (!strcmp(arch, *av))
|
||||
|
@ -213,6 +217,7 @@ static int isArch(const char * arch)
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
/*@=boundsread@*/
|
||||
|
||||
rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
|
||||
const void * keyp, size_t keylen)
|
||||
|
@ -225,7 +230,7 @@ rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
|
|||
return NULL;
|
||||
|
||||
/* Parse out "N(EVR).A" tokens from a label key. */
|
||||
/*@-branchstate@*/
|
||||
/*@-bounds -branchstate@*/
|
||||
if (rpmtag == RPMDBI_LABEL && keyp != NULL) {
|
||||
const char * s = keyp;
|
||||
const char *se;
|
||||
|
@ -239,7 +244,7 @@ rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
|
|||
switch (c) {
|
||||
default:
|
||||
*t++ = c;
|
||||
break;
|
||||
/*@switchbreak@*/ break;
|
||||
case '(':
|
||||
/* XXX Fail if nested parens. */
|
||||
if (level++ != 0) {
|
||||
|
@ -248,7 +253,7 @@ rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
|
|||
}
|
||||
/* Parse explicit epoch. */
|
||||
for (se = s; *se && xisdigit(*se); se++)
|
||||
;
|
||||
{};
|
||||
if (*se == ':') {
|
||||
/* XXX skip explicit epoch's (for now) */
|
||||
*t++ = '-';
|
||||
|
@ -257,7 +262,7 @@ rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
|
|||
/* No Epoch: found. Convert '(' to '-' and chug. */
|
||||
*t++ = '-';
|
||||
}
|
||||
break;
|
||||
/*@switchbreak@*/ break;
|
||||
case ')':
|
||||
/* XXX Fail if nested parens. */
|
||||
if (--level != 0) {
|
||||
|
@ -265,7 +270,7 @@ rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
|
|||
return NULL;
|
||||
}
|
||||
/* Don't copy trailing ')' */
|
||||
break;
|
||||
/*@switchbreak@*/ break;
|
||||
}
|
||||
}
|
||||
if (level) {
|
||||
|
@ -281,7 +286,7 @@ rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
|
|||
arch = t;
|
||||
}
|
||||
}
|
||||
/*@=branchstate@*/
|
||||
/*@=bounds =branchstate@*/
|
||||
|
||||
mi = rpmdbInitIterator(ts->rdb, rpmtag, keyp, keylen);
|
||||
|
||||
|
|
|
@ -889,8 +889,8 @@ int rpmtsAddInstallElement(rpmts ts, Header h,
|
|||
* @return 0 on success
|
||||
*/
|
||||
int rpmtsAddEraseElement(rpmts ts, Header h, int dboffset)
|
||||
/*@globals fileSystem @*/
|
||||
/*@modifies ts, h, fileSystem @*/;
|
||||
/*@globals rpmGlobalMacroContext, h_errno, fileSystem @*/
|
||||
/*@modifies ts, h, rpmGlobalMacroContext, fileSystem @*/;
|
||||
|
||||
/** \ingroup rpmts
|
||||
* Retrieve keys from ordered transaction set.
|
||||
|
|
|
@ -1414,7 +1414,9 @@ assert(psm != NULL);
|
|||
|
||||
pkgKey = rpmteAddedKey(p);
|
||||
|
||||
rpmMessage(RPMMESS_DEBUG, "========== +++ %s\n", rpmteNEVR(p));
|
||||
rpmMessage(RPMMESS_DEBUG, "========== +++ %s %s-%s 0x%x\n",
|
||||
rpmteNEVR(p), rpmteA(p), rpmteO(p), rpmteColor(p));
|
||||
|
||||
p->h = NULL;
|
||||
/*@-type@*/ /* FIX: rpmte not opaque */
|
||||
{
|
||||
|
@ -1514,7 +1516,9 @@ assert(psm != NULL);
|
|||
case TR_REMOVED:
|
||||
(void) rpmswEnter(rpmtsOp(ts, RPMTS_OP_ERASE), 0);
|
||||
|
||||
rpmMessage(RPMMESS_DEBUG, "========== --- %s\n", rpmteNEVR(p));
|
||||
rpmMessage(RPMMESS_DEBUG, "========== --- %s %s-%s 0x%x\n",
|
||||
rpmteNEVR(p), rpmteA(p), rpmteO(p), rpmteColor(p));
|
||||
|
||||
/*
|
||||
* XXX This has always been a hack, now mostly broken.
|
||||
* If install failed, then we shouldn't erase.
|
||||
|
|
|
@ -29,7 +29,7 @@ gettextsrcdir = $(datadir)/gettext/po
|
|||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
|
||||
mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/mkinstalldirs" ;; esac`
|
||||
|
||||
CC = @CC@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
|
|
140
po/pl.po
140
po/pl.po
|
@ -9,7 +9,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: rpm 4.3-20030515\n"
|
||||
"POT-Creation-Date: 2003-05-15 18:53+0200\n"
|
||||
"POT-Creation-Date: 2003-08-26 15:43-0400\n"
|
||||
"PO-Revision-Date: 2003-06-08 22:42+0200\n"
|
||||
"Last-Translator: Jakub Bogusz <qboosh@pld.org.pl>\n"
|
||||
"Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"
|
||||
|
@ -1423,7 +1423,7 @@ msgid "rpmtsOrder failed, %d elements remain\n"
|
|||
msgstr "rpmtsOrder nie powiod³o siê, zosta³o %d elementów\n"
|
||||
|
||||
#: lib/formats.c:39 lib/formats.c:71 lib/formats.c:106 lib/formats.c:499
|
||||
#: rpmdb/header.c:3533 rpmdb/header.c:3562 rpmdb/header.c:3586
|
||||
#: rpmdb/header.c:3509 rpmdb/header.c:3538 rpmdb/header.c:3562
|
||||
msgid "(not a number)"
|
||||
msgstr "(nie jest liczb±)"
|
||||
|
||||
|
@ -1478,7 +1478,8 @@ msgid "file %s is on an unknown device\n"
|
|||
msgstr "plik %s jest na nieznanym urz±dzeniu\n"
|
||||
|
||||
#: lib/fsm.c:350
|
||||
msgid "========== Directories not explictly included in package:\n"
|
||||
#, fuzzy
|
||||
msgid "========== Directories not explicitly included in package:\n"
|
||||
msgstr "========== Katalogi nie w³±czone explicite do pakietu:\n"
|
||||
|
||||
#: lib/fsm.c:352
|
||||
|
@ -2233,7 +2234,7 @@ msgstr "%s nie powi
|
|||
msgid "%s failed: %s\n"
|
||||
msgstr "%s nie powiod³o siê: %s\n"
|
||||
|
||||
#: lib/query.c:118 lib/rpmts.c:460
|
||||
#: lib/query.c:118 lib/rpmts.c:558
|
||||
#, c-format
|
||||
msgid "incorrect format: %s\n"
|
||||
msgstr "b³êdny format: %s\n"
|
||||
|
@ -2281,7 +2282,7 @@ msgid "package has neither file owner or id lists\n"
|
|||
msgstr "pakiet nie ma list w³a¶cicieli ani id plików\n"
|
||||
|
||||
#: lib/query.c:428 lib/query.c:475 lib/rpminstall.c:123 lib/rpminstall.c:462
|
||||
#: lib/rpminstall.c:593 lib/rpminstall.c:1015 lib/rpmts.c:471
|
||||
#: lib/rpminstall.c:593 lib/rpminstall.c:1018 lib/rpmts.c:569
|
||||
#: tools/rpmgraph.c:120 tools/rpmgraph.c:157
|
||||
#, c-format
|
||||
msgid "open of %s failed: %s\n"
|
||||
|
@ -2365,7 +2366,7 @@ msgstr "numer rekordu pakietu: %u\n"
|
|||
msgid "record %u could not be read\n"
|
||||
msgstr "nie mo¿na odczytaæ rekordu %u\n"
|
||||
|
||||
#: lib/query.c:766 lib/rpminstall.c:779
|
||||
#: lib/query.c:766 lib/rpminstall.c:778
|
||||
#, c-format
|
||||
msgid "package %s is not installed\n"
|
||||
msgstr "pakiet %s nie jest zainstalowany\n"
|
||||
|
@ -2499,31 +2500,36 @@ msgstr " %s A %s\tB %s\n"
|
|||
msgid "package %s has unsatisfied %s: %s\n"
|
||||
msgstr "pakiet %s ma niespe³nione %s: %s\n"
|
||||
|
||||
#: lib/rpmfi.c:659
|
||||
#: lib/rpmfi.c:546
|
||||
#, c-format
|
||||
msgid "%s skipped due to missingok flag\n"
|
||||
msgstr "%s pominiêty z powodu flagi missingok\n"
|
||||
|
||||
#: lib/rpmfi.c:783
|
||||
msgid "========== relocations\n"
|
||||
msgstr "========== przesuniêcia\n"
|
||||
|
||||
#: lib/rpmfi.c:663
|
||||
#: lib/rpmfi.c:787
|
||||
#, c-format
|
||||
msgid "%5d exclude %s\n"
|
||||
msgstr "%5d wy³±czenie %s\n"
|
||||
|
||||
#: lib/rpmfi.c:666
|
||||
#: lib/rpmfi.c:790
|
||||
#, c-format
|
||||
msgid "%5d relocate %s -> %s\n"
|
||||
msgstr "%5d przesuniêcie %s -> %s\n"
|
||||
|
||||
#: lib/rpmfi.c:794
|
||||
#: lib/rpmfi.c:918
|
||||
#, c-format
|
||||
msgid "excluding %s %s\n"
|
||||
msgstr "wy³±czanie %s %s\n"
|
||||
|
||||
#: lib/rpmfi.c:804
|
||||
#: lib/rpmfi.c:928
|
||||
#, c-format
|
||||
msgid "relocating %s to %s\n"
|
||||
msgstr "przesuwanie %s do %s\n"
|
||||
|
||||
#: lib/rpmfi.c:891
|
||||
#: lib/rpmfi.c:1015
|
||||
#, c-format
|
||||
msgid "relocating directory %s to %s\n"
|
||||
msgstr "przesuwanie katalogu %s do %s\n"
|
||||
|
@ -2574,7 +2580,7 @@ msgstr "... jako %s\n"
|
|||
msgid "skipping %s - transfer failed - %s\n"
|
||||
msgstr "%s pomijany - transmisja %s nie powiod³a siê\n"
|
||||
|
||||
#: lib/rpminstall.c:481 lib/rpminstall.c:869 tools/rpmgraph.c:140
|
||||
#: lib/rpminstall.c:481 lib/rpminstall.c:872 tools/rpmgraph.c:140
|
||||
#, c-format
|
||||
msgid "%s cannot be installed\n"
|
||||
msgstr "%s nie mo¿e byæ zainstalowany\n"
|
||||
|
@ -2599,7 +2605,7 @@ msgstr "plik %s wymaga nowszej wersji RPM-a\n"
|
|||
msgid "found %d source and %d binary packages\n"
|
||||
msgstr "znaleziono %d pakietów ¼ród³owych i %d binarnych\n"
|
||||
|
||||
#: lib/rpminstall.c:637 lib/rpminstall.c:807 lib/rpminstall.c:1236
|
||||
#: lib/rpminstall.c:637 lib/rpminstall.c:810 lib/rpminstall.c:1239
|
||||
#: tools/rpmgraph.c:195
|
||||
msgid "Failed dependencies:\n"
|
||||
msgstr "Niespe³nione zale¿no¶ci:\n"
|
||||
|
@ -2617,22 +2623,22 @@ msgstr "instalacja pakiet
|
|||
msgid "cannot open file %s: %s\n"
|
||||
msgstr "nie mo¿na otworzyæ pliku %s: %s\n"
|
||||
|
||||
#: lib/rpminstall.c:782
|
||||
#: lib/rpminstall.c:787
|
||||
#, c-format
|
||||
msgid "\"%s\" specifies multiple packages\n"
|
||||
msgstr "\"%s\" okre¶la wiele pakietów\n"
|
||||
|
||||
#: lib/rpminstall.c:853
|
||||
#: lib/rpminstall.c:856
|
||||
#, c-format
|
||||
msgid "cannot open %s: %s\n"
|
||||
msgstr "nie mo¿na otworzyæ %s: %s\n"
|
||||
|
||||
#: lib/rpminstall.c:859
|
||||
#: lib/rpminstall.c:862
|
||||
#, c-format
|
||||
msgid "Installing %s\n"
|
||||
msgstr "Instalacja %s\n"
|
||||
|
||||
#: lib/rpminstall.c:1230
|
||||
#: lib/rpminstall.c:1233
|
||||
#, c-format
|
||||
msgid "Rollback packages (+%d/-%d) to %-24.24s (0x%08x):\n"
|
||||
msgstr "Cofniêcie pakietów (+%d/-%d) do %-24.24s (0x%08x):\n"
|
||||
|
@ -2854,30 +2860,45 @@ msgstr "Nie mo
|
|||
msgid "cannot open Packages database in %s\n"
|
||||
msgstr "nie mo¿na otworzyæ bazy danych Packages w %s\n"
|
||||
|
||||
#: lib/rpmts.c:350
|
||||
#: lib/rpmts.c:246
|
||||
#, fuzzy, c-format
|
||||
msgid "extra '(' in package label: %s\n"
|
||||
msgstr "b³êdny numer pakietu: %s\n"
|
||||
|
||||
#: lib/rpmts.c:264
|
||||
#, fuzzy, c-format
|
||||
msgid "missing '(' in package label: %s\n"
|
||||
msgstr "Brak '(' w %s %s\n"
|
||||
|
||||
#: lib/rpmts.c:272
|
||||
#, fuzzy, c-format
|
||||
msgid "missing ')' in package label: %s\n"
|
||||
msgstr "b³êdny numer pakietu: %s\n"
|
||||
|
||||
#: lib/rpmts.c:448
|
||||
#, c-format
|
||||
msgid "cannot open Solve database in %s\n"
|
||||
msgstr "nie mo¿na otworzyæ bazy danych Solve w %s\n"
|
||||
|
||||
#: lib/rpmts.c:492
|
||||
#: lib/rpmts.c:590
|
||||
#, c-format
|
||||
msgid "Adding: %s\n"
|
||||
msgstr "Dodawane: %s\n"
|
||||
|
||||
#: lib/rpmts.c:504
|
||||
#: lib/rpmts.c:602
|
||||
#, c-format
|
||||
msgid "Suggesting: %s\n"
|
||||
msgstr "Sugerowane: %s\n"
|
||||
|
||||
#: lib/rpmts.c:972
|
||||
#: lib/rpmts.c:1070
|
||||
msgid "mounted filesystems:\n"
|
||||
msgstr "podmontowane systemy plików:\n"
|
||||
|
||||
#: lib/rpmts.c:974
|
||||
#: lib/rpmts.c:1072
|
||||
msgid " i dev bsize bavail iavail mount point\n"
|
||||
msgstr " i urz bloków bl.wolnych i.wolnych punkt montowania\n"
|
||||
|
||||
#: lib/rpmts.c:1030
|
||||
#: lib/rpmts.c:1128
|
||||
#, c-format
|
||||
msgid "%5d 0x%04x %5u %12ld %12ld %s\n"
|
||||
msgstr "%5d 0x%04x %5u %12ld %12ld %s\n"
|
||||
|
@ -3041,13 +3062,8 @@ msgstr "Uszkodzony skr
|
|||
msgid "Signature: UNKNOWN (%d)\n"
|
||||
msgstr "Sygnatura: NIEZNANA (%d)\n"
|
||||
|
||||
#: lib/transaction.c:105
|
||||
#, c-format
|
||||
msgid "%s skipped due to missingok flag\n"
|
||||
msgstr "%s pominiêty z powodu flagi missingok\n"
|
||||
|
||||
#. @innercontinue@
|
||||
#: lib/transaction.c:954
|
||||
#: lib/transaction.c:891
|
||||
#, c-format
|
||||
msgid "excluding directory %s\n"
|
||||
msgstr "wy³±czanie katalogu %s\n"
|
||||
|
@ -3060,7 +3076,7 @@ msgstr "wy
|
|||
#. * For packages being removed:
|
||||
#. * - count files.
|
||||
#.
|
||||
#: lib/transaction.c:1067
|
||||
#: lib/transaction.c:1004
|
||||
#, c-format
|
||||
msgid "sanity checking %d elements\n"
|
||||
msgstr "sprawdzanie poprawno¶ci %d elementów\n"
|
||||
|
@ -3073,7 +3089,7 @@ msgstr "sprawdzanie poprawno
|
|||
#. * calling fpLookupList only once. I'm not sure that the speedup is
|
||||
#. * worth the trouble though.
|
||||
#.
|
||||
#: lib/transaction.c:1155
|
||||
#: lib/transaction.c:1092
|
||||
#, c-format
|
||||
msgid "computing %d file fingerprints\n"
|
||||
msgstr "obliczanie %d odcisków plików\n"
|
||||
|
@ -3081,7 +3097,7 @@ msgstr "obliczanie %d odcisk
|
|||
#. ===============================================
|
||||
#. * Compute file disposition for each package in transaction set.
|
||||
#.
|
||||
#: lib/transaction.c:1236
|
||||
#: lib/transaction.c:1173
|
||||
msgid "computing file dispositions\n"
|
||||
msgstr "obliczanie dyspozycji plików\n"
|
||||
|
||||
|
@ -3133,7 +3149,9 @@ msgstr "sprawdzono indeks db %s/%s\n"
|
|||
#: rpmdb/db3.c:986
|
||||
#, c-format
|
||||
msgid "unshared posix mutexes found(%d), adding DB_PRIVATE, using fcntl lock\n"
|
||||
msgstr "znaleziono wy³±czne muteksy posix(%d), dodanie DB_PRIVATE, u¿ycie blokady fcntl\n"
|
||||
msgstr ""
|
||||
"znaleziono wy³±czne muteksy posix(%d), dodanie DB_PRIVATE, u¿ycie blokady "
|
||||
"fcntl\n"
|
||||
|
||||
#: rpmdb/db3.c:1090
|
||||
#, c-format
|
||||
|
@ -3178,77 +3196,77 @@ msgstr "%s ma zbyt du
|
|||
msgid "%s has too large or too small integer value, skipped\n"
|
||||
msgstr "%s ma zbyt du¿± lub zbyt ma³± warto¶æ ca³kowit±, pominiêto\n"
|
||||
|
||||
#: rpmdb/header.c:2709
|
||||
#: rpmdb/header.c:2685
|
||||
msgid "missing { after %"
|
||||
msgstr "brak { po %"
|
||||
|
||||
#: rpmdb/header.c:2739
|
||||
#: rpmdb/header.c:2715
|
||||
msgid "missing } after %{"
|
||||
msgstr "brak } po %{"
|
||||
|
||||
#: rpmdb/header.c:2755
|
||||
#: rpmdb/header.c:2731
|
||||
msgid "empty tag format"
|
||||
msgstr "pusty format etykiety"
|
||||
|
||||
#: rpmdb/header.c:2767
|
||||
#: rpmdb/header.c:2743
|
||||
msgid "empty tag name"
|
||||
msgstr "pusta nazwa etykiety"
|
||||
|
||||
#: rpmdb/header.c:2776
|
||||
#: rpmdb/header.c:2752
|
||||
msgid "unknown tag"
|
||||
msgstr "nieznana etykieta"
|
||||
|
||||
#: rpmdb/header.c:2803
|
||||
#: rpmdb/header.c:2779
|
||||
msgid "] expected at end of array"
|
||||
msgstr "spodziewany ] na koñcu tablicy"
|
||||
|
||||
#: rpmdb/header.c:2816
|
||||
#: rpmdb/header.c:2792
|
||||
msgid "unexpected ]"
|
||||
msgstr "nie spodziewany ]"
|
||||
|
||||
#: rpmdb/header.c:2829
|
||||
#: rpmdb/header.c:2805
|
||||
msgid "unexpected }"
|
||||
msgstr "nie spodziewany }"
|
||||
|
||||
#: rpmdb/header.c:2893
|
||||
#: rpmdb/header.c:2869
|
||||
msgid "? expected in expression"
|
||||
msgstr "spodziewany ? w wyra¿eniu"
|
||||
|
||||
#: rpmdb/header.c:2900
|
||||
#: rpmdb/header.c:2876
|
||||
msgid "{ expected after ? in expression"
|
||||
msgstr "spodziewany { po ? w wyra¿eniu"
|
||||
|
||||
#: rpmdb/header.c:2912 rpmdb/header.c:2952
|
||||
#: rpmdb/header.c:2888 rpmdb/header.c:2928
|
||||
msgid "} expected in expression"
|
||||
msgstr "spodziewany } w wyra¿eniu"
|
||||
|
||||
#: rpmdb/header.c:2920
|
||||
#: rpmdb/header.c:2896
|
||||
msgid ": expected following ? subexpression"
|
||||
msgstr "spodziewany : po podwyra¿eniu ?"
|
||||
|
||||
#: rpmdb/header.c:2938
|
||||
#: rpmdb/header.c:2914
|
||||
msgid "{ expected after : in expression"
|
||||
msgstr "spodziewany { po : w wyra¿eniu"
|
||||
|
||||
#: rpmdb/header.c:2960
|
||||
#: rpmdb/header.c:2936
|
||||
msgid "| expected at end of expression"
|
||||
msgstr "spodziewany | na koñcu wyra¿enia"
|
||||
|
||||
#. @=modobserver =observertrans@
|
||||
#: rpmdb/header.c:3061
|
||||
#: rpmdb/header.c:3037
|
||||
msgid "(index out of range)"
|
||||
msgstr "(indeks spoza zakresu)"
|
||||
|
||||
#: rpmdb/header.c:3308
|
||||
#: rpmdb/header.c:3284
|
||||
msgid "array iterator used with different sized arrays"
|
||||
msgstr "iterator tablicy u¿yty na tablicach o ró¿nych rozmiarach"
|
||||
|
||||
#: rpmdb/header.c:3624
|
||||
#: rpmdb/header.c:3600
|
||||
#, c-format
|
||||
msgid "%c"
|
||||
msgstr "%c"
|
||||
|
||||
#: rpmdb/header.c:3640
|
||||
#: rpmdb/header.c:3616
|
||||
msgid "%a %b %d %Y"
|
||||
msgstr "%a %d %b %Y"
|
||||
|
||||
|
@ -3425,25 +3443,25 @@ msgstr "nag
|
|||
msgid "cannot add record originally at %u\n"
|
||||
msgstr "nie mo¿na dodaæ rekordu bêd±cego oryginalnie przy %u\n"
|
||||
|
||||
#: rpmdb/rpmdb.c:3770
|
||||
#: rpmdb/rpmdb.c:3766
|
||||
msgid "failed to rebuild database: original database remains in place\n"
|
||||
msgstr "przebudowanie bazy nie powiod³o siê; stara pozosta³a na miejscu\n"
|
||||
|
||||
#: rpmdb/rpmdb.c:3778
|
||||
#: rpmdb/rpmdb.c:3774
|
||||
msgid "failed to replace old database with new database!\n"
|
||||
msgstr "zamiana starej bazy na now± nie powiod³a siê!\n"
|
||||
|
||||
#: rpmdb/rpmdb.c:3780
|
||||
#: rpmdb/rpmdb.c:3776
|
||||
#, c-format
|
||||
msgid "replace files in %s with files from %s to recover"
|
||||
msgstr "aby odzyskaæ, nale¿y zast±piæ pliki w %s plikami z %s"
|
||||
|
||||
#: rpmdb/rpmdb.c:3790
|
||||
#: rpmdb/rpmdb.c:3786
|
||||
#, c-format
|
||||
msgid "removing directory %s\n"
|
||||
msgstr "usuwanie katalogu %s\n"
|
||||
|
||||
#: rpmdb/rpmdb.c:3792
|
||||
#: rpmdb/rpmdb.c:3788
|
||||
#, c-format
|
||||
msgid "failed to remove directory %s: %s\n"
|
||||
msgstr "usuniêcie katalogu %s nie powiod³o siê: %s\n"
|
||||
|
@ -3804,8 +3822,8 @@ msgid "DIRECTORY"
|
|||
msgstr "KATALOG"
|
||||
|
||||
# --- from popt/po/pl.po (in popt.h, not in .pot) ---
|
||||
msgid "Options implemented via popt alias/exec:"
|
||||
msgstr "Opcje zaimplementowane poprzez popt alias/exec:"
|
||||
#~ msgid "Options implemented via popt alias/exec:"
|
||||
#~ msgstr "Opcje zaimplementowane poprzez popt alias/exec:"
|
||||
|
||||
msgid "Help options:"
|
||||
msgstr "Opcje pomocy:"
|
||||
#~ msgid "Help options:"
|
||||
#~ msgstr "Opcje pomocy:"
|
||||
|
|
698
po/pt_BR.po
698
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
697
po/rpm.pot
697
po/rpm.pot
File diff suppressed because it is too large
Load Diff
|
@ -3,7 +3,6 @@
|
|||
#+partial
|
||||
+forcehints
|
||||
|
||||
#-warnunixlib
|
||||
-warnposix
|
||||
|
||||
+unixlib
|
||||
|
@ -17,13 +16,11 @@
|
|||
-bufferoverflowhigh
|
||||
|
||||
# --- +partial artifacts
|
||||
-fcnuse # 7
|
||||
|
||||
# --- not-yet at strict level
|
||||
-bitwisesigned # 75
|
||||
-elseifcomplete # 18
|
||||
-exportfcn # 25
|
||||
-globs # 12 <ctype.h>
|
||||
-ifblock # 202
|
||||
-namechecks # 206
|
||||
-ptrarith # 43
|
||||
|
|
12
popt/popt.h
12
popt/popt.h
|
@ -229,7 +229,8 @@ typedef void (*poptCallbackType) (poptContext con,
|
|||
* @param flags or'd POPT_CONTEXT_* bits
|
||||
* @return initialized popt context
|
||||
*/
|
||||
/*@only@*/ /*@null@*/ poptContext poptGetContext(
|
||||
/*@only@*/ /*@null@*/
|
||||
poptContext poptGetContext(
|
||||
/*@dependent@*/ /*@keep@*/ const char * name,
|
||||
int argc, /*@dependent@*/ /*@keep@*/ const char ** argv,
|
||||
/*@dependent@*/ /*@keep@*/ const struct poptOption * options,
|
||||
|
@ -258,7 +259,7 @@ int poptGetNextOpt(/*@null@*/poptContext con)
|
|||
* @param con context
|
||||
* @return option argument, NULL if no argument is available
|
||||
*/
|
||||
/*@observer@*/ /*@null@*/
|
||||
/*@observer@*/ /*@null@*/ /*@unused@*/
|
||||
const char * poptGetOptArg(/*@null@*/poptContext con)
|
||||
/*@modifies con @*/;
|
||||
|
||||
|
@ -267,7 +268,7 @@ const char * poptGetOptArg(/*@null@*/poptContext con)
|
|||
* @param con context
|
||||
* @return next argument, NULL if no argument is available
|
||||
*/
|
||||
/*@observer@*/ /*@null@*/
|
||||
/*@observer@*/ /*@null@*/ /*@unused@*/
|
||||
const char * poptGetArg(/*@null@*/poptContext con)
|
||||
/*@modifies con @*/;
|
||||
|
||||
|
@ -276,7 +277,7 @@ const char * poptGetArg(/*@null@*/poptContext con)
|
|||
* @param con context
|
||||
* @return current argument, NULL if no argument is available
|
||||
*/
|
||||
/*@observer@*/ /*@null@*/
|
||||
/*@observer@*/ /*@null@*/ /*@unused@*/
|
||||
const char * poptPeekArg(/*@null@*/poptContext con)
|
||||
/*@*/;
|
||||
|
||||
|
@ -314,6 +315,7 @@ poptContext poptFreeContext( /*@only@*/ /*@null@*/ poptContext con)
|
|||
* @param argv argument array, NULL terminated
|
||||
* @return 0 on success, POPT_ERROR_OPTSTOODEEP on failure
|
||||
*/
|
||||
/*@unused@*/
|
||||
int poptStuffArgs(poptContext con, /*@keep@*/ const char ** argv)
|
||||
/*@modifies con @*/;
|
||||
|
||||
|
@ -357,6 +359,7 @@ int poptReadConfigFile(poptContext con, const char * fn)
|
|||
* @param useEnv (unused)
|
||||
* @return 0 on success, POPT_ERROR_ERRNO on failure
|
||||
*/
|
||||
/*@unused@*/
|
||||
int poptReadDefaultConfig(poptContext con, /*@unused@*/ int useEnv)
|
||||
/*@globals fileSystem, internalState @*/
|
||||
/*@modifies con->execs, con->numExecs,
|
||||
|
@ -460,6 +463,7 @@ const char *const poptStrerror(const int error)
|
|||
* @param path single path to search for executables
|
||||
* @param allowAbsolute absolute paths only?
|
||||
*/
|
||||
/*@unused@*/
|
||||
void poptSetExecPath(poptContext con, const char * path, int allowAbsolute)
|
||||
/*@modifies con @*/;
|
||||
|
||||
|
|
|
@ -54,6 +54,9 @@ struct poptOption poptAliasOptions[] = {
|
|||
/*@-castfcnptr@*/
|
||||
/*@observer@*/ /*@unchecked@*/
|
||||
struct poptOption poptHelpOptions[] = {
|
||||
/*@-readonlytrans@*/
|
||||
{ NULL, '\0', POPT_ARG_INTL_DOMAIN, PACKAGE, 0, NULL, NULL},
|
||||
/*@=readonlytrans@*/
|
||||
{ NULL, '\0', POPT_ARG_CALLBACK, (void *)&displayArgs, '\0', NULL, NULL },
|
||||
{ "help", '?', 0, NULL, '?', N_("Show this help message"), NULL },
|
||||
{ "usage", '\0', 0, NULL, 'u', N_("Display brief usage message"), NULL },
|
||||
|
|
|
@ -37,7 +37,8 @@ extern __const __int32_t *__ctype_toupper;
|
|||
|
||||
#if defined(__LCLINT__)
|
||||
/*@-declundef -incondefs @*/ /* LCL: missing annotation */
|
||||
/*@only@*/ /*@out@*/ void * alloca (size_t __size)
|
||||
/*@only@*/ /*@out@*/
|
||||
void * alloca (size_t __size)
|
||||
/*@ensures MaxSet(result) == (__size - 1) @*/
|
||||
/*@*/;
|
||||
/*@=declundef =incondefs @*/
|
||||
|
@ -61,7 +62,8 @@ char *alloca ();
|
|||
#endif
|
||||
|
||||
/*@-redecl -redef@*/
|
||||
/*@mayexit@*/ /*@only@*/ char * xstrdup (const char *str)
|
||||
/*@mayexit@*/ /*@only@*/ /*@unused@*/
|
||||
char * xstrdup (const char *str)
|
||||
/*@*/;
|
||||
/*@=redecl =redef@*/
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ PYVER= @WITH_PYTHON_VERSION@
|
|||
pylibdir = $(shell python -c 'import sys; print sys.path[1]')
|
||||
pyincdir = $(prefix)/include/python${PYVER}
|
||||
|
||||
SUBDIRS = rpmdb mpw
|
||||
SUBDIRS = rpmdb
|
||||
|
||||
EXTRA_DIST = rpmdebug-py.c
|
||||
|
||||
|
@ -24,7 +24,6 @@ INCLUDES = -I. \
|
|||
@INCPATH@
|
||||
|
||||
noinst_HEADERS = header-py.h \
|
||||
rpmbc-py.h rpmmpw-py.h rpmrng-py.h \
|
||||
rpmal-py.h rpmds-py.h rpmdb-py.h rpmfd-py.h rpmfts-py.h \
|
||||
rpmfi-py.h rpmmi-py.h rpmrc-py.h rpmte-py.h rpmts-py.h
|
||||
|
||||
|
@ -46,7 +45,7 @@ rpmdb_PROGRAMS = _rpmdb.so
|
|||
noinst_PROGRAMS = poptmodule.so
|
||||
|
||||
rpmmodule_so_SOURCES =
|
||||
rpmmodule_so_LDFLAGS = $(mylibs) $(LIBS) -shared -Wl,-soname,rpmmodule.so
|
||||
rpmmodule_so_LDFLAGS = $(mylibs) $(LIBS) -shared -Wl,-soname,rpmmodule.so
|
||||
rpmmodule_so_LDADD = @WITH_BEECRYPT_LIB@
|
||||
|
||||
_rpmdb_so_SOURCES = _rpmdb.c
|
||||
|
@ -57,25 +56,24 @@ poptmodule_so_LDFLAGS = $(mylibs) $(LIBS) -shared -Wl,-soname,poptmodule.so
|
|||
|
||||
noinst_LTLIBRARIES = librpmmodule.la
|
||||
librpmmodule_la_SOURCES = rpmmodule.c header-py.c \
|
||||
rpmbc-py.c rpmmpw-py.c rpmrng-py.c \
|
||||
rpmal-py.c rpmds-py.c rpmdb-py.c rpmfd-py.c rpmfts-py.c \
|
||||
rpmfi-py.c rpmmi-py.c rpmrc-py.c rpmte-py.c rpmts-py.c
|
||||
librpmmodule_OBJECTS = $(subst .c,.o,$(librpmmodule_la_SOURCES))
|
||||
|
||||
rpmmodule.so$(EXEEXT): $(librpmmodule_la_OBJECTS)
|
||||
$(CC) -o $@ $(librpmmodule_la_OBJECTS) $(rpmmodule_so_LDFLAGS)
|
||||
rpmmodule.so$(EXEEXT): librpmmodule.la
|
||||
$(CC) -o $@ $(librpmmodule_OBJECTS) $(rpmmodule_so_LDFLAGS)
|
||||
|
||||
_rpmdb.so$(EXEEXT): _rpmdb.lo
|
||||
$(CC) -o $@ _rpmdb.lo $(_rpmdb_so_LDFLAGS)
|
||||
_rpmdb.so$(EXEEXT): _rpmdb.o
|
||||
$(CC) -o $@ _rpmdb.o $(_rpmdb_so_LDFLAGS)
|
||||
|
||||
poptmodule.so$(EXEEXT): poptmodule.lo
|
||||
$(CC) -o $@ poptmodule.lo $(poptmodule_so_LDFLAGS)
|
||||
poptmodule.so$(EXEEXT): poptmodule.o
|
||||
$(CC) -o $@ poptmodule.o $(poptmodule_so_LDFLAGS)
|
||||
|
||||
# rpmmodule.c header-py.c \
|
||||
# rpmal-py.c rpmds-py.c rpmdb-py.c rpmfd-py.c rpmfi-py.c rpmmi-py.c \
|
||||
# rpmrc-py.c rpmte-py.c rpmts-py.c
|
||||
# rpmmodule.c header-py.c
|
||||
splint_srcs = \
|
||||
rpmbc-py.c rpmmpw-py.c rpmrng-py.c \
|
||||
rpmal-py.c rpmds-py.c rpmdb-py.c rpmfd-py.c rpmfts-py.c \
|
||||
rpmfi-py.c rpmmi-py.c rpmrc-py.c rpmte-py.c rpmts-py.c
|
||||
|
||||
|
|
|
@ -579,7 +579,7 @@ static PyObject* _DBCursor_get(DBCursorObject* self, int extra_flags,
|
|||
char* kwnames[] = { "flags", "dlen", "doff", NULL };
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, format, kwnames,
|
||||
&flags, &dlen, &doff))
|
||||
&flags, &dlen, &doff))
|
||||
return NULL;
|
||||
|
||||
CHECK_CURSOR_NOT_CLOSED(self);
|
||||
|
@ -1634,7 +1634,7 @@ DB_open(DBObject* self, PyObject* args, PyObject* kwargs)
|
|||
* explicitly passed) but we are in a transaction ready environment:
|
||||
* add DB_AUTO_COMMIT to allow for older pybsddb apps using transactions
|
||||
* to work on BerkeleyDB 4.1 without needing to modify their
|
||||
* DBEnv or DB open calls.
|
||||
* DBEnv or DB open calls.
|
||||
* TODO make this behaviour of the library configurable.
|
||||
*/
|
||||
flags |= DB_AUTO_COMMIT;
|
||||
|
@ -2618,7 +2618,7 @@ DBC_get(DBCursorObject* self, PyObject* args, PyObject *kwargs)
|
|||
{
|
||||
PyErr_Clear();
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "Oi|ii:get",
|
||||
&kwnames[1],
|
||||
&kwnames[1],
|
||||
&keyobj, &flags, &dlen, &doff))
|
||||
{
|
||||
PyErr_Clear();
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
#ifndef RPMPYTHON_HEADER
|
||||
#define RPMPYTHON_HEADER
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
* \file python/header-py.h
|
||||
*/
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
typedef struct hdrObject_s hdrObject;
|
||||
|
||||
/*@unchecked@*/
|
||||
extern PyTypeObject hdr_Type;
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
PyObject * pyrpmError;
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
/*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#define PY_POPT_VERSION "0.2"
|
||||
|
||||
static const char *rcs_id = "$Id: poptmodule.c,v 1.8 2002/12/10 19:46:03 jbj Exp $";
|
||||
static const char *rcs_id = "$Id: poptmodule.c,v 1.9 2003/11/23 19:52:38 jbj Exp $";
|
||||
|
||||
static char *module_doc = "Python bindings for the popt library\n\
|
||||
\n\
|
||||
|
@ -23,7 +23,7 @@ and is always available from ftp://ftp.rpm.org/pub/rpm/dist";
|
|||
#define debug(x, y) { printf("%s: %s\n", x, y); }
|
||||
#else
|
||||
#define debug(x, y) {}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Functins and datatypes needed for the context object */
|
||||
typedef struct poptContext_s {
|
||||
|
@ -65,7 +65,7 @@ static PyObject * __poptOptionValue2PyObject(const struct poptOption *option)
|
|||
/* Do nothing */
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
case POPT_ARG_STRING:
|
||||
case POPT_ARG_STRING:
|
||||
if (*(char **)(option->arg) == NULL) {
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
|
@ -163,7 +163,7 @@ static PyObject * ctxGetArgs(poptContextObject *self, PyObject *argsFoo)
|
|||
list = PyList_New(size);
|
||||
if (list == NULL)
|
||||
return NULL;
|
||||
for (i = 0; i < size; i++)
|
||||
for (i = 0; i < size; i++)
|
||||
PyList_SetItem(list, i, PyString_FromString(args[i]));
|
||||
return list;
|
||||
}
|
||||
|
@ -172,7 +172,7 @@ static PyObject * ctxBadOption(poptContextObject *self, PyObject *args)
|
|||
{
|
||||
int flags = 0;
|
||||
const char *badOption;
|
||||
if (!PyArg_ParseTuple(args, "|i", &flags))
|
||||
if (!PyArg_ParseTuple(args, "|i", &flags))
|
||||
return NULL;
|
||||
badOption = poptBadOption(self->ctx, flags);
|
||||
if (badOption == NULL) {
|
||||
|
@ -185,7 +185,7 @@ static PyObject * ctxBadOption(poptContextObject *self, PyObject *args)
|
|||
static PyObject * ctxReadDefaultConfig(poptContextObject *self, PyObject *args)
|
||||
{
|
||||
int flags = 0;
|
||||
if (!PyArg_ParseTuple(args, "|i", &flags))
|
||||
if (!PyArg_ParseTuple(args, "|i", &flags))
|
||||
return NULL;
|
||||
return PyInt_FromLong(poptReadDefaultConfig(self->ctx, flags));
|
||||
}
|
||||
|
@ -201,7 +201,7 @@ static PyObject * ctxReadConfigFile(poptContextObject *self, PyObject *args)
|
|||
static PyObject * ctxSetOtherOptionHelp(poptContextObject *self, PyObject *args)
|
||||
{
|
||||
const char *option;
|
||||
if (!PyArg_ParseTuple(args, "s", &option))
|
||||
if (!PyArg_ParseTuple(args, "s", &option))
|
||||
return NULL;
|
||||
poptSetOtherOptionHelp(self->ctx, option);
|
||||
Py_INCREF(Py_None);
|
||||
|
@ -213,7 +213,7 @@ static PyObject * ctxPrintHelp(poptContextObject *self, PyObject *args)
|
|||
FILE *f;
|
||||
int flags = 0;
|
||||
PyObject *file;
|
||||
if (!PyArg_ParseTuple(args, "|O!i", &PyFile_Type, &file, &flags))
|
||||
if (!PyArg_ParseTuple(args, "|O!i", &PyFile_Type, &file, &flags))
|
||||
return NULL;
|
||||
f = PyFile_AsFile(file);
|
||||
if (f == NULL)
|
||||
|
@ -254,7 +254,7 @@ static PyObject * ctxGetOptValues(poptContextObject *self, PyObject *args)
|
|||
return NULL;
|
||||
/* Create the list */
|
||||
list = PyList_New(self->optionsNo);
|
||||
if (list == NULL)
|
||||
if (list == NULL)
|
||||
return NULL;
|
||||
for (i = 0; i < self->optionsNo; i++) {
|
||||
PyObject *item;
|
||||
|
@ -383,7 +383,7 @@ int __setPoptOption(PyObject *list, struct poptOption *opt)
|
|||
PyErr_SetString(pypoptError, "List is too short");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* longName */
|
||||
o = PyList_GetItem(list, 0);
|
||||
/* Sanity check */
|
||||
|
@ -393,10 +393,10 @@ int __setPoptOption(PyObject *list, struct poptOption *opt)
|
|||
if (!PyString_Check(o)) {
|
||||
PyErr_SetString(pypoptError, "Long name should be a string");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
opt->longName = PyString_AsString(o);
|
||||
}
|
||||
|
||||
|
||||
/* shortName */
|
||||
o = PyList_GetItem(list, 1);
|
||||
/* Sanity check */
|
||||
|
@ -423,7 +423,7 @@ int __setPoptOption(PyObject *list, struct poptOption *opt)
|
|||
PyErr_SetString(pypoptError, "At least one of the short name and long name must be specified");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* argInfo */
|
||||
o = PyList_GetItem(list, 2);
|
||||
/* Sanity check */
|
||||
|
@ -432,7 +432,7 @@ int __setPoptOption(PyObject *list, struct poptOption *opt)
|
|||
return 0;
|
||||
}
|
||||
opt->argInfo = PyInt_AsLong(o);
|
||||
|
||||
|
||||
/* Initialize the rest of the arguments with safe defaults */
|
||||
switch(opt->argInfo) {
|
||||
case POPT_ARG_STRING:
|
||||
|
@ -464,7 +464,7 @@ int __setPoptOption(PyObject *list, struct poptOption *opt)
|
|||
/* If nothing left, end the stuff here */
|
||||
if (listSize == 3)
|
||||
return 1;
|
||||
|
||||
|
||||
/* val */
|
||||
o = PyList_GetItem(list, 3);
|
||||
/* Sanity check */
|
||||
|
@ -584,7 +584,7 @@ static PyObject * getContext(PyObject *self, PyObject *args)
|
|||
struct poptOption *opts;
|
||||
poptContextObject *c;
|
||||
/* We should receive name, argv and a list */
|
||||
if (!PyArg_ParseTuple(args, "zO!O!|i", &name, &PyList_Type, &a,
|
||||
if (!PyArg_ParseTuple(args, "zO!O!|i", &name, &PyList_Type, &a,
|
||||
&PyList_Type, &o, &flags))
|
||||
return NULL;
|
||||
/* Parse argv */
|
||||
|
@ -667,7 +667,7 @@ void initpopt()
|
|||
module = Py_InitModule3("popt", poptModuleMethods, module_doc);
|
||||
/* Init the constants */
|
||||
dict = PyModule_GetDict(module);
|
||||
PyDict_SetItemString(dict, "__version__",
|
||||
PyDict_SetItemString(dict, "__version__",
|
||||
PyString_FromString(PY_POPT_VERSION));
|
||||
PyDict_SetItemString(dict, "cvsid", PyString_FromString(rcs_id));
|
||||
for (c = intConstants; c->name; c++) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
* \file python/rpmal-py.c
|
||||
*/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "rpmal.h"
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
* \file python/rpmal-py.h
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,200 +0,0 @@
|
|||
/** \ingroup py_c
|
||||
* \file python/rpmbc-py.c
|
||||
*/
|
||||
|
||||
#include "system.h"
|
||||
|
||||
#include "Python.h"
|
||||
#ifdef __LCLINT__
|
||||
#undef PyObject_HEAD
|
||||
#define PyObject_HEAD int _PyObjectHead;
|
||||
#endif
|
||||
|
||||
#include "rpmbc-py.h"
|
||||
|
||||
#include "rpmdebug-py.c"
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
/*@unchecked@*/
|
||||
static int _bc_debug = 0;
|
||||
|
||||
#define is_rpmbc(o) ((o)->ob_type == &rpmbc_Type)
|
||||
|
||||
/*@unchecked@*/ /*@observer@*/
|
||||
static const char initialiser_name[] = "rpm.bc";
|
||||
|
||||
/* ---------- */
|
||||
|
||||
static void
|
||||
rpmbc_dealloc(rpmbcObject * s)
|
||||
/*@*/
|
||||
{
|
||||
if (_bc_debug < -1)
|
||||
fprintf(stderr, "*** rpmbc_dealloc(%p)\n", s);
|
||||
|
||||
PyObject_Del(s);
|
||||
}
|
||||
|
||||
static int
|
||||
rpmbc_print(rpmbcObject * s, FILE * fp, /*@unused@*/ int flags)
|
||||
/*@*/
|
||||
{
|
||||
if (_bc_debug < -1)
|
||||
fprintf(stderr, "*** rpmbc_print(%p)\n", s);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static int rpmbc_init(rpmbcObject * z, PyObject *args, PyObject *kwds)
|
||||
/*@*/
|
||||
{
|
||||
PyObject * o = NULL;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "|O:Cvt", &o)) return -1;
|
||||
|
||||
if (_bc_debug)
|
||||
fprintf(stderr, "*** rpmbc_init(%p[%s],%p[%s],%p[%s])\n", z, lbl(z), args, lbl(args), kwds, lbl(kwds));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static void rpmbc_free(/*@only@*/ rpmbcObject * s)
|
||||
/*@*/
|
||||
{
|
||||
if (_bc_debug)
|
||||
fprintf(stderr, "*** rpmbc_free(%p[%s])\n", s, lbl(s));
|
||||
PyObject_Del(s);
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject * rpmbc_alloc(PyTypeObject * subtype, int nitems)
|
||||
/*@*/
|
||||
{
|
||||
PyObject * ns = PyType_GenericAlloc(subtype, nitems);
|
||||
|
||||
if (_bc_debug)
|
||||
fprintf(stderr, "*** rpmbc_alloc(%p[%s},%d) ret %p[%s]\n", subtype, lbl(subtype), nitems, ns, lbl(ns));
|
||||
return (PyObject *) ns;
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
rpmbc_new(PyTypeObject * subtype, PyObject *args, PyObject *kwds)
|
||||
/*@*/
|
||||
{
|
||||
PyObject * ns = (PyObject *) PyObject_New(rpmbcObject, &rpmbc_Type);
|
||||
|
||||
if (_bc_debug < -1)
|
||||
fprintf(stderr, "*** rpmbc_new(%p[%s],%p[%s],%p[%s]) ret %p[%s]\n", subtype, lbl(subtype), args, lbl(args), kwds, lbl(kwds), ns, lbl(ns));
|
||||
return ns;
|
||||
}
|
||||
|
||||
static rpmbcObject *
|
||||
rpmbc_New(void)
|
||||
{
|
||||
rpmbcObject * ns = PyObject_New(rpmbcObject, &rpmbc_Type);
|
||||
|
||||
return ns;
|
||||
}
|
||||
|
||||
/* ---------- */
|
||||
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject *
|
||||
rpmbc_Debug(/*@unused@*/ rpmbcObject * s, PyObject * args)
|
||||
/*@globals _Py_NoneStruct @*/
|
||||
/*@modifies _Py_NoneStruct @*/
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, "i:Debug", &_bc_debug)) return NULL;
|
||||
|
||||
if (_bc_debug < 0)
|
||||
fprintf(stderr, "*** rpmbc_Debug(%p)\n", s);
|
||||
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
}
|
||||
|
||||
/*@-fullinitblock@*/
|
||||
/*@unchecked@*/ /*@observer@*/
|
||||
static struct PyMethodDef rpmbc_methods[] = {
|
||||
{"Debug", (PyCFunction)rpmbc_Debug, METH_VARARGS,
|
||||
NULL},
|
||||
{NULL, NULL} /* sentinel */
|
||||
};
|
||||
/*@=fullinitblock@*/
|
||||
|
||||
static PyObject * rpmbc_getattro(PyObject * o, PyObject * n)
|
||||
/*@*/
|
||||
{
|
||||
return PyObject_GenericGetAttr(o, n);
|
||||
}
|
||||
|
||||
static int rpmbc_setattro(PyObject * o, PyObject * n, PyObject * v)
|
||||
/*@*/
|
||||
{
|
||||
return PyObject_GenericSetAttr(o, n, v);
|
||||
}
|
||||
|
||||
/* ---------- */
|
||||
|
||||
/**
|
||||
*/
|
||||
/*@unchecked@*/ /*@observer@*/
|
||||
static char rpmbc_doc[] =
|
||||
"";
|
||||
|
||||
/*@-fullinitblock@*/
|
||||
PyTypeObject rpmbc_Type = {
|
||||
PyObject_HEAD_INIT(&PyType_Type)
|
||||
0, /* ob_size */
|
||||
"rpm.bc", /* tp_name */
|
||||
sizeof(rpmbcObject), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
/* methods */
|
||||
(destructor) rpmbc_dealloc, /* tp_dealloc */
|
||||
(printfunc) rpmbc_print, /* tp_print */
|
||||
(getattrfunc)0, /* tp_getattr */
|
||||
(setattrfunc)0, /* tp_setattr */
|
||||
(cmpfunc)0, /* tp_compare */
|
||||
(reprfunc)0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
(hashfunc)0, /* tp_hash */
|
||||
(ternaryfunc)0, /* tp_call */
|
||||
(reprfunc)0, /* tp_str */
|
||||
(getattrofunc) rpmbc_getattro, /* tp_getattro */
|
||||
(setattrofunc) rpmbc_setattro, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT, /* tp_flags */
|
||||
rpmbc_doc, /* tp_doc */
|
||||
#if Py_TPFLAGS_HAVE_ITER
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
(getiterfunc)0, /* tp_iter */
|
||||
(iternextfunc)0, /* tp_iternext */
|
||||
rpmbc_methods, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
0, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc) rpmbc_init, /* tp_init */
|
||||
(allocfunc) rpmbc_alloc, /* tp_alloc */
|
||||
(newfunc) rpmbc_new, /* tp_new */
|
||||
(destructor) rpmbc_free, /* tp_free */
|
||||
0, /* tp_is_gc */
|
||||
#endif
|
||||
};
|
||||
/*@=fullinitblock@*/
|
||||
|
||||
/* ---------- */
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "rpmio_internal.h"
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
* \file python/rpmbc-py.h
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
* \file python/rpmdb-py.c
|
||||
*/
|
||||
|
||||
|
@ -23,37 +23,37 @@
|
|||
/** \ingroup python
|
||||
* \class Rpmdb
|
||||
* \brief A python rpmdb object represents an RPM database.
|
||||
*
|
||||
*
|
||||
* Instances of the rpmdb object provide access to the records of a
|
||||
* RPM database. The records are accessed by index number. To
|
||||
* retrieve the header data in the RPM database, the rpmdb object is
|
||||
* subscripted as you would access members of a list.
|
||||
*
|
||||
*
|
||||
* The rpmdb class contains the following methods:
|
||||
*
|
||||
*
|
||||
* - firstkey() Returns the index of the first record in the database.
|
||||
* @deprecated Use mi = ts.dbMatch() (or db.match()) instead.
|
||||
*
|
||||
*
|
||||
* - nextkey(index) Returns the index of the next record after "index" in the
|
||||
* database.
|
||||
* @param index current rpmdb location
|
||||
* @deprecated Use hdr = mi.next() instead.
|
||||
*
|
||||
*
|
||||
* - findbyfile(file) Returns a list of the indexes to records that own file
|
||||
* "file".
|
||||
* @param file absolute path to file
|
||||
* @deprecated Use mi = ts.dbMatch('basename') instead.
|
||||
*
|
||||
*
|
||||
* - findbyname(name) Returns a list of the indexes to records for packages
|
||||
* named "name".
|
||||
* @param name package name
|
||||
* @deprecated Use mi = ts.dbMatch('name') instead.
|
||||
*
|
||||
*
|
||||
* - findbyprovides(dep) Returns a list of the indexes to records for packages
|
||||
* that provide "dep".
|
||||
* @param dep provided dependency string
|
||||
* @deprecated Use mi = ts.dbMmatch('providename') instead.
|
||||
*
|
||||
*
|
||||
* To obtain a db object explicitly, the opendb function in the rpm module
|
||||
* can be called. The opendb function takes two optional arguments.
|
||||
* The first optional argument is a boolean flag that specifies if the
|
||||
|
@ -76,7 +76,7 @@
|
|||
* db = rpm.opendb()
|
||||
* mi = db.match()
|
||||
* \endcode
|
||||
*
|
||||
*
|
||||
* An example of opening a database and retrieving the first header in
|
||||
* the database, then printing the name of the package that the header
|
||||
* represents:
|
||||
|
|
|
@ -3,15 +3,15 @@
|
|||
|
||||
#include "rpmdb.h"
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
* \file python/rpmdb-py.h
|
||||
*/
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
typedef struct rpmdbObject_s rpmdbObject;
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
struct rpmdbObject_s {
|
||||
PyObject_HEAD
|
||||
|
|
|
@ -6,7 +6,6 @@ extern PyTypeObject PyDictIter_Type;
|
|||
/*@unchecked@*/
|
||||
extern PyTypeObject PyFrame_Type;
|
||||
|
||||
#include "rpmbc-py.h" /* XXX debug only */
|
||||
#include <rpmcli.h> /* XXX debug only */
|
||||
|
||||
#include "header-py.h" /* XXX debug only */
|
||||
|
@ -16,9 +15,7 @@ extern PyTypeObject PyFrame_Type;
|
|||
#include "rpmfi-py.h" /* XXX debug only */
|
||||
#include "rpmfts-py.h" /* XXX debug only */
|
||||
#include "rpmmi-py.h" /* XXX debug only */
|
||||
#include "rpmmpw-py.h" /* XXX debug only */
|
||||
#include "rpmrc-py.h" /* XXX debug only */
|
||||
#include "rpmrng-py.h" /* XXX debug only */
|
||||
#include "rpmte-py.h" /* XXX debug only */
|
||||
#include "rpmts-py.h" /* XXX debug only */
|
||||
|
||||
|
@ -32,7 +29,7 @@ static const char * lbl(void * s)
|
|||
if (o == NULL) return "null";
|
||||
|
||||
if (o == Py_None) return "None";
|
||||
|
||||
|
||||
|
||||
if (o->ob_type == &PyType_Type) return o->ob_type->tp_name;
|
||||
|
||||
|
@ -71,10 +68,7 @@ static const char * lbl(void * s)
|
|||
if (o->ob_type == &PyUnicode_Type) return "Unicode";
|
||||
|
||||
if (o->ob_type == &hdr_Type) return "hdr";
|
||||
if (o->ob_type == &mpw_Type) return "mpw";
|
||||
if (o->ob_type == &rng_Type) return "rng";
|
||||
if (o->ob_type == &rpmal_Type) return "rpmal";
|
||||
if (o->ob_type == &rpmbc_Type) return "rpmbc";
|
||||
if (o->ob_type == &rpmds_Type) return "rpmds";
|
||||
if (o->ob_type == &rpmfd_Type) return "rpmfd";
|
||||
if (o->ob_type == &rpmfi_Type) return "rpmfi";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
* \file python/rpmds-py.c
|
||||
*/
|
||||
|
||||
|
@ -146,7 +146,7 @@ rpmds_iternext(rpmdsObject * s)
|
|||
PyTuple_SET_ITEM(result, 1, Py_BuildValue("s", EVR));
|
||||
PyTuple_SET_ITEM(result, 2, PyInt_FromLong(Flags));
|
||||
}
|
||||
|
||||
|
||||
} else
|
||||
s->active = 0;
|
||||
|
||||
|
@ -235,7 +235,7 @@ static struct PyMethodDef rpmds_methods[] = {
|
|||
"ds.Refs -> Refs - Return current Refs.\n" },
|
||||
{"next", (PyCFunction)rpmds_Next, METH_VARARGS,
|
||||
"ds.next() -> (N, EVR, Flags)\n\
|
||||
- Retrieve next dependency triple.\n" },
|
||||
- Retrieve next dependency triple.\n" },
|
||||
{"SetNoPromote",(PyCFunction)rpmds_SetNoPromote, METH_VARARGS,
|
||||
NULL},
|
||||
{"Notify", (PyCFunction)rpmds_Notify, METH_VARARGS,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "rpmds.h"
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
* \file python/rpmds-py.h
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
* \file python/rpmfd-py.c
|
||||
*/
|
||||
|
||||
|
@ -91,7 +91,7 @@ static int closeCallback(FILE * f)
|
|||
node->fd = fdFree(node->fd, "closeCallback");
|
||||
node = _free (node);
|
||||
}
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -104,12 +104,12 @@ rpmfd_Fopen(/*@unused@*/ PyObject * s, PyObject * args)
|
|||
char * path;
|
||||
char * mode = "r.ufdio";
|
||||
FDlist *node;
|
||||
|
||||
|
||||
if (!PyArg_ParseTuple(args, "s|s", &path, &mode))
|
||||
return NULL;
|
||||
|
||||
|
||||
node = xmalloc (sizeof(FDlist));
|
||||
|
||||
|
||||
node->fd = Fopen(path, mode);
|
||||
node->fd = fdLink(node->fd, "doFopen");
|
||||
node->note = xstrdup (path);
|
||||
|
@ -119,7 +119,7 @@ rpmfd_Fopen(/*@unused@*/ PyObject * s, PyObject * args)
|
|||
node = _free (node);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
if (Ferror(node->fd)) {
|
||||
const char *err = Fstrerror(node->fd);
|
||||
node = _free(node);
|
||||
|
@ -144,11 +144,11 @@ rpmfd_Fopen(/*@unused@*/ PyObject * s, PyObject * args)
|
|||
fdhead = node;
|
||||
}
|
||||
fdtail = node;
|
||||
|
||||
|
||||
return PyFile_FromFile (node->f, path, mode, closeCallback);
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
/*@-fullinitblock@*/
|
||||
/*@unchecked@*/ /*@observer@*/
|
||||
|
@ -163,7 +163,7 @@ static struct PyMethodDef rpmfd_methods[] = {
|
|||
|
||||
/* ---------- */
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static void
|
||||
rpmfd_dealloc(/*@only@*/ /*@null@*/ rpmfdObject * s)
|
||||
|
@ -188,7 +188,7 @@ static int rpmfd_setattro(PyObject * o, PyObject * n, PyObject * v)
|
|||
return PyObject_GenericSetAttr(o, n, v);
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static int rpmfd_init(rpmfdObject * s, PyObject *args, PyObject *kwds)
|
||||
/*@modifies s @*/
|
||||
|
@ -220,7 +220,7 @@ fprintf(stderr, "*** rpmfd_init(%p,%p,%p)\n", s, args, kwds);
|
|||
return 0;
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static void rpmfd_free(/*@only@*/ rpmfdObject * s)
|
||||
/*@modifies s @*/
|
||||
|
@ -233,7 +233,7 @@ fprintf(stderr, "%p -- fd %p\n", s, s->fd);
|
|||
PyObject_Del((PyObject *)s);
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject * rpmfd_alloc(PyTypeObject * subtype, int nitems)
|
||||
/*@*/
|
||||
|
@ -245,7 +245,7 @@ fprintf(stderr, "*** rpmfd_alloc(%p,%d) ret %p\n", subtype, nitems, s);
|
|||
return s;
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static rpmfdObject * rpmfd_new(PyTypeObject * subtype, PyObject *args, PyObject *kwds)
|
||||
/*@*/
|
||||
|
@ -270,7 +270,7 @@ fprintf(stderr, "%p ++ fd %p\n", s, s->fd);
|
|||
static char rpmfd_doc[] =
|
||||
"";
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
/*@-fullinitblock@*/
|
||||
PyTypeObject rpmfd_Type = {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef H_RPMFD_PY
|
||||
#define H_RPMFD_PY
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
* \file python/rpmfd-py.h
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
* \file python/rpmfi-py.c
|
||||
*/
|
||||
|
||||
|
@ -126,7 +126,7 @@ rpmfi_MD5(rpmfiObject * s, PyObject * args)
|
|||
char fmd5[33];
|
||||
char * t;
|
||||
int i;
|
||||
|
||||
|
||||
if (!PyArg_ParseTuple(args, ":MD5")) return NULL;
|
||||
MD5 = rpmfiMD5(s->fi);
|
||||
for (i = 0, t = fmd5; i < 16; i++, t += 2)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "rpmfi.h"
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
* \file python/rpmfi-py.h
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
* \file python/rpmfts-py.c
|
||||
*/
|
||||
|
||||
|
@ -48,7 +48,7 @@ static const char * ftsInfoStr(int fts_info)
|
|||
/*@*/
|
||||
{
|
||||
if (!(fts_info >= 1 && fts_info <= 14))
|
||||
fts_info = 0;
|
||||
fts_info = 0;
|
||||
return ftsInfoStrings[ fts_info ];
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,7 @@ rpmfts_initialize(rpmftsObject * s, const char * root, int options, int ignore)
|
|||
s->roots[0] = t;
|
||||
s->roots[ac] = NULL;
|
||||
(void) stpcpy(t, root);
|
||||
|
||||
|
||||
s->options = options;
|
||||
s->ignore = ignore;
|
||||
s->compare = NULL;
|
||||
|
@ -267,7 +267,7 @@ rpmfts_debug(__FUNCTION__, s);
|
|||
return Py_BuildValue("i", rc);
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
/*@-fullinitblock@*/
|
||||
/*@unchecked@*/ /*@observer@*/
|
||||
|
@ -294,13 +294,13 @@ static PyMemberDef rpmfts_members[] = {
|
|||
{"__dict__",T_OBJECT,offsetof(rpmftsObject, md_dict), READONLY,
|
||||
NULL},
|
||||
{"callbacks",T_OBJECT,offsetof(rpmftsObject, callbacks), 0,
|
||||
"Callback dictionary per fts_info state: FTS_{D|DC|DEFAULT|DNR|DOT|DP|ERR|F|INIT|NS|NSOK|SL|SLNONE|W}"},
|
||||
"Callback dictionary per fts_info state: FTS_{D|DC|DEFAULT|DNR|DOT|DP|ERR|F|INIT|NS|NSOK|SL|SLNONE|W}"},
|
||||
{"options", T_INT, offsetof(rpmftsObject, options), 0,
|
||||
"Option bit(s): FTS_{COMFOLLOW|LOGICAL|NOCHDIR|NOSTAT|PHYSICAL|SEEDOT|XDEV}"},
|
||||
{"ignore", T_INT, offsetof(rpmftsObject, ignore), 0,
|
||||
"Ignore bit(s): (1 << info) with info one of FTS_{D|DC|DEFAULT|DNR|DOT|DP|ERR|F|INIT|NS|NSOK|SL|SLNONE|W}"},
|
||||
"Ignore bit(s): (1 << info) with info one of FTS_{D|DC|DEFAULT|DNR|DOT|DP|ERR|F|INIT|NS|NSOK|SL|SLNONE|W}"},
|
||||
{NULL, 0, 0, 0, NULL}
|
||||
};
|
||||
};
|
||||
|
||||
static PyObject * rpmfts_getattro(PyObject * o, PyObject * n)
|
||||
/*@*/
|
||||
|
@ -454,7 +454,7 @@ rpmfts_debug(__FUNCTION__, s);
|
|||
|
||||
CONSTANT(FTS_DONTCHDIR);
|
||||
CONSTANT(FTS_SYMFOLLOW);
|
||||
|
||||
|
||||
CONSTANT(FTS_AGAIN);
|
||||
CONSTANT(FTS_FOLLOW);
|
||||
CONSTANT(FTS_NOINSTR);
|
||||
|
@ -505,7 +505,7 @@ static int rpmfts_print(rpmftsObject * s, FILE * fp, /*@unused@*/ int flags)
|
|||
static char rpmfts_doc[] =
|
||||
"";
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
/*@-fullinitblock@*/
|
||||
PyTypeObject rpmfts_Type = {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef H_RPMFTS_PY
|
||||
#define H_RPMFTS_PY
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
* \file python/rpmfts-py.h
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
* \file python/rpmmi-py.c
|
||||
*/
|
||||
|
||||
|
@ -90,7 +90,7 @@ rpmmi_iternext(rpmmiObject * s)
|
|||
/*@modifies s, rpmGlobalMacroContext @*/
|
||||
{
|
||||
Header h;
|
||||
|
||||
|
||||
if (s->mi == NULL || (h = rpmdbNextIterator(s->mi)) == NULL) {
|
||||
s->mi = rpmdbFreeIterator(s->mi);
|
||||
return NULL;
|
||||
|
@ -106,7 +106,7 @@ rpmmi_Next(rpmmiObject * s, PyObject *args)
|
|||
/*@modifies s, rpmGlobalMacroContext, _Py_NoneStruct @*/
|
||||
{
|
||||
PyObject * result;
|
||||
|
||||
|
||||
if (!PyArg_ParseTuple(args, ":Next"))
|
||||
return NULL;
|
||||
|
||||
|
@ -164,7 +164,7 @@ rpmmi_Pattern(rpmmiObject * s, PyObject * args)
|
|||
int type;
|
||||
char * pattern;
|
||||
rpmTag tag;
|
||||
|
||||
|
||||
if (!PyArg_ParseTuple(args, "Ois:Pattern", &TagN, &type, &pattern))
|
||||
return NULL;
|
||||
|
||||
|
@ -177,10 +177,10 @@ rpmmi_Pattern(rpmmiObject * s, PyObject * args)
|
|||
|
||||
Py_INCREF (Py_None);
|
||||
return Py_None;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
/*@-fullinitblock@*/
|
||||
/*@unchecked@*/ /*@observer@*/
|
||||
|
@ -199,7 +199,7 @@ static struct PyMethodDef rpmmi_methods[] = {
|
|||
};
|
||||
/*@=fullinitblock@*/
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static void rpmmi_dealloc(/*@only@*/ /*@null@*/ rpmmiObject * s)
|
||||
/*@globals rpmGlobalMacroContext @*/
|
||||
|
@ -229,7 +229,7 @@ static int rpmmi_setattro(PyObject * o, PyObject * n, PyObject * v)
|
|||
static char rpmmi_doc[] =
|
||||
"";
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
/*@-fullinitblock@*/
|
||||
PyTypeObject rpmmi_Type = {
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
#ifndef H_RPMMI_PY
|
||||
#define H_RPMMI_PY
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
* \file python/rpmmi-py.h
|
||||
*/
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
typedef struct rpmmiObject_s rpmmiObject;
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
struct rpmmiObject_s {
|
||||
PyObject_HEAD
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
* \file python/rpmmodule.c
|
||||
*/
|
||||
|
||||
|
@ -19,10 +19,6 @@
|
|||
#include "header_internal.h"
|
||||
|
||||
#include "header-py.h"
|
||||
#include "rpmbc-py.h"
|
||||
#include "rpmmpw-py.h"
|
||||
#include "rpmrng-py.h"
|
||||
|
||||
#include "rpmal-py.h"
|
||||
#include "rpmds-py.h"
|
||||
#include "rpmfd-py.h"
|
||||
|
@ -187,10 +183,7 @@ void initrpm(void)
|
|||
|
||||
#if Py_TPFLAGS_HAVE_ITER /* XXX backport to python-1.5.2 */
|
||||
if (PyType_Ready(&hdr_Type) < 0) return;
|
||||
if (PyType_Ready(&mpw_Type) < 0) return;
|
||||
if (PyType_Ready(&rng_Type) < 0) return;
|
||||
if (PyType_Ready(&rpmal_Type) < 0) return;
|
||||
if (PyType_Ready(&rpmbc_Type) < 0) return;
|
||||
if (PyType_Ready(&rpmds_Type) < 0) return;
|
||||
if (PyType_Ready(&rpmfd_Type) < 0) return;
|
||||
if (PyType_Ready(&rpmfts_Type) < 0) return;
|
||||
|
@ -226,18 +219,9 @@ void initrpm(void)
|
|||
Py_INCREF(&hdr_Type);
|
||||
PyModule_AddObject(m, "hdr", (PyObject *) &hdr_Type);
|
||||
|
||||
Py_INCREF(&mpw_Type);
|
||||
PyModule_AddObject(m, "mpw", (PyObject *) &mpw_Type);
|
||||
|
||||
Py_INCREF(&rng_Type);
|
||||
PyModule_AddObject(m, "rng", (PyObject *) &rng_Type);
|
||||
|
||||
Py_INCREF(&rpmal_Type);
|
||||
PyModule_AddObject(m, "al", (PyObject *) &rpmal_Type);
|
||||
|
||||
Py_INCREF(&rpmbc_Type);
|
||||
PyModule_AddObject(m, "bc", (PyObject *) &rpmbc_Type);
|
||||
|
||||
Py_INCREF(&rpmds_Type);
|
||||
PyModule_AddObject(m, "ds", (PyObject *) &rpmds_Type);
|
||||
|
||||
|
@ -263,10 +247,7 @@ void initrpm(void)
|
|||
PyModule_AddObject(m, "ts", (PyObject *) &rpmts_Type);
|
||||
#else
|
||||
hdr_Type.ob_type = &PyType_Type;
|
||||
mpw_Type.ob_type = &PyType_Type;
|
||||
rng_Type.ob_type = &PyType_Type;
|
||||
rpmal_Type.ob_type = &PyType_Type;
|
||||
rpmbc_Type.ob_type = &PyType_Type;
|
||||
rpmds_Type.ob_type = &PyType_Type;
|
||||
rpmfd_Type.ob_type = &PyType_Type;
|
||||
rpmfts_Type.ob_type = &PyType_Type;
|
||||
|
@ -292,7 +273,7 @@ void initrpm(void)
|
|||
PyDict_SetItemString(d, (char *) extensions->name, o=PyCObject_FromVoidPtr(ext, NULL));
|
||||
Py_DECREF(o);
|
||||
PyDict_SetItem(dict, tag, o=PyString_FromString(ext->name + 7));
|
||||
Py_DECREF(o);
|
||||
Py_DECREF(o);
|
||||
}
|
||||
extensions++;
|
||||
}
|
||||
|
@ -304,7 +285,7 @@ void initrpm(void)
|
|||
#define REGISTER_ENUM(val) \
|
||||
PyDict_SetItemString(d, #val, o=PyInt_FromLong( val )); \
|
||||
Py_DECREF(o);
|
||||
|
||||
|
||||
REGISTER_ENUM(RPMFILE_STATE_NORMAL);
|
||||
REGISTER_ENUM(RPMFILE_STATE_REPLACED);
|
||||
REGISTER_ENUM(RPMFILE_STATE_NOTINSTALLED);
|
||||
|
|
2340
python/rpmmpw-py.c
2340
python/rpmmpw-py.c
File diff suppressed because it is too large
Load Diff
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "rpmio_internal.h"
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
* \file python/rpmmpw-py.h
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
* \file python/rpmrc-py.c
|
||||
*/
|
||||
|
||||
|
@ -249,7 +249,7 @@ fprintf(stderr, "*** rpmrc_next(%p[%s],%p)\n", s, lbl(s), args);
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static int rpmrc_init(PyObject * s, PyObject *args, PyObject *kwds)
|
||||
/*@*/
|
||||
|
@ -261,7 +261,7 @@ fprintf(stderr, "*** rpmrc_init(%p[%s],%p,%p)\n", s, lbl(s), args, kwds);
|
|||
return 0;
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static void rpmrc_free(PyObject * s)
|
||||
/*@*/
|
||||
|
@ -271,7 +271,7 @@ fprintf(stderr, "*** rpmrc_free(%p[%s])\n", s, lbl(s));
|
|||
_PyObject_GC_Del(s);
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject * rpmrc_alloc(PyTypeObject * subtype, int nitems)
|
||||
/*@*/
|
||||
|
@ -283,7 +283,7 @@ fprintf(stderr, "*** rpmrc_alloc(%p[%s},%d) ret %p[%s]\n", subtype, lbl(subtype)
|
|||
return (PyObject *) ns;
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject * rpmrc_new(PyTypeObject * subtype, PyObject *args, PyObject *kwds)
|
||||
/*@*/
|
||||
|
@ -322,7 +322,7 @@ static struct PyMethodDef rpmrc_methods[] = {
|
|||
};
|
||||
/*@=fullinitblock@*/
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
/*@-fullinitblock@*/
|
||||
#if Py_TPFLAGS_HAVE_ITER
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
#ifndef H_RPMRC_PY
|
||||
#define H_RPMRC_PY
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
* \file python/rpmrc-py.h
|
||||
*/
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
typedef struct rpmrcObject_s rpmrcObject;
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
struct rpmrcObject_s {
|
||||
#if Py_TPFLAGS_HAVE_ITER /* XXX backport to python-1.5.2 */
|
||||
|
|
|
@ -1,330 +0,0 @@
|
|||
/** \ingroup py_c
|
||||
* \file python/rpmrng-py.c
|
||||
*/
|
||||
|
||||
#include "system.h"
|
||||
|
||||
#include "Python.h"
|
||||
#ifdef __LCLINT__
|
||||
#undef PyObject_HEAD
|
||||
#define PyObject_HEAD int _PyObjectHead;
|
||||
#endif
|
||||
|
||||
#include "rpmrng-py.h"
|
||||
#include "mpprime.h"
|
||||
|
||||
#include "rpmdebug-py.c"
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
/*@unchecked@*/
|
||||
static int _rng_debug = 0;
|
||||
|
||||
/*@unchecked@*/ /*@observer@*/
|
||||
static const char initialiser_name[] = "rpm.rng";
|
||||
|
||||
/* ---------- */
|
||||
|
||||
static void
|
||||
rng_dealloc(rngObject * s)
|
||||
/*@modifies s @*/
|
||||
{
|
||||
if (_rng_debug < -1)
|
||||
fprintf(stderr, "*** rng_dealloc(%p)\n", s);
|
||||
|
||||
/*@-modobserver@*/
|
||||
randomGeneratorContextFree(&s->rngc);
|
||||
/*@=modobserver@*/
|
||||
mpbfree(&s->b);
|
||||
PyObject_Del(s);
|
||||
}
|
||||
|
||||
static int
|
||||
rng_print(rngObject * s, FILE * fp, /*@unused@*/ int flags)
|
||||
/*@globals fileSystem @*/
|
||||
/*@modifies fileSystem @*/
|
||||
{
|
||||
if (_rng_debug < -1)
|
||||
fprintf(stderr, "*** rng_print(%p)\n", s);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static int rng_init(rngObject * s, PyObject *args, PyObject *kwds)
|
||||
/*@modifies s @*/
|
||||
{
|
||||
PyObject * o = NULL;
|
||||
const randomGenerator* rng = NULL;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "|O:Cvt", &o)) return -1;
|
||||
|
||||
if (o) {
|
||||
/* XXX "FIPS 186" or "Mersenne Twister" */
|
||||
if (PyString_Check(o))
|
||||
rng = randomGeneratorFind(PyString_AsString(o));
|
||||
}
|
||||
|
||||
if (rng == NULL)
|
||||
rng = randomGeneratorDefault();
|
||||
|
||||
/*@-modobserver@*/
|
||||
if (randomGeneratorContextInit(&s->rngc, rng) != 0)
|
||||
return -1;
|
||||
/*@=modobserver@*/
|
||||
mpbzero(&s->b);
|
||||
|
||||
if (_rng_debug)
|
||||
fprintf(stderr, "*** rng_init(%p[%s],%p[%s],%p[%s])\n", s, lbl(s), args, lbl(args), kwds, lbl(kwds));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static void rng_free(/*@only@*/ rngObject * s)
|
||||
/*@modifies s @*/
|
||||
{
|
||||
if (_rng_debug)
|
||||
fprintf(stderr, "*** rng_free(%p[%s])\n", s, lbl(s));
|
||||
/*@-modobserver@*/
|
||||
randomGeneratorContextFree(&s->rngc);
|
||||
/*@=modobserver@*/
|
||||
mpbfree(&s->b);
|
||||
PyObject_Del(s);
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject * rng_alloc(PyTypeObject * subtype, int nitems)
|
||||
/*@*/
|
||||
{
|
||||
PyObject * ns = PyType_GenericAlloc(subtype, nitems);
|
||||
|
||||
if (_rng_debug)
|
||||
fprintf(stderr, "*** rng_alloc(%p[%s},%d) ret %p[%s]\n", subtype, lbl(subtype), nitems, ns, lbl(ns));
|
||||
return (PyObject *) ns;
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
rng_new(PyTypeObject * subtype, PyObject *args, PyObject *kwds)
|
||||
/*@*/
|
||||
{
|
||||
PyObject * ns = (PyObject *) PyObject_New(rngObject, &rng_Type);
|
||||
|
||||
if (_rng_debug < -1)
|
||||
fprintf(stderr, "*** rng_new(%p[%s],%p[%s],%p[%s]) ret %p[%s]\n", subtype, lbl(subtype), args, lbl(args), kwds, lbl(kwds), ns, lbl(ns));
|
||||
return ns;
|
||||
}
|
||||
|
||||
static rngObject *
|
||||
rng_New(void)
|
||||
{
|
||||
rngObject * ns = PyObject_New(rngObject, &rng_Type);
|
||||
|
||||
return ns;
|
||||
}
|
||||
|
||||
/* ---------- */
|
||||
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject *
|
||||
rng_Debug(/*@unused@*/ rngObject * s, PyObject * args)
|
||||
/*@globals _Py_NoneStruct @*/
|
||||
/*@modifies _Py_NoneStruct @*/
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, "i:Debug", &_rng_debug)) return NULL;
|
||||
|
||||
if (_rng_debug < 0)
|
||||
fprintf(stderr, "*** rng_Debug(%p)\n", s);
|
||||
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject *
|
||||
rng_Seed(rngObject * s, PyObject * args)
|
||||
/*@globals _Py_NoneStruct @*/
|
||||
/*@modifies _Py_NoneStruct @*/
|
||||
{
|
||||
PyObject * o;
|
||||
randomGeneratorContext* rc = &s->rngc;
|
||||
mpwObject *z;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "O:Seed", &o)) return NULL;
|
||||
|
||||
if (!mpw_Check(o) || MPW_SIZE(z = (mpwObject*)o) > 0)
|
||||
return NULL;
|
||||
|
||||
rc->rng->seed(rc->param, (byte*) MPW_DATA(z), MPW_SIZE(z));
|
||||
|
||||
if (_rng_debug < 0)
|
||||
fprintf(stderr, "*** rng_Seed(%p)\n", s);
|
||||
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject *
|
||||
rng_Next(rngObject * s, PyObject * args)
|
||||
/*@*/
|
||||
{
|
||||
PyObject * o = NULL;
|
||||
randomGeneratorContext* rc = &s->rngc;
|
||||
mpbarrett* b = &s->b;
|
||||
mpwObject *z;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "|O:Next", &o)) return NULL;
|
||||
|
||||
if (o) {
|
||||
if (mpw_Check(o) && MPW_SIZE(z = (mpwObject*)o) > 0) {
|
||||
b = alloca(sizeof(*b));
|
||||
mpbzero(b);
|
||||
/* XXX z probably needs normalization here. */
|
||||
mpbset(b, MPW_SIZE(z), MPW_DATA(z));
|
||||
} else
|
||||
; /* XXX error? */
|
||||
}
|
||||
|
||||
if (b == NULL || b->size == 0 || b->modl == NULL) {
|
||||
z = mpw_New(1);
|
||||
rc->rng->next(rc->param, (byte*) MPW_DATA(z), sizeof(*MPW_DATA(z)));
|
||||
} else {
|
||||
mpw* wksp = alloca(b->size * sizeof(*wksp));
|
||||
z = mpw_New(b->size);
|
||||
mpbrnd_w(b, rc, MPW_DATA(z), wksp);
|
||||
}
|
||||
|
||||
if (_rng_debug)
|
||||
fprintf(stderr, "*** rng_Next(%p) %p[%d]\t", s, MPW_DATA(z), MPW_SIZE(z)), mpfprintln(stderr, MPW_SIZE(z), MPW_DATA(z));
|
||||
|
||||
return (PyObject *)z;
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject *
|
||||
rng_Prime(rngObject * s, PyObject * args)
|
||||
/*@*/
|
||||
{
|
||||
randomGeneratorContext* rc = &s->rngc;
|
||||
unsigned pbits = 160;
|
||||
int trials = -1;
|
||||
size_t psize;
|
||||
mpbarrett* b;
|
||||
mpw *temp;
|
||||
mpwObject *z;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "|ii:Prime", &pbits, &trials)) return NULL;
|
||||
|
||||
psize = MP_ROUND_B2W(pbits);
|
||||
temp = alloca((8*psize+2) * sizeof(*temp));
|
||||
|
||||
b = alloca(sizeof(*b));
|
||||
mpbzero(b);
|
||||
|
||||
if (trials <= 2)
|
||||
trials = mpptrials(pbits);
|
||||
#if 1
|
||||
mpprnd_w(b, rc, pbits, trials, (const mpnumber*) 0, temp);
|
||||
#else
|
||||
mpprndsafe_w(b, rc, pbits, trials, temp);
|
||||
#endif
|
||||
|
||||
z = mpw_FromMPW(b->size, b->modl, 1);
|
||||
if (z != NULL && _rng_debug)
|
||||
fprintf(stderr, "*** rng_Prime(%p) %p[%d]\t", s, MPW_DATA(z), MPW_SIZE(z)), mpfprintln(stderr, MPW_SIZE(z), MPW_DATA(z));
|
||||
|
||||
return (PyObject *)z;
|
||||
}
|
||||
|
||||
/*@-fullinitblock@*/
|
||||
/*@unchecked@*/ /*@observer@*/
|
||||
static struct PyMethodDef rng_methods[] = {
|
||||
{"Debug", (PyCFunction)rng_Debug, METH_VARARGS,
|
||||
NULL},
|
||||
{"seed", (PyCFunction)rng_Seed, METH_VARARGS,
|
||||
NULL},
|
||||
{"next", (PyCFunction)rng_Next, METH_VARARGS,
|
||||
NULL},
|
||||
{"prime", (PyCFunction)rng_Prime, METH_VARARGS,
|
||||
NULL},
|
||||
{NULL, NULL} /* sentinel */
|
||||
};
|
||||
/*@=fullinitblock@*/
|
||||
|
||||
static PyObject * rng_getattro(PyObject * o, PyObject * n)
|
||||
/*@*/
|
||||
{
|
||||
return PyObject_GenericGetAttr(o, n);
|
||||
}
|
||||
|
||||
static int rng_setattro(PyObject * o, PyObject * n, PyObject * v)
|
||||
/*@*/
|
||||
{
|
||||
return PyObject_GenericSetAttr(o, n, v);
|
||||
}
|
||||
|
||||
/* ---------- */
|
||||
|
||||
/**
|
||||
*/
|
||||
/*@unchecked@*/ /*@observer@*/
|
||||
static char rng_doc[] =
|
||||
"";
|
||||
|
||||
/*@-fullinitblock@*/
|
||||
PyTypeObject rng_Type = {
|
||||
PyObject_HEAD_INIT(&PyType_Type)
|
||||
0, /* ob_size */
|
||||
"rpm.rng", /* tp_name */
|
||||
sizeof(rngObject), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
/* methods */
|
||||
(destructor) rng_dealloc, /* tp_dealloc */
|
||||
(printfunc) rng_print, /* tp_print */
|
||||
(getattrfunc)0, /* tp_getattr */
|
||||
(setattrfunc)0, /* tp_setattr */
|
||||
(cmpfunc)0, /* tp_compare */
|
||||
(reprfunc)0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
(hashfunc)0, /* tp_hash */
|
||||
(ternaryfunc)0, /* tp_call */
|
||||
(reprfunc)0, /* tp_str */
|
||||
(getattrofunc) rng_getattro, /* tp_getattro */
|
||||
(setattrofunc) rng_setattro, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT, /* tp_flags */
|
||||
rng_doc, /* tp_doc */
|
||||
#if Py_TPFLAGS_HAVE_ITER
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
(getiterfunc)0, /* tp_iter */
|
||||
(iternextfunc)0, /* tp_iternext */
|
||||
rng_methods, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
0, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc) rng_init, /* tp_init */
|
||||
(allocfunc) rng_alloc, /* tp_alloc */
|
||||
(newfunc) rng_new, /* tp_new */
|
||||
(destructor) rng_free, /* tp_free */
|
||||
0, /* tp_is_gc */
|
||||
#endif
|
||||
};
|
||||
/*@=fullinitblock@*/
|
||||
|
||||
/* ---------- */
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "rpmio_internal.h"
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
* \file python/rpmrng-py.h
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
* \file python/rpmte-py.c
|
||||
*/
|
||||
|
||||
|
@ -289,7 +289,7 @@ rpmte_FI(rpmteObject * s, PyObject * args)
|
|||
return (PyObject *) rpmfi_Wrap(rpmfiLink(fi, "rpmte_FI"));
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
/*@-fullinitblock@*/
|
||||
/*@unchecked@*/ /*@observer@*/
|
||||
|
@ -390,7 +390,7 @@ static int rpmte_setattro(PyObject * o, PyObject * n, PyObject * v)
|
|||
static char rpmte_doc[] =
|
||||
"";
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
/*@-fullinitblock@*/
|
||||
PyTypeObject rpmte_Type = {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "rpmte.h"
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
* \file python/rpmte-py.h
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
* \file python/rpmts-py.c
|
||||
*/
|
||||
|
||||
|
@ -43,7 +43,7 @@ static int _rpmts_debug = 0;
|
|||
* \name Class: Rpmts
|
||||
* \class Rpmts
|
||||
* \brief A python rpm.ts object represents an RPM transaction set.
|
||||
*
|
||||
*
|
||||
* The transaction set is the workhorse of RPM. It performs the
|
||||
* installation and upgrade of packages. The rpm.ts object is
|
||||
* instantiated by the TransactionSet function in the rpm module.
|
||||
|
@ -141,14 +141,14 @@ static int _rpmts_debug = 0;
|
|||
* - ts.setProbFilter(ignoreSet) Set transaction set problem filter.
|
||||
* @param problemSetFilter - control bit(s) to ignore classes of problems,
|
||||
* a logical or of one or more of the following bit(s):
|
||||
* - rpm.RPMPROB_FILTER_IGNOREOS -
|
||||
* - rpm.RPMPROB_FILTER_IGNOREARCH -
|
||||
* - rpm.RPMPROB_FILTER_REPLACEPKG -
|
||||
* - rpm.RPMPROB_FILTER_FORCERELOCATE -
|
||||
* - rpm.RPMPROB_FILTER_REPLACENEWFILES -
|
||||
* - rpm.RPMPROB_FILTER_REPLACEOLDFILES -
|
||||
* - rpm.RPMPROB_FILTER_OLDPACKAGE -
|
||||
* - rpm.RPMPROB_FILTER_DISKSPACE -
|
||||
* - rpm.RPMPROB_FILTER_IGNOREOS -
|
||||
* - rpm.RPMPROB_FILTER_IGNOREARCH -
|
||||
* - rpm.RPMPROB_FILTER_REPLACEPKG -
|
||||
* - rpm.RPMPROB_FILTER_FORCERELOCATE -
|
||||
* - rpm.RPMPROB_FILTER_REPLACENEWFILES -
|
||||
* - rpm.RPMPROB_FILTER_REPLACEOLDFILES -
|
||||
* - rpm.RPMPROB_FILTER_OLDPACKAGE -
|
||||
* - rpm.RPMPROB_FILTER_DISKSPACE -
|
||||
* @return previous ignoreSet
|
||||
*
|
||||
* - ts.run(callback,data) Attempt to execute a transaction set.
|
||||
|
@ -157,7 +157,7 @@ static int _rpmts_debug = 0;
|
|||
* the ts.run() method.
|
||||
*/
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
struct rpmtsCallbackType_s {
|
||||
PyObject * cb;
|
||||
|
@ -167,7 +167,7 @@ struct rpmtsCallbackType_s {
|
|||
PyThreadState *_save;
|
||||
};
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject *
|
||||
rpmts_Debug(/*@unused@*/ rpmtsObject * s, PyObject * args)
|
||||
|
@ -183,7 +183,7 @@ fprintf(stderr, "*** rpmts_Debug(%p) ts %p\n", s, s->ts);
|
|||
return Py_None;
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
* Add package to universe of possible packages to install in transaction set.
|
||||
* @param ts transaction set
|
||||
* @param h header
|
||||
|
@ -208,7 +208,7 @@ fprintf(stderr, "\tAddAvailable(%p) list %p\n", ts, ts->availablePackages);
|
|||
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject *
|
||||
rpmts_AddInstall(rpmtsObject * s, PyObject * args)
|
||||
|
@ -252,7 +252,7 @@ fprintf(stderr, "*** rpmts_AddInstall(%p,%p,%p,%s) ts %p\n", s, h, key, how, s->
|
|||
return Py_None;
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
* @todo Permit finer control (i.e. not just --allmatches) of deleted elments.
|
||||
*/
|
||||
static PyObject *
|
||||
|
@ -263,7 +263,7 @@ rpmts_AddErase(rpmtsObject * s, PyObject * args)
|
|||
PyObject * o;
|
||||
int count;
|
||||
rpmdbMatchIterator mi;
|
||||
|
||||
|
||||
if (_rpmts_debug)
|
||||
fprintf(stderr, "*** rpmts_AddErase(%p) ts %p\n", s, s->ts);
|
||||
|
||||
|
@ -313,7 +313,7 @@ fprintf(stderr, "*** rpmts_AddErase(%p) ts %p\n", s, s->ts);
|
|||
return Py_None;
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static int
|
||||
rpmts_SolveCallback(rpmts ts, rpmds ds, const void * data)
|
||||
|
@ -350,7 +350,7 @@ fprintf(stderr, "*** rpmts_SolveCallback(%p,%p,%p) \"%s\"\n", ts, ds, data, rpmd
|
|||
return res;
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject *
|
||||
rpmts_Check(rpmtsObject * s, PyObject * args)
|
||||
|
@ -415,7 +415,7 @@ fprintf(stderr, "*** rpmts_Check(%p) ts %p cb %p\n", s, s->ts, cbInfo.cb);
|
|||
char * needsName, * needsOP, * needsVersion;
|
||||
int needsFlags, sense;
|
||||
fnpyKey key;
|
||||
|
||||
|
||||
p = ps->probs + i;
|
||||
|
||||
byName = p->pkgNEVR;
|
||||
|
@ -444,7 +444,7 @@ fprintf(stderr, "*** rpmts_Check(%p) ts %p cb %p\n", s, s->ts, cbInfo.cb);
|
|||
else if (*needsOP == '=') needsFlags |= RPMSENSE_EQUAL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
cf = Py_BuildValue("((sss)(ss)iOi)", byName, byVersion, byRelease,
|
||||
needsName, needsVersion, needsFlags,
|
||||
(key != NULL ? key : Py_None),
|
||||
|
@ -463,7 +463,7 @@ fprintf(stderr, "*** rpmts_Check(%p) ts %p cb %p\n", s, s->ts, cbInfo.cb);
|
|||
return Py_None;
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject *
|
||||
rpmts_Order(rpmtsObject * s, PyObject * args)
|
||||
|
@ -484,7 +484,7 @@ fprintf(stderr, "*** rpmts_Order(%p) ts %p\n", s, s->ts);
|
|||
return Py_BuildValue("i", rc);
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject *
|
||||
rpmts_Clean(rpmtsObject * s, PyObject * args)
|
||||
|
@ -502,7 +502,7 @@ fprintf(stderr, "*** rpmts_Clean(%p) ts %p\n", s, s->ts);
|
|||
return Py_None;
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject *
|
||||
rpmts_IDTXload(rpmtsObject * s, PyObject * args)
|
||||
|
@ -546,7 +546,7 @@ fprintf(stderr, "*** rpmts_IDTXload(%p) ts %p\n", s, s->ts);
|
|||
return result;
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject *
|
||||
rpmts_IDTXglob(rpmtsObject * s, PyObject * args)
|
||||
|
@ -593,7 +593,7 @@ fprintf(stderr, "*** rpmts_IDTXglob(%p) ts %p\n", s, s->ts);
|
|||
return result;
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject *
|
||||
rpmts_Rollback(rpmtsObject * s, PyObject * args)
|
||||
|
@ -629,7 +629,7 @@ fprintf(stderr, "*** rpmts_Rollback(%p) ts %p\n", s, s->ts);
|
|||
return Py_BuildValue("i", rc);
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject *
|
||||
rpmts_OpenDB(rpmtsObject * s, PyObject * args)
|
||||
|
@ -648,7 +648,7 @@ fprintf(stderr, "*** rpmts_OpenDB(%p) ts %p\n", s, s->ts);
|
|||
return Py_BuildValue("i", rpmtsOpenDB(s->ts, s->ts->dbmode));
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject *
|
||||
rpmts_CloseDB(rpmtsObject * s, PyObject * args)
|
||||
|
@ -667,7 +667,7 @@ fprintf(stderr, "*** rpmts_CloseDB(%p) ts %p\n", s, s->ts);
|
|||
return Py_BuildValue("i", rc);
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject *
|
||||
rpmts_InitDB(rpmtsObject * s, PyObject * args)
|
||||
|
@ -688,7 +688,7 @@ fprintf(stderr, "*** rpmts_InitDB(%p) ts %p\n", s, s->ts);
|
|||
return Py_BuildValue("i", rc);
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject *
|
||||
rpmts_RebuildDB(rpmtsObject * s, PyObject * args)
|
||||
|
@ -709,7 +709,7 @@ fprintf(stderr, "*** rpmts_RebuildDB(%p) ts %p\n", s, s->ts);
|
|||
return Py_BuildValue("i", rc);
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject *
|
||||
rpmts_VerifyDB(rpmtsObject * s, PyObject * args)
|
||||
|
@ -730,7 +730,7 @@ fprintf(stderr, "*** rpmts_VerifyDB(%p) ts %p\n", s, s->ts);
|
|||
return Py_BuildValue("i", rc);
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject *
|
||||
rpmts_HdrFromFdno(rpmtsObject * s, PyObject * args)
|
||||
|
@ -777,7 +777,7 @@ fprintf(stderr, "*** rpmts_HdrFromFdno(%p) ts %p rc %d\n", s, s->ts, rpmrc);
|
|||
return result;
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject *
|
||||
rpmts_HdrCheck(rpmtsObject * s, PyObject * args)
|
||||
|
@ -832,7 +832,7 @@ fprintf(stderr, "*** rpmts_HdrCheck(%p) ts %p\n", s, s->ts);
|
|||
return result;
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject *
|
||||
rpmts_SetVSFlags(rpmtsObject * s, PyObject * args)
|
||||
|
@ -850,7 +850,7 @@ fprintf(stderr, "*** rpmts_SetVSFlags(%p) ts %p\n", s, s->ts);
|
|||
return Py_BuildValue("i", rpmtsSetVSFlags(s->ts, vsflags));
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject *
|
||||
rpmts_SetColor(rpmtsObject * s, PyObject * args)
|
||||
|
@ -868,7 +868,7 @@ fprintf(stderr, "*** rpmts_SetColor(%p) ts %p\n", s, s->ts);
|
|||
return Py_BuildValue("i", rpmtsSetColor(s->ts, tscolor));
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject *
|
||||
rpmts_PgpPrtPkts(rpmtsObject * s, PyObject * args)
|
||||
|
@ -900,7 +900,7 @@ fprintf(stderr, "*** rpmts_PgpPrtPkts(%p) ts %p\n", s, s->ts);
|
|||
return Py_BuildValue("i", rc);
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject *
|
||||
rpmts_PgpImportPubkey(rpmtsObject * s, PyObject * args)
|
||||
|
@ -932,7 +932,7 @@ fprintf(stderr, "*** rpmts_PgpImportPubkey(%p) ts %p\n", s, s->ts);
|
|||
return Py_BuildValue("i", rc);
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject *
|
||||
rpmts_GetKeys(rpmtsObject * s, PyObject * args)
|
||||
|
@ -969,7 +969,7 @@ fprintf(stderr, "*** rpmts_GetKeys(%p) ts %p\n", s, s->ts);
|
|||
return tuple;
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static void *
|
||||
rpmtsCallback(/*@unused@*/ const void * hd, const rpmCallbackType what,
|
||||
|
@ -1029,7 +1029,7 @@ rpmtsCallback(/*@unused@*/ const void * hd, const rpmCallbackType what,
|
|||
fd = fdDup(fdno);
|
||||
if (_rpmts_debug)
|
||||
fprintf(stderr, "\t%p = fdDup(%d)\n", fd, fdno);
|
||||
|
||||
|
||||
return fd;
|
||||
} else
|
||||
if (what == RPMCALLBACK_INST_CLOSE_FILE) {
|
||||
|
@ -1047,7 +1047,7 @@ fprintf(stderr, "\t%ld:%ld key %p\n", amount, total, pkgKey);
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject * rpmts_SetFlags(rpmtsObject * s, PyObject * args)
|
||||
/*@modifies s @*/
|
||||
|
@ -1063,7 +1063,7 @@ fprintf(stderr, "*** rpmts_SetFlags(%p) ts %p transFlags %x\n", s, s->ts, transF
|
|||
return Py_BuildValue("i", rpmtsSetFlags(s->ts, transFlags));
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject * rpmts_SetProbFilter(rpmtsObject * s, PyObject * args)
|
||||
/*@modifies s @*/
|
||||
|
@ -1083,7 +1083,7 @@ fprintf(stderr, "*** rpmts_SetProbFilter(%p) ts %p ignoreSet %x\n", s, s->ts, ig
|
|||
return Py_BuildValue("i", oignoreSet);
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject * rpmts_Run(rpmtsObject * s, PyObject * args)
|
||||
/*@globals rpmGlobalMacroContext, _Py_NoneStruct @*/
|
||||
|
@ -1229,7 +1229,7 @@ rpmts_Match(rpmtsObject * s, PyObject * args)
|
|||
char *key = NULL;
|
||||
int len = 0;
|
||||
int tag = RPMDBI_PACKAGES;
|
||||
|
||||
|
||||
if (_rpmts_debug)
|
||||
fprintf(stderr, "*** rpmts_Match(%p) ts %p\n", s, s->ts);
|
||||
|
||||
|
@ -1253,7 +1253,7 @@ fprintf(stderr, "*** rpmts_Match(%p) ts %p\n", s, s->ts);
|
|||
return rpmmi_Wrap( rpmtsInitIterator(s->ts, tag, key, len) );
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
/*@-fullinitblock@*/
|
||||
/*@unchecked@*/ /*@observer@*/
|
||||
|
@ -1344,7 +1344,7 @@ static struct PyMethodDef rpmts_methods[] = {
|
|||
};
|
||||
/*@=fullinitblock@*/
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static void rpmts_dealloc(/*@only@*/ rpmtsObject * s)
|
||||
/*@modifies *s @*/
|
||||
|
@ -1367,7 +1367,7 @@ static PyObject * rpmts_getattro(PyObject * o, PyObject * n)
|
|||
return PyObject_GenericGetAttr(o, n);
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static int rpmts_setattro(PyObject * o, PyObject * n, PyObject * v)
|
||||
/*@modifies o @*/
|
||||
|
@ -1393,7 +1393,7 @@ static int rpmts_setattro(PyObject * o, PyObject * n, PyObject * v)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static int rpmts_init(rpmtsObject * s, PyObject *args, PyObject *kwds)
|
||||
/*@globals rpmGlobalMacroContext @*/
|
||||
|
@ -1411,15 +1411,15 @@ fprintf(stderr, "*** rpmts_init(%p,%p,%p)\n", s, args, kwds);
|
|||
s->ts = rpmtsCreate();
|
||||
(void) rpmtsSetRootDir(s->ts, rootDir);
|
||||
(void) rpmtsSetVSFlags(s->ts, vsflags);
|
||||
s->keyList = PyList_New(0);
|
||||
s->scriptFd = NULL;
|
||||
s->keyList = PyList_New(0);
|
||||
s->scriptFd = NULL;
|
||||
s->tsi = NULL;
|
||||
s->tsiFilter = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static void rpmts_free(/*@only@*/ rpmtsObject * s)
|
||||
/*@modifies s @*/
|
||||
|
@ -1438,7 +1438,7 @@ fprintf(stderr, "%p -- ts %p db %p\n", s, s->ts, s->ts->rdb);
|
|||
PyObject_Del((PyObject *)s);
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject * rpmts_alloc(PyTypeObject * subtype, int nitems)
|
||||
/*@*/
|
||||
|
@ -1450,7 +1450,7 @@ fprintf(stderr, "*** rpmts_alloc(%p,%d) ret %p\n", subtype, nitems, s);
|
|||
return s;
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject * rpmts_new(PyTypeObject * subtype, PyObject *args, PyObject *kwds)
|
||||
/*@globals rpmGlobalMacroContext @*/
|
||||
|
@ -1476,7 +1476,7 @@ fprintf(stderr, "%p ++ ts %p db %p\n", s, s->ts, s->ts->rdb);
|
|||
static char rpmts_doc[] =
|
||||
"";
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
/*@-fullinitblock@*/
|
||||
PyTypeObject rpmts_Type = {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "rpmts.h"
|
||||
|
||||
/** \ingroup py_c
|
||||
/** \ingroup py_c
|
||||
* \file python/rpmts-py.h
|
||||
*/
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
+partial
|
||||
+forcehints
|
||||
|
||||
#-warnunixlib
|
||||
-warnposix
|
||||
|
||||
+unixlib
|
||||
|
|
|
@ -36,9 +36,10 @@ mylibs = librpmdb.la
|
|||
|
||||
LIBS =
|
||||
|
||||
DB3LOBJS = $(shell cat $(top_builddir)/$(WITH_DB_SUBDIR)/db3lobjs)
|
||||
DB3LO = $(shell cat $(top_builddir)/$(WITH_DB_SUBDIR)/db3lobjs)
|
||||
DB3LOBJS = $(DB3LO:%.lo=%.o)
|
||||
|
||||
LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir)
|
||||
LDFLAGS = -L$(DESTDIR)$(usrlibdir)
|
||||
|
||||
usrlibdir = $(libdir)@MARK64@
|
||||
usrlib_LTLIBRARIES = librpmdb.la
|
||||
|
@ -47,7 +48,7 @@ librpmdb_la_SOURCES = \
|
|||
hdrNVR.c header.c header_internal.c legacy.c merge.c \
|
||||
poptDB.c rpmhash.c rpmdb.c \
|
||||
tagname.c tagtbl.c
|
||||
librpmdb_la_LDFLAGS = -release @VERSION@ $(LDFLAGS) \
|
||||
librpmdb_la_LDFLAGS = -release 4.3 \
|
||||
$(top_builddir)/rpmio/librpmio.la \
|
||||
$(top_builddir)/popt/libpopt.la \
|
||||
@WITH_LIBELF_LIB@ \
|
||||
|
@ -87,79 +88,79 @@ db.h:
|
|||
|
||||
rpmdb_archive_SOURCES =
|
||||
rpmdb_archive_LDADD = \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/db_archive.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/db_archive.o \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.o \
|
||||
librpmdb.la
|
||||
|
||||
rpmdb_checkpoint_SOURCES =
|
||||
rpmdb_checkpoint_LDADD = \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/db_checkpoint.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_log.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/db_checkpoint.o \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_log.o \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.o \
|
||||
librpmdb.la
|
||||
|
||||
rpmdb_deadlock_SOURCES =
|
||||
rpmdb_deadlock_LDADD = \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/db_deadlock.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_log.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/db_deadlock.o \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_log.o \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.o \
|
||||
librpmdb.la
|
||||
|
||||
rpmdb_dump_SOURCES =
|
||||
rpmdb_dump_LDADD = \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/db_dump.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_cache.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/db_dump.o \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_cache.o \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.o \
|
||||
librpmdb.la
|
||||
|
||||
rpmdb_load_SOURCES =
|
||||
rpmdb_load_LDADD = \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/db_load.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_cache.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/db_load.o \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_cache.o \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.o \
|
||||
librpmdb.la
|
||||
|
||||
rpmdb_printlog_SOURCES =
|
||||
rpmdb_printlog_LDADD = \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/db_printlog.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/db_printlog.o \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.o \
|
||||
librpmdb.la
|
||||
|
||||
rpmdb_recover_SOURCES =
|
||||
rpmdb_recover_LDADD = \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/db_recover.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_cache.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/db_recover.o \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_cache.o \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.o \
|
||||
librpmdb.la
|
||||
|
||||
rpmdb_stat_SOURCES =
|
||||
rpmdb_stat_LDADD = \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/db_stat.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_cache.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/db_stat.o \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_cache.o \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.o \
|
||||
librpmdb.la
|
||||
|
||||
rpmdb_svc_SOURCES =
|
||||
rpmdb_svc_LDADD = \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/db_server_proc.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/db_server_svc.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/db_server_util.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/gen_db_server.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_log.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/db_server_proc.o \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/db_server_svc.o \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/db_server_util.o \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/gen_db_server.o \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_log.o \
|
||||
librpmdb.la
|
||||
|
||||
rpmdb_upgrade_SOURCES =
|
||||
rpmdb_upgrade_LDADD = \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/db_upgrade.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_cache.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/db_upgrade.o \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_cache.o \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.o \
|
||||
librpmdb.la
|
||||
|
||||
rpmdb_verify_SOURCES =
|
||||
rpmdb_verify_LDADD = \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/db_verify.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_cache.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.lo \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/db_verify.o \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_cache.o \
|
||||
$(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.o \
|
||||
librpmdb.la
|
||||
|
||||
clean-local:
|
||||
|
|
17
rpmdb/db3.c
17
rpmdb/db3.c
|
@ -20,6 +20,10 @@ static int _debug = 1; /* XXX if < 0 debugging, > 0 unusual error returns */
|
|||
|
||||
#include "debug.h"
|
||||
|
||||
#if !defined(DB_CLIENT) /* XXX db-4.2.42 retrofit */
|
||||
#define DB_CLIENT DB_RPCCLIENT
|
||||
#endif
|
||||
|
||||
/*@access rpmdb @*/
|
||||
/*@access dbiIndex @*/
|
||||
/*@access dbiIndexSet @*/
|
||||
|
@ -453,7 +457,7 @@ static int db3sync(dbiIndex dbi, unsigned int flags)
|
|||
if (db != NULL)
|
||||
rc = db->sync(db, flags);
|
||||
/* XXX DB_INCOMPLETE is returned occaisionally with multiple access. */
|
||||
#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 1)
|
||||
#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
|
||||
_printit = _debug;
|
||||
#else
|
||||
_printit = (rc == DB_INCOMPLETE ? 0 : _debug);
|
||||
|
@ -690,13 +694,12 @@ static int db3associate(dbiIndex dbi, dbiIndex dbisecondary,
|
|||
{
|
||||
DB * db = dbi->dbi_db;
|
||||
DB * secondary = dbisecondary->dbi_db;
|
||||
#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 1)
|
||||
DB_TXN * txnid = NULL;
|
||||
#endif
|
||||
int rc;
|
||||
|
||||
/*@-moduncon@*/ /* FIX: annotate db3 methods */
|
||||
#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 1)
|
||||
#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
|
||||
DB_TXN * txnid = NULL;
|
||||
|
||||
rc = db->associate(db, txnid, secondary, callback, flags);
|
||||
#else
|
||||
rc = db->associate(db, secondary, callback, flags);
|
||||
|
@ -892,7 +895,7 @@ static int db3open(rpmdb rpmdb, rpmTag rpmtag, dbiIndex * dbip)
|
|||
|
||||
DB * db = NULL;
|
||||
DB_ENV * dbenv = NULL;
|
||||
#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 1)
|
||||
#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
|
||||
DB_TXN * txnid = NULL;
|
||||
#endif
|
||||
u_int32_t oflags;
|
||||
|
@ -1254,7 +1257,7 @@ static int db3open(rpmdb rpmdb, rpmTag rpmtag, dbiIndex * dbip)
|
|||
? dbfullpath : dbfile;
|
||||
#endif
|
||||
|
||||
#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 1)
|
||||
#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
|
||||
rc = db->open(db, txnid, dbpath, dbsubfile,
|
||||
dbi->dbi_type, oflags, dbi->dbi_perms);
|
||||
#else
|
||||
|
|
|
@ -34,8 +34,16 @@ static int dbi_tear_down;
|
|||
/*@unchecked@*/
|
||||
struct poptOption rdbOptions[] = {
|
||||
/* XXX DB_CXX_NO_EXCEPTIONS */
|
||||
#if defined(DB_CLIENT)
|
||||
{ "client", 0,POPT_BIT_SET, &db3dbi.dbi_ecflags, DB_CLIENT,
|
||||
NULL, NULL },
|
||||
#endif
|
||||
#if defined(DB_RPCCLIENT)
|
||||
{ "client", 0,POPT_BIT_SET, &db3dbi.dbi_ecflags, DB_RPCCLIENT,
|
||||
NULL, NULL },
|
||||
{ "rpcclient", 0,POPT_BIT_SET, &db3dbi.dbi_ecflags, DB_RPCCLIENT,
|
||||
NULL, NULL },
|
||||
#endif
|
||||
|
||||
{ "xa_create", 0,POPT_BIT_SET, &db3dbi.dbi_cflags, DB_XA_CREATE,
|
||||
NULL, NULL },
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
+partial
|
||||
+forcehints
|
||||
|
||||
#-warnunixlib
|
||||
-warnposix
|
||||
|
||||
+unixlib
|
||||
|
|
|
@ -31,7 +31,7 @@ librpmio_la_SOURCES = \
|
|||
argv.c digest.c fts.c macro.c \
|
||||
rpmio.c rpmlog.c rpmmalloc.c \
|
||||
rpmpgp.c rpmrpc.c rpmsq.c rpmsw.c strcasecmp.c stubs.c url.c ugid.c
|
||||
librpmio_la_LDFLAGS = -release @VERSION@ $(LDFLAGS) \
|
||||
librpmio_la_LDFLAGS = -release 4.3 $(LDFLAGS) \
|
||||
@WITH_BEECRYPT_LIB@ \
|
||||
$(top_builddir)/file/src/libfmagic.la \
|
||||
@WITH_ZLIB_LIB@ \
|
||||
|
|
|
@ -98,7 +98,8 @@ struct pgpDig_s {
|
|||
typedef struct _FDSTACK_s {
|
||||
/*@exposed@*/
|
||||
FDIO_t io;
|
||||
/*@dependent@*/ void * fp;
|
||||
/*@dependent@*/
|
||||
void * fp;
|
||||
int fdno;
|
||||
} FDSTACK_t;
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#if defined(__LCLINT__)
|
||||
#define _BITS_SIGTHREAD_H /* XXX avoid __sigset_t heartburn. */
|
||||
|
||||
/*@-incondefs -protoparammatch@*/
|
||||
/*@-exportheader@*/
|
||||
/*@constant int SA_SIGINFO@*/
|
||||
extern int sighold(int sig)
|
||||
|
@ -61,34 +62,42 @@ extern void _pthread_cleanup_push(/*@out@*/ struct _pthread_cleanup_buffer *__bu
|
|||
/*@modifies internalState @*/;
|
||||
|
||||
extern int pthread_mutexattr_destroy(pthread_mutexattr_t *attr)
|
||||
/*@modifies *attr @*/;
|
||||
/*@globals errno, internalState @*/
|
||||
/*@modifies *attr, errno, internalState @*/;
|
||||
extern int pthread_mutexattr_init(/*@out@*/ pthread_mutexattr_t *attr)
|
||||
/*@modifies *attr @*/;
|
||||
/*@globals errno, internalState @*/
|
||||
/*@modifies *attr, errno, internalState @*/;
|
||||
|
||||
int pthread_mutexattr_gettype(const pthread_mutexattr_t *restrict attr,
|
||||
/*@out@*/ int *restrict type)
|
||||
/*@modifies *type @*/;
|
||||
int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type)
|
||||
/*@modifies *attr @*/;
|
||||
/*@globals errno, internalState @*/
|
||||
/*@modifies *attr, errno, internalState @*/;
|
||||
|
||||
extern int pthread_mutex_destroy(pthread_mutex_t *mutex)
|
||||
/*@modifies *mutex @*/;
|
||||
extern int pthread_mutex_init(/*@out@*/ pthread_mutex_t *restrict mutex,
|
||||
/*@null@*/ const pthread_mutexattr_t *restrict attr)
|
||||
/*@modifies *mutex @*/;
|
||||
/*@globals errno, internalState @*/
|
||||
/*@modifies *mutex, errno, internalState @*/;
|
||||
|
||||
extern int pthread_mutex_lock(pthread_mutex_t *mutex)
|
||||
/*@modifies *mutex @*/;
|
||||
/*@globals errno @*/
|
||||
/*@modifies *mutex, errno @*/;
|
||||
extern int pthread_mutex_trylock(pthread_mutex_t *mutex)
|
||||
/*@modifies *mutex @*/;
|
||||
/*@globals errno @*/
|
||||
/*@modifies *mutex, errno @*/;
|
||||
extern int pthread_mutex_unlock(pthread_mutex_t *mutex)
|
||||
/*@modifies *mutex @*/;
|
||||
/*@globals errno @*/
|
||||
/*@modifies *mutex, errno @*/;
|
||||
|
||||
extern int pthread_cond_destroy(pthread_cond_t *cond)
|
||||
/*@modifies *cond @*/;
|
||||
extern int pthread_cond_init(/*@out@*/ pthread_cond_t *restrict cond,
|
||||
const pthread_condattr_t *restrict attr)
|
||||
/*@modifies *cond @*/;
|
||||
/*@globals errno, internalState @*/
|
||||
/*@modifies *cond, errno, internalState @*/;
|
||||
|
||||
extern int pthread_cond_timedwait(pthread_cond_t *restrict cond,
|
||||
pthread_mutex_t *restrict mutex,
|
||||
|
@ -98,11 +107,14 @@ extern int pthread_cond_wait(pthread_cond_t *restrict cond,
|
|||
pthread_mutex_t *restrict mutex)
|
||||
/*@modifies *cond, *mutex @*/;
|
||||
extern int pthread_cond_broadcast(pthread_cond_t *cond)
|
||||
/*@modifies *cond @*/;
|
||||
/*@globals errno, internalState @*/
|
||||
/*@modifies *cond, errno, internalState @*/;
|
||||
extern int pthread_cond_signal(pthread_cond_t *cond)
|
||||
/*@modifies *cond @*/;
|
||||
/*@globals errno, internalState @*/
|
||||
/*@modifies *cond, errno, internalState @*/;
|
||||
|
||||
/*@=exportheader@*/
|
||||
/*@=incondefs =protoparammatch@*/
|
||||
#endif
|
||||
|
||||
#include <signal.h>
|
||||
|
|
8
system.h
8
system.h
|
@ -19,6 +19,14 @@ typedef unsigned char u_int8_t;
|
|||
/*@-incondefs@*/ /* LCLint 3.0.0.15 */
|
||||
typedef int int32_t;
|
||||
/*@=incondefs@*/
|
||||
/* XXX from /usr/include/bits/sigset.h */
|
||||
/*@-sizeoftype@*/
|
||||
# define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int)))
|
||||
typedef struct
|
||||
{
|
||||
unsigned long int __val[_SIGSET_NWORDS];
|
||||
} __sigset_t;
|
||||
/*@=sizeoftype@*/
|
||||
/*@=redef@*/
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue