diff options
-rwxr-xr-x | beecrypt/configure | 123 | ||||
-rw-r--r-- | lib/rpmcli.h | 31 | ||||
-rw-r--r-- | lib/rpminstall.c | 166 | ||||
-rw-r--r-- | lib/trb.c | 223 | ||||
-rw-r--r-- | po/rpm.pot | 161 | ||||
-rw-r--r-- | rpmdb/rpmdb.c | 5 |
6 files changed, 478 insertions, 231 deletions
diff --git a/beecrypt/configure b/beecrypt/configure index aaded41f2..96ae16e63 100755 --- a/beecrypt/configure +++ b/beecrypt/configure @@ -6925,16 +6925,19 @@ else CFLAGS="$CFLAGS -fomit-frame-pointer" ;; i386) - CFLAGS="$CFLAGS -m386 -march=i386 -fomit-frame-pointer" + CFLAGS="$CFLAGS -mcpu=i386 -march=i386 -fomit-frame-pointer" ;; i486) - CFLAGS="$CFLAGS -m486 -march=i486 -fomit-frame-pointer" + CFLAGS="$CFLAGS -mcpu=i386 -march=i486 -fomit-frame-pointer" ;; i586) - CFLAGS="$CFLAGS -mpentium -march=pentium -fomit-frame-pointer" + CFLAGS="$CFLAGS -mcpu=i386 -march=i586 -fomit-frame-pointer" ;; i686) - CFLAGS="$CFLAGS -mpentiumpro -march=pentiumpro -fomit-frame-pointer" + CFLAGS="$CFLAGS -mcpu=i386 -march=i686 -fomit-frame-pointer" + ;; + sparc) + CFLAGS="$CFLAGS -m32 -mtune=ultrasparc" ;; sparcv8) CFLAGS="$CFLAGS -mv8" @@ -6944,8 +6947,10 @@ else # CFLAGS="$CFLAGS -mv8plus" # ;; sparcv9*) - echo "configure: warning: gcc currently cannot build 64-bit objects" 1>&2 - CFLAGS="$CFLAGS -mcpu=v9 -m64 -mptr64" + CFLAGS="$CFLAGS -m32 -mcpu=ultrasparc" + ;; + sparc64) + CFLAGS="$CFLAGS -m64 -mcpu=ultrasparc" ;; esac fi @@ -7028,14 +7033,14 @@ if test "$ac_with_javaglue" = yes ; then fi echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:7032: checking whether byte ordering is bigendian" >&5 +echo "configure:7037: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext <<EOF -#line 7039 "configure" +#line 7044 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/param.h> @@ -7046,11 +7051,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:7050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext <<EOF -#line 7054 "configure" +#line 7059 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/param.h> @@ -7061,7 +7066,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:7065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -7081,7 +7086,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 7085 "configure" +#line 7090 "configure" #include "confdefs.h" main () { /* Are we little or big endian? From Harbison&Steele. */ @@ -7094,7 +7099,7 @@ main () { exit (u.c[sizeof (long) - 1] == 1); } EOF -if { (eval echo configure:7098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -7119,7 +7124,7 @@ fi echo $ac_n "checking size of char""... $ac_c" 1>&6 -echo "configure:7123: checking size of char" >&5 +echo "configure:7128: checking size of char" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7127,7 +7132,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 7131 "configure" +#line 7136 "configure" #include "confdefs.h" #include <stdio.h> int main() @@ -7138,7 +7143,7 @@ int main() return(0); } EOF -if { (eval echo configure:7142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_char=`cat conftestval` else @@ -7158,7 +7163,7 @@ EOF echo $ac_n "checking size of unsigned char""... $ac_c" 1>&6 -echo "configure:7162: checking size of unsigned char" >&5 +echo "configure:7167: checking size of unsigned char" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_char'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7166,7 +7171,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 7170 "configure" +#line 7175 "configure" #include "confdefs.h" #include <stdio.h> int main() @@ -7177,7 +7182,7 @@ int main() return(0); } EOF -if { (eval echo configure:7181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_unsigned_char=`cat conftestval` else @@ -7214,7 +7219,7 @@ else fi echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:7218: checking size of short" >&5 +echo "configure:7223: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7222,7 +7227,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 7226 "configure" +#line 7231 "configure" #include "confdefs.h" #include <stdio.h> int main() @@ -7233,7 +7238,7 @@ int main() return(0); } EOF -if { (eval echo configure:7237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short=`cat conftestval` else @@ -7253,7 +7258,7 @@ EOF echo $ac_n "checking size of unsigned short""... $ac_c" 1>&6 -echo "configure:7257: checking size of unsigned short" >&5 +echo "configure:7262: checking size of unsigned short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7261,7 +7266,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 7265 "configure" +#line 7270 "configure" #include "confdefs.h" #include <stdio.h> int main() @@ -7272,7 +7277,7 @@ int main() return(0); } EOF -if { (eval echo configure:7276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_unsigned_short=`cat conftestval` else @@ -7309,7 +7314,7 @@ else fi echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:7313: checking size of int" >&5 +echo "configure:7318: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7317,7 +7322,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 7321 "configure" +#line 7326 "configure" #include "confdefs.h" #include <stdio.h> int main() @@ -7328,7 +7333,7 @@ int main() return(0); } EOF -if { (eval echo configure:7332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -7348,7 +7353,7 @@ EOF echo $ac_n "checking size of unsigned int""... $ac_c" 1>&6 -echo "configure:7352: checking size of unsigned int" >&5 +echo "configure:7357: checking size of unsigned int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7356,7 +7361,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 7360 "configure" +#line 7365 "configure" #include "confdefs.h" #include <stdio.h> int main() @@ -7367,7 +7372,7 @@ int main() return(0); } EOF -if { (eval echo configure:7371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_unsigned_int=`cat conftestval` else @@ -7387,7 +7392,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:7391: checking size of long" >&5 +echo "configure:7396: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7395,7 +7400,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 7399 "configure" +#line 7404 "configure" #include "confdefs.h" #include <stdio.h> int main() @@ -7406,7 +7411,7 @@ int main() return(0); } EOF -if { (eval echo configure:7410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -7426,7 +7431,7 @@ EOF echo $ac_n "checking size of unsigned long""... $ac_c" 1>&6 -echo "configure:7430: checking size of unsigned long" >&5 +echo "configure:7435: checking size of unsigned long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7434,7 +7439,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 7438 "configure" +#line 7443 "configure" #include "confdefs.h" #include <stdio.h> int main() @@ -7445,7 +7450,7 @@ int main() return(0); } EOF -if { (eval echo configure:7449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_unsigned_long=`cat conftestval` else @@ -7498,7 +7503,7 @@ EOF else echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:7502: checking size of long long" >&5 +echo "configure:7507: checking size of long long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7506,7 +7511,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 7510 "configure" +#line 7515 "configure" #include "confdefs.h" #include <stdio.h> int main() @@ -7517,7 +7522,7 @@ int main() return(0); } EOF -if { (eval echo configure:7521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_long=`cat conftestval` else @@ -7556,7 +7561,7 @@ EOF else echo $ac_n "checking size of unsigned long long""... $ac_c" 1>&6 -echo "configure:7560: checking size of unsigned long long" >&5 +echo "configure:7565: checking size of unsigned long long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7564,7 +7569,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 7568 "configure" +#line 7573 "configure" #include "confdefs.h" #include <stdio.h> int main() @@ -7575,7 +7580,7 @@ int main() return(0); } EOF -if { (eval echo configure:7579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_unsigned_long_long=`cat conftestval` else @@ -7609,7 +7614,7 @@ EOF fi echo $ac_n "checking size of float""... $ac_c" 1>&6 -echo "configure:7613: checking size of float" >&5 +echo "configure:7618: checking size of float" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7617,7 +7622,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 7621 "configure" +#line 7626 "configure" #include "confdefs.h" #include <stdio.h> int main() @@ -7628,7 +7633,7 @@ int main() return(0); } EOF -if { (eval echo configure:7632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_float=`cat conftestval` else @@ -7657,7 +7662,7 @@ else fi echo $ac_n "checking size of double""... $ac_c" 1>&6 -echo "configure:7661: checking size of double" >&5 +echo "configure:7666: checking size of double" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7665,7 +7670,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 7669 "configure" +#line 7674 "configure" #include "confdefs.h" #include <stdio.h> int main() @@ -7676,7 +7681,7 @@ int main() return(0); } EOF -if { (eval echo configure:7680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_double=`cat conftestval` else @@ -7705,22 +7710,22 @@ else fi echo "checking for specific entropy devices" 1>&6 -echo "configure:7709: checking for specific entropy devices" >&5 +echo "configure:7714: checking for specific entropy devices" >&5 case $target_os in cygwin*) echo $ac_n "checking for wavein""... $ac_c" 1>&6 -echo "configure:7713: checking for wavein" >&5 +echo "configure:7718: checking for wavein" >&5 echo "$ac_t""yes" 1>&6 echo $ac_n "checking for wincrypt""... $ac_c" 1>&6 -echo "configure:7716: checking for wincrypt" >&5 +echo "configure:7721: checking for wincrypt" >&5 echo "$ac_t""yes" 1>&6 echo $ac_n "checking for console""... $ac_c" 1>&6 -echo "configure:7719: checking for console" >&5 +echo "configure:7724: checking for console" >&5 echo "$ac_t""yes" 1>&6 ;; linux*) echo $ac_n "checking for /dev/dsp""... $ac_c" 1>&6 -echo "configure:7724: checking for /dev/dsp" >&5 +echo "configure:7729: checking for /dev/dsp" >&5 if eval "test \"`echo '$''{'ac_cv_have_dev_dsp'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7743,7 +7748,7 @@ EOF ;; solaris*) echo $ac_n "checking for /dev/audio""... $ac_c" 1>&6 -echo "configure:7747: checking for /dev/audio" >&5 +echo "configure:7752: checking for /dev/audio" >&5 if eval "test \"`echo '$''{'ac_cv_have_dev_audio'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7774,9 +7779,9 @@ case $target_os in ;; *) echo "checking for generic entropy devices" 1>&6 -echo "configure:7778: checking for generic entropy devices" >&5 +echo "configure:7783: checking for generic entropy devices" >&5 echo $ac_n "checking for /dev/random""... $ac_c" 1>&6 -echo "configure:7780: checking for /dev/random" >&5 +echo "configure:7785: checking for /dev/random" >&5 if eval "test \"`echo '$''{'ac_cv_have_dev_random'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7797,7 +7802,7 @@ EOF fi echo $ac_n "checking for /dev/urandom""... $ac_c" 1>&6 -echo "configure:7801: checking for /dev/urandom" >&5 +echo "configure:7806: checking for /dev/urandom" >&5 if eval "test \"`echo '$''{'ac_cv_have_dev_urandom'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7818,7 +7823,7 @@ EOF fi echo $ac_n "checking for /dev/tty""... $ac_c" 1>&6 -echo "configure:7822: checking for /dev/tty" >&5 +echo "configure:7827: checking for /dev/tty" >&5 if eval "test \"`echo '$''{'ac_cv_have_dev_tty'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else diff --git a/lib/rpmcli.h b/lib/rpmcli.h index e1f01f950..93c89078d 100644 --- a/lib/rpmcli.h +++ b/lib/rpmcli.h @@ -29,8 +29,10 @@ extern "C" { */ struct rpmBuildArguments_s { int buildAmount; /*!< Bit(s) to control operation. */ -/*@null@*/ const char * buildRootOverride; /*!< from --buildroot */ -/*@null@*/ char * targets; /*!< Target platform(s), comma separated. */ +/*@null@*/ + const char * buildRootOverride; /*!< from --buildroot */ +/*@null@*/ + char * targets; /*!< Target platform(s), comma separated. */ /*@observer@*/ const char * passPhrase; /*!< Pass phrase. */ /*@only@*/ /*@null@*/ @@ -44,7 +46,8 @@ struct rpmBuildArguments_s { int useCatalog; /*!< from --usecatalog */ char buildMode; /*!< Build mode (one of "btBC") */ char buildChar; /*!< Build stage (one of "abcilps ") */ -/*@observer@*/ /*@null@*/ const char * rootdir; +/*@observer@*/ /*@null@*/ + const char * rootdir; }; /** \ingroup rpmcli @@ -204,7 +207,8 @@ struct rpmQVKArguments_s { rpmdbMatchIterator qva_mi; /*!< Match iterator on selected headers. */ /*@null@*/ QVF_t qva_showPackage; /*!< Function to display iterator matches. */ -/*@unused@*/ int qva_verbose; /*!< (unused) */ +/*@unused@*/ + int qva_verbose; /*!< (unused) */ /*@only@*/ /*@null@*/ const char * qva_queryFormat;/*!< Format for headerSprintf(). */ int sign; /*!< Is a passphrase needed? */ @@ -474,13 +478,16 @@ struct rpmInstallArguments_s { rpmprobFilterFlags probFilter; rpmInstallInterfaceFlags installInterfaceFlags; rpmEraseInterfaceFlags eraseInterfaceFlags; -/*@only@*/ /*@null@*/ rpmRelocation * relocations; +/*@only@*/ /*@null@*/ + rpmRelocation * relocations; int numRelocations; int noDeps; int incldocs; -/*@null@*/ const char * prefix; -/*@observer@*/ /*@null@*/ const char * rootdir; - int_32 rbtid; /*!< from --rollback */ +/*@null@*/ + const char * prefix; +/*@observer@*/ /*@null@*/ + const char * rootdir; + uint_32 rbtid; /*!< from --rollback */ }; /** @@ -489,10 +496,11 @@ struct rpmInstallArguments_s { /*@-fielduse@*/ typedef /*@abstract@*/ struct IDT_s { unsigned int instance; /*!< installed package transaction id. */ -/*@owned@*/ /*@null@*/ const char * key; /*! removed package file name. */ +/*@owned@*/ /*@null@*/ + const char * key; /*! removed package file name. */ Header h; /*!< removed package header. */ union { - int_32 i32; /*!< install/remove transaction id */ + uint_32 u32; /*!< install/remove transaction id */ } val; } * IDT; /*@=fielduse@*/ @@ -505,7 +513,8 @@ typedef /*@abstract@*/ struct IDTindex_s { int size; /*!< size of id index element. */ int alloced; /*!< current number of elements allocated. */ int nidt; /*!< current number of elements initialized. */ -/*@only@*/ /*@null@*/ IDT idt; /*!< id index elements. */ +/*@only@*/ /*@null@*/ + IDT idt; /*!< id index elements. */ } * IDTX; /** diff --git a/lib/rpminstall.c b/lib/rpminstall.c index 312397eb6..df46f6ebc 100644 --- a/lib/rpminstall.c +++ b/lib/rpminstall.c @@ -721,7 +721,7 @@ static int IDTintcmp(const void * a, const void * b) /*@*/ { /*@-castexpose@*/ - return ( reverse * (((IDT)a)->val.i32 - ((IDT)b)->val.i32) ); + return ( reverse * (((IDT)a)->val.u32 - ((IDT)b)->val.u32) ); /*@=castexpose@*/ } @@ -807,7 +807,7 @@ IDTX IDTXload(rpmTransactionSet ts, rpmTag tag) idt->h = headerLink(h, "IDTXload idt->h"); idt->key = NULL; idt->instance = rpmdbGetIteratorOffset(mi); - idt->val.i32 = *tidp; + idt->val.u32 = *tidp; } idtx->nidt++; } @@ -875,7 +875,7 @@ IDTX IDTXglob(rpmTransactionSet ts, const char * globstr, rpmTag tag) idt->key = av[i]; av[i] = NULL; idt->instance = 0; - idt->val.i32 = *tidp; + idt->val.u32 = *tidp; } idtx->nidt++; } @@ -892,21 +892,169 @@ IDTX IDTXglob(rpmTransactionSet ts, const char * globstr, rpmTag tag) return idtx; } +/** @todo Transaction handling, more, needs work. */ int rpmRollback(rpmTransactionSet ts, - /*@unused@*/ struct rpmInstallArguments_s * ia, - /*@unused@*/ const char ** argv) + struct rpmInstallArguments_s * ia, + const char ** argv) { +#ifdef NOTYET + rpmdb db = NULL; + rpmTransactionSet ts = NULL; + rpmDependencyConflict conflicts = NULL; + int numConflicts = 0; + rpmProblemSet probs = NULL; + int ifmask= (INSTALL_UPGRADE|INSTALL_FRESHEN|INSTALL_INSTALL|INSTALL_ERASE); + unsigned thistid = 0xffffffff; + unsigned prevtid; + time_t tid; +#endif IDTX itids = NULL; - const char * globstr = rpmExpand("%{_repackage_dir}/*.rpm", NULL); IDTX rtids = NULL; + IDT rp; + int nrids = 0; + IDT ip; + int niids = 0; + int rc = 0; + + if (argv != NULL && *argv != NULL) { + rc = -1; + goto exit; + } itids = IDTXload(ts, RPMTAG_INSTALLTID); + if (itids != NULL) { + ip = itids->idt; + niids = itids->nidt; + } else { + ip = NULL; + niids = 0; + } + + { const char * globstr = rpmExpand("%{_repackage_dir}/*.rpm", NULL); + if (globstr == NULL || *globstr == '%') { + globstr = _free(globstr); + rc = -1; + goto exit; + } + rtids = IDTXglob(ts, globstr, RPMTAG_REMOVETID); + if (rtids != NULL) { + rp = rtids->idt; + nrids = rtids->nidt; + } else { + rp = NULL; + nrids = 0; + } + globstr = _free(globstr); + } + +#ifdef NOTYET + /* Run transactions until rollback goal is achieved. */ + do { + prevtid = thistid; + rc = 0; + packagesTotal = 0; + ia->installInterfaceFlags &= ~ifmask; + + /* Find larger of the remaining install/erase transaction id's. */ + thistid = 0; + if (ip != NULL && ip->val.u32 > thistid) + thistid = ip->val.u32; + if (rp != NULL && rp->val.u32 > thistid) + thistid = rp->val.u32; + + /* If we've achieved the rollback goal, then we're done. */ + if (thistid == 0 || thistid < ia->rbtid) + break; + + /* Install the previously erased packages for this transaction. */ + while (rp != NULL && rp->val.u32 == thistid) { + + rpmMessage(RPMMESS_DEBUG, "\t+++ %s\n", rp->key); + + rc = rpmtransAddPackage(ts, rp->h, (fnpyKey)rp->key, + 0, ia->relocations); + if (rc != 0) + goto exit; + + packagesTotal++; + if (!(ia->installInterfaceFlags & ifmask)) + ia->installInterfaceFlags |= INSTALL_UPGRADE; + +#ifdef NOTYET + rp->h = headerFree(rp->h); +#endif + nrids--; + if (nrids > 0) + rp++; + else + rp = NULL; + } + + /* Erase the previously installed packages for this transaction. */ + while (ip != NULL && ip->val.u32 == thistid) { + + rpmMessage(RPMMESS_DEBUG, + "\t--- rpmdb instance #%u\n", ip->instance); + + rc = rpmtransRemovePackage(ts, ip->instance); + if (rc != 0) + goto exit; + + packagesTotal++; + if (!(ia->installInterfaceFlags & ifmask)) + ia->installInterfaceFlags |= INSTALL_ERASE; + +#ifdef NOTYET + ip->instance = 0; +#endif + niids--; + if (niids > 0) + ip++; + else + ip = NULL; + } + + /* Anything to do? */ + if (packagesTotal <= 0) + break; + + tid = (time_t)thistid; + rpmMessage(RPMMESS_DEBUG, _("rollback %d packages to %s"), + packagesTotal, ctime(&tid)); + + conflicts = NULL; + numConflicts = 0; + rc = rpmdepCheck(ts, &conflicts, &numConflicts); + if (rc != 0) { + rpmMessage(RPMMESS_ERROR, _("failed dependencies:\n")); + printDepProblems(stderr, conflicts, numConflicts); + conflicts = rpmdepFreeConflicts(conflicts, numConflicts); + goto exit; + } - rtids = IDTXglob(ts, globstr, RPMTAG_REMOVETID); + rc = rpmdepOrder(ts); + if (rc != 0) + goto exit; + + probs = NULL; + rc = rpmRunTransactions(ts, rpmShowProgress, + (void *) ((long)ia->installInterfaceFlags), + NULL, &probs, ia->transFlags, + (ia->probFilter|RPMPROB_FILTER_OLDPACKAGE)); + if (rc > 0) { + rpmProblemSetPrint(stderr, probs); + if (probs != NULL) rpmProblemSetFree(probs); + probs = NULL; + goto exit; + } + + } while (1); +#endif + +exit: - globstr = _free(globstr); rtids = IDTXfree(rtids); itids = IDTXfree(itids); - return 0; + return rc; } @@ -6,12 +6,154 @@ #define UP2DATEGLOB "/var/spool/up2date/*.rpm" -static int doit = 1; +#ifdef DYING +static int XrpmRollback(struct rpmInstallArguments_s * ia, const char ** argv) +{ + rpmdb db = NULL; + rpmTransactionSet ts = NULL; + rpmProblemSet probs = NULL; + IDTX itids = NULL; + IDTX rtids = NULL; + unsigned thistid = 0xffffffff; + unsigned prevtid; + time_t tid; + IDT rp; + IDT ip; + int rc; + + if (argv != NULL && *argv != NULL) { + rc = -1; + goto exit; + } + + rc = rpmdbOpen(ia->rootdir, &db, O_RDWR, 0644); + if (rc != 0) + goto exit; + + itids = IDTXload(db, RPMTAG_INSTALLTID); + ip = (itids != NULL && itids->nidt > 0) ? itids->idt : NULL; + + { const char * globstr = rpmExpand("%{_repackage_dir}/*.rpm", NULL); + if (globstr == NULL || *globstr == '%') { + globstr = _free(globstr); + rc = -1; + goto exit; + } + rtids = IDTXglob(globstr, RPMTAG_REMOVETID); + rp = (rtids != NULL && rtids->nidt > 0) ? rtids->idt : NULL; + globstr = _free(globstr); + } + + /* Run transactions until rollback goal is achieved. */ + do { + prevtid = thistid; + rc = 0; + packagesTotal = 0; + + /* Find larger of the remaining install/erase transaction id's. */ + thistid = 0; + if (ip != NULL && ip->val.u32 > thistid) + thistid = ip->val.u32; + if (rp != NULL && rp->val.u32 > thistid) + thistid = rp->val.u32; + + /* If we've achieved the rollback goal, then we're done. */ + if (thistid == 0 || thistid < ia->rbtid) + break; + + ts = rpmtransCreateSet(db, ia->rootdir); + + /* Install the previously erased packages for this transaction. */ + while (rp != NULL && rp->val.u32 == thistid) { + + rpmMessage(RPMMESS_DEBUG, "\t+++ %s\n", rp->key); + + rc = rpmtransAddPackage(ts, rp->h, NULL, rp->key, + (ia->installInterfaceFlags & INSTALL_UPGRADE) != 0, + ia->relocations); + if (rc != 0) + goto exit; + + packagesTotal++; + + rp->h = headerFree(rp->h); + rtids->nidt--; + if (rtids->nidt > 0) + rp++; + else + rp = NULL; + } + + /* Erase the previously installed packages for this transaction. */ + while (ip != NULL && ip->val.u32 == thistid) { + + rpmMessage(RPMMESS_DEBUG, + "\t--- rpmdb instance #%u\n", ip->instance); + + rc = rpmtransRemovePackage(ts, ip->instance); + if (rc != 0) + goto exit; + + packagesTotal++; + + ip->instance = 0; + itids->nidt--; + if (itids->nidt > 0) + ip++; + else + ip = NULL; + } + + /* Anything to do? */ + if (packagesTotal <= 0) + break; + + tid = (time_t)thistid; + rpmMessage(RPMMESS_DEBUG, _("rollback %d packages to %s"), + packagesTotal, ctime(&tid)); + + rc = rpmdepOrder(ts); + if (rc != 0) + goto exit; + + probs = NULL; + rc = rpmRunTransactions(ts, rpmShowProgress, + (void *) ((long)ia->installInterfaceFlags), + NULL, &probs, ia->transFlags, + (ia->probFilter|RPMPROB_FILTER_OLDPACKAGE)); + if (rc > 0) { + rpmProblemSetPrint(stderr, probs); + goto exit; + } + + if (probs != NULL) { + rpmProblemSetFree(probs); + probs = NULL; + } + ts = rpmtransFree(ts); + + } while (1); + +exit: + if (probs != NULL) { + rpmProblemSetFree(probs); + probs = NULL; + } + ts = rpmtransFree(ts); + + if (db != NULL) (void) rpmdbClose(db); + + rtids = IDTXfree(rtids); + itids = IDTXfree(itids); + + return rc; +} +#endif static struct poptOption optionsTable[] = { { "verbose", 'v', 0, 0, 'v', N_("provide more detailed output"), NULL}, - { NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmInstallPoptTable, 0, + { NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmInstallPoptTable, 0, N_("Install/Upgrade/Erase options:"), NULL }, POPT_AUTOHELP @@ -26,15 +168,6 @@ main(int argc, const char *argv[]) int arg; int ec = 0; -time_t tid; - rpmProblemSet probs = NULL; - rpmTransactionSet ts = NULL; - const char * globstr = UP2DATEGLOB; - IDTX itids = NULL; - IDTX rtids = NULL; - int rc; - int i; - #if HAVE_MCHECK_H && HAVE_MTRACE mtrace(); /* Trace malloc only if MALLOC_TRACE=mtrace-output-file. */ #endif @@ -43,9 +176,6 @@ time_t tid; /* set up the correct locale */ (void) setlocale(LC_ALL, "" ); -#ifdef __LCLINT__ -#define LOCALEDIR "/usr/share/locale" -#endif bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); @@ -66,70 +196,15 @@ time_t tid; } } - if (rpmReadConfigFiles(NULL, NULL)) - exit(1); - - ts = rpmtransCreateSet(NULL, NULL); - if (rpmtsOpenDB(ts, O_RDWR)) + if (ia->rbtid == 0) { + fprintf(stderr, "--rollback <timestamp> is required\n"); exit(1); - - itids = IDTXload(ts, RPMTAG_INSTALLTID); - rtids = IDTXglob(globstr, RPMTAG_REMOVETID); - - packagesTotal = 0; - - if (rtids != NULL && rtids->nidt > 0) - for (i = 0; i < rtids->nidt; i++) { - IDT idt = rtids->idt + i; - -fprintf(stderr, "*** rbtid %d rtid %d\n", ia->rbtid, idt->val.i32); - if (ia->rbtid != 0 && idt->val.i32 < ia->rbtid) break; - -tid = idt->val.i32; -fprintf(stderr, "\t+++ %s: %s", idt->key, ctime(&tid)); - - rc = rpmtransAddPackage(ts, idt->h, idt->key, - (ia->installInterfaceFlags & INSTALL_UPGRADE) != 0, - ia->relocations); - - packagesTotal++; - - idt->h = headerFree(idt->h, "idt->h free"); } - if (itids != NULL && itids->nidt > 0) - for (i = 0; i < itids->nidt; i++) { - IDT idt = itids->idt + i; - -fprintf(stderr, "*** rbtid %d itid %d\n", ia->rbtid, idt->val.i32); - if (ia->rbtid != 0 && idt->val.i32 < ia->rbtid) break; - -tid = idt->val.i32; -fprintf(stderr, "\t--- rpmdb instance #%u: %s", idt->instance, ctime(&tid)); - - rc = rpmtransRemovePackage(ts, idt->h, idt->instance); - - packagesTotal++; - - } - - rc = rpmdepOrder(ts); - if (rc) - doit = 0; - - probs = NULL; -rc = 0; -if (doit) - rc = rpmRunTransactions(ts, rpmShowProgress, - (void *) ((long)ia->installInterfaceFlags), - NULL, &probs, ia->transFlags, ia->probFilter); - if (rc > 0) - rpmProblemSetPrint(stderr, probs); - if (probs != NULL) rpmProblemSetFree(probs); + if (rpmReadConfigFiles(NULL, NULL)) + exit(1); - itids = IDTXfree(itids); - rtids = IDTXfree(rtids); - ts = rpmtransFree(ts); + ec = rpmRollback(ia, NULL); optCon = poptFreeContext(optCon); rpmFreeMacros(NULL); diff --git a/po/rpm.pot b/po/rpm.pot index 908ae5159..1aed4d483 100644 --- a/po/rpm.pot +++ b/po/rpm.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2002-01-27 11:31-0500\n" +"POT-Creation-Date: 2002-01-28 10:46-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -118,7 +118,7 @@ msgstr "" msgid "use <dir> as the top level directory" msgstr "" -#: lib/poptI.c:200 rpmqv.c:126 +#: lib/poptI.c:210 rpmqv.c:126 msgid "<dir>" msgstr "" @@ -405,7 +405,7 @@ msgid "no tar files given for build" msgstr "" #: rpmqv.c:1036 -msgid "no packages given for uninstall" +msgid "no packages given for erase" msgstr "" #: rpmqv.c:1047 @@ -1621,207 +1621,211 @@ msgstr "" msgid "%s: Fread failed: %s\n" msgstr "" -#: lib/poptI.c:47 +#: lib/poptI.c:53 msgid "exclude paths must begin with a /" msgstr "" -#: lib/poptI.c:59 +#: lib/poptI.c:65 msgid "relocations must begin with a /" msgstr "" -#: lib/poptI.c:61 +#: lib/poptI.c:67 msgid "relocations must contain a =" msgstr "" -#: lib/poptI.c:64 +#: lib/poptI.c:70 msgid "relocations must have a / following the =" msgstr "" -#: lib/poptI.c:81 -msgid "malformed rollback time" +#: lib/poptI.c:84 +msgid "rollback takes a time/date stamp argument" msgstr "" -#: lib/poptI.c:100 +#: lib/poptI.c:91 +msgid "malformed rollback time/date stamp argument" +msgstr "" + +#: lib/poptI.c:110 msgid "install all files, even configurations which might otherwise be skipped" msgstr "" -#: lib/poptI.c:104 +#: lib/poptI.c:114 msgid "" "remove all packages which match <package> (normally an error is generated if " "<package> specified multiple packages)" msgstr "" -#: lib/poptI.c:110 lib/poptI.c:161 +#: lib/poptI.c:120 lib/poptI.c:171 msgid "do not execute package scriptlet(s)" msgstr "" -#: lib/poptI.c:114 +#: lib/poptI.c:124 msgid "relocate files in non-relocateable package" msgstr "" -#: lib/poptI.c:117 +#: lib/poptI.c:127 msgid "save erased package files by renaming into sub-directory" msgstr "" -#: lib/poptI.c:120 +#: lib/poptI.c:130 msgid "erase (uninstall) package" msgstr "" -#: lib/poptI.c:120 +#: lib/poptI.c:130 msgid "<package>+" msgstr "" -#: lib/poptI.c:123 +#: lib/poptI.c:133 msgid "do not install documentation" msgstr "" -#: lib/poptI.c:125 +#: lib/poptI.c:135 msgid "skip files with leading component <path> " msgstr "" -#: lib/poptI.c:126 +#: lib/poptI.c:136 msgid "<path>" msgstr "" -#: lib/poptI.c:129 +#: lib/poptI.c:139 msgid "short hand for --replacepkgs --replacefiles" msgstr "" -#: lib/poptI.c:132 +#: lib/poptI.c:142 msgid "upgrade package(s) if already installed" msgstr "" -#: lib/poptI.c:133 lib/poptI.c:149 lib/poptI.c:221 +#: lib/poptI.c:143 lib/poptI.c:159 lib/poptI.c:231 msgid "<packagefile>+" msgstr "" -#: lib/poptI.c:135 +#: lib/poptI.c:145 msgid "print hash marks as package installs (good with -v)" msgstr "" -#: lib/poptI.c:138 +#: lib/poptI.c:148 msgid "don't verify package architecture" msgstr "" -#: lib/poptI.c:141 +#: lib/poptI.c:151 msgid "don't verify package operating system" msgstr "" -#: lib/poptI.c:144 +#: lib/poptI.c:154 msgid "don't check disk space before installing" msgstr "" -#: lib/poptI.c:146 +#: lib/poptI.c:156 msgid "install documentation" msgstr "" -#: lib/poptI.c:149 +#: lib/poptI.c:159 msgid "install package" msgstr "" -#: lib/poptI.c:151 +#: lib/poptI.c:161 msgid "update the database, but do not modify the filesystem" msgstr "" -#: lib/poptI.c:153 +#: lib/poptI.c:163 msgid "do not verify package dependencies" msgstr "" -#: lib/poptI.c:156 +#: lib/poptI.c:166 msgid "do not reorder package installation to satisfy dependencies" msgstr "" -#: lib/poptI.c:164 +#: lib/poptI.c:174 #, c-format msgid "do not execute %%pre scriptlet (if any)" msgstr "" -#: lib/poptI.c:167 +#: lib/poptI.c:177 #, c-format msgid "do not execute %%post scriptlet (if any)" msgstr "" -#: lib/poptI.c:170 +#: lib/poptI.c:180 #, c-format msgid "do not execute %%preun scriptlet (if any)" msgstr "" -#: lib/poptI.c:173 +#: lib/poptI.c:183 #, c-format msgid "do not execute %%postun scriptlet (if any)" msgstr "" -#: lib/poptI.c:177 +#: lib/poptI.c:187 msgid "do not execute any scriptlet(s) triggered by this package" msgstr "" -#: lib/poptI.c:180 +#: lib/poptI.c:190 #, c-format msgid "do not execute any %%triggerprein scriptlet(s)" msgstr "" -#: lib/poptI.c:183 +#: lib/poptI.c:193 #, c-format msgid "do not execute any %%triggerin scriptlet(s)" msgstr "" -#: lib/poptI.c:186 +#: lib/poptI.c:196 #, c-format msgid "do not execute any %%triggerun scriptlet(s)" msgstr "" -#: lib/poptI.c:189 +#: lib/poptI.c:199 #, c-format msgid "do not execute any %%triggerpostun scriptlet(s)" msgstr "" -#: lib/poptI.c:193 +#: lib/poptI.c:203 msgid "" "upgrade to an old version of the package (--force on upgrades does this " "automatically)" msgstr "" -#: lib/poptI.c:197 +#: lib/poptI.c:207 msgid "print percentages as package installs" msgstr "" -#: lib/poptI.c:199 +#: lib/poptI.c:209 msgid "relocate the package to <dir>, if relocatable" msgstr "" -#: lib/poptI.c:202 +#: lib/poptI.c:212 msgid "relocate files from path <old> to <new>" msgstr "" -#: lib/poptI.c:203 +#: lib/poptI.c:213 msgid "<old>=<new>" msgstr "" -#: lib/poptI.c:206 +#: lib/poptI.c:216 msgid "save erased package files by repackaging" msgstr "" -#: lib/poptI.c:209 +#: lib/poptI.c:219 msgid "install even if the package replaces installed files" msgstr "" -#: lib/poptI.c:212 +#: lib/poptI.c:222 msgid "reinstall if the package is already present" msgstr "" -#: lib/poptI.c:214 -msgid "deinstall new package(s), reinstall old package(s), back to date" +#: lib/poptI.c:224 +msgid "deinstall new, reinstall old, package(s), back to <date>" msgstr "" -#: lib/poptI.c:215 +#: lib/poptI.c:225 msgid "<date>" msgstr "" -#: lib/poptI.c:217 +#: lib/poptI.c:227 msgid "don't install, but tell if it would work or not" msgstr "" -#: lib/poptI.c:220 +#: lib/poptI.c:230 msgid "upgrade package(s)" msgstr "" @@ -2422,7 +2426,7 @@ msgstr "" msgid "found %d source and %d binary packages\n" msgstr "" -#: lib/rpminstall.c:521 +#: lib/rpminstall.c:521 lib/rpminstall.c:1029 msgid "failed dependencies:\n" msgstr "" @@ -2454,6 +2458,11 @@ msgstr "" msgid "Installing %s\n" msgstr "" +#: lib/rpminstall.c:1022 +#, c-format +msgid "rollback %d packages to %s" +msgstr "" + #: lib/rpmlead.c:50 #, c-format msgid "read failed: %s (%d)\n" @@ -2997,109 +3006,109 @@ msgstr "" msgid "error(%d) counting packages\n" msgstr "" -#: rpmdb/rpmdb.c:2096 rpmdb/rpmdb.c:3349 +#: rpmdb/rpmdb.c:2097 rpmdb/rpmdb.c:3350 #, c-format msgid "record number %u in database is bad -- skipping.\n" msgstr "" -#: rpmdb/rpmdb.c:2149 +#: rpmdb/rpmdb.c:2150 #, c-format msgid "rpmdb: damaged header instance #%u retrieved, skipping.\n" msgstr "" -#: rpmdb/rpmdb.c:2419 +#: rpmdb/rpmdb.c:2420 #, c-format msgid "%s: cannot read header at 0x%x\n" msgstr "" -#: rpmdb/rpmdb.c:2491 +#: rpmdb/rpmdb.c:2492 #, c-format msgid "removing \"%s\" from %s index.\n" msgstr "" -#: rpmdb/rpmdb.c:2500 +#: rpmdb/rpmdb.c:2501 #, c-format msgid "removing %d entries from %s index.\n" msgstr "" -#: rpmdb/rpmdb.c:2701 +#: rpmdb/rpmdb.c:2702 #, c-format msgid "error(%d) allocating new package instance\n" msgstr "" -#: rpmdb/rpmdb.c:2782 +#: rpmdb/rpmdb.c:2783 #, c-format msgid "adding \"%s\" to %s index.\n" msgstr "" -#: rpmdb/rpmdb.c:2793 +#: rpmdb/rpmdb.c:2794 #, c-format msgid "adding %d entries to %s index.\n" msgstr "" -#: rpmdb/rpmdb.c:3235 +#: rpmdb/rpmdb.c:3236 #, c-format msgid "removing %s after successful db3 rebuild.\n" msgstr "" -#: rpmdb/rpmdb.c:3268 +#: rpmdb/rpmdb.c:3269 msgid "no dbpath has been set" msgstr "" -#: rpmdb/rpmdb.c:3295 +#: rpmdb/rpmdb.c:3296 #, c-format msgid "rebuilding database %s into %s\n" msgstr "" -#: rpmdb/rpmdb.c:3299 +#: rpmdb/rpmdb.c:3300 #, c-format msgid "temporary database %s already exists\n" msgstr "" -#: rpmdb/rpmdb.c:3305 +#: rpmdb/rpmdb.c:3306 #, c-format msgid "creating directory %s\n" msgstr "" -#: rpmdb/rpmdb.c:3307 +#: rpmdb/rpmdb.c:3308 #, c-format msgid "creating directory %s: %s\n" msgstr "" -#: rpmdb/rpmdb.c:3314 +#: rpmdb/rpmdb.c:3315 #, c-format msgid "opening old database with dbapi %d\n" msgstr "" -#: rpmdb/rpmdb.c:3325 +#: rpmdb/rpmdb.c:3326 #, c-format msgid "opening new database with dbapi %d\n" msgstr "" -#: rpmdb/rpmdb.c:3389 +#: rpmdb/rpmdb.c:3390 #, c-format msgid "cannot add record originally at %u\n" msgstr "" -#: rpmdb/rpmdb.c:3407 +#: rpmdb/rpmdb.c:3408 msgid "failed to rebuild database: original database remains in place\n" msgstr "" -#: rpmdb/rpmdb.c:3415 +#: rpmdb/rpmdb.c:3416 msgid "failed to replace old database with new database!\n" msgstr "" -#: rpmdb/rpmdb.c:3417 +#: rpmdb/rpmdb.c:3418 #, c-format msgid "replace files in %s with files from %s to recover" msgstr "" -#: rpmdb/rpmdb.c:3427 +#: rpmdb/rpmdb.c:3428 #, c-format msgid "removing directory %s\n" msgstr "" -#: rpmdb/rpmdb.c:3429 +#: rpmdb/rpmdb.c:3430 #, c-format msgid "failed to remove directory %s: %s\n" msgstr "" diff --git a/rpmdb/rpmdb.c b/rpmdb/rpmdb.c index 139215d7b..d3671c0d6 100644 --- a/rpmdb/rpmdb.c +++ b/rpmdb/rpmdb.c @@ -1545,7 +1545,8 @@ static int dbiUpdateRecord(dbiIndex dbi, DBC * dbcursor, int offset, Header h) xx = dbiSync(dbi, 0); (void) unblockSignals(dbi->dbi_rpmdb, &signalMask); uh = _free(uh); - } + } else +fprintf(stderr, "*** dbiUpdateRecord: uh is NULL\n"); return rc; } @@ -2631,9 +2632,9 @@ int rpmdbAdd(rpmdb db, int iid, Header h) if (db == NULL) return 0; + xx = headerRemoveEntry(h, RPMTAG_REMOVETID); if (iid != 0 && iid != -1) { int_32 tid = iid; - xx = headerRemoveEntry(h, RPMTAG_REMOVETID); if (!headerIsEntry(h, RPMTAG_INSTALLTID)) xx = headerAddEntry(h, RPMTAG_INSTALLTID, RPM_INT32_TYPE, &tid, 1); } |