[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmodbc.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 25-Mar-2012 18:34:37 Branch: rpm-5_4 Handle: 2012032516343700 Modified files: (Branch: rpm-5_4) rpm/rpmio rpmodbc.c Log: - odbc: fix: always print odbc failures. Summary: RevisionChanges Path 1.1.2.15+1 -1 rpm/rpmio/rpmodbc.c patch -p0 '@@ .' Index: rpm/rpmio/rpmodbc.c $ cvs diff -u -r1.1.2.14 -r1.1.2.15 rpmodbc.c --- rpm/rpmio/rpmodbc.c 25 Mar 2012 00:36:53 - 1.1.2.14 +++ rpm/rpmio/rpmodbc.c 25 Mar 2012 16:34:37 - 1.1.2.15 @@ -105,7 +105,7 @@ /* XXF FIXME: add logic to set printit */ #define CHECK(_o, _t, _m, _rc) \ -Xchkodbc(_o, _t, _m, _rc, _odbc_debug, __FUNCTION__, __FILE__, __LINE__) +Xchkodbc(_o, _t, _m, _rc, 1, __FUNCTION__, __FILE__, __LINE__) #else #define CHECK(_o, _t, _m, _rc) (-1) #endif /* WITH_UNIXODBC */ @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm-5_4: rpm/rpmio/ todbc.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 25-Mar-2012 18:35:27 Branch: rpm-5_4 Handle: 2012032516352700 Modified files: (Branch: rpm-5_4) rpm/rpmio todbc.c Log: - odbc: change the default odbc URI's. Summary: RevisionChanges Path 1.1.2.13+2 -2 rpm/rpmio/todbc.c patch -p0 '@@ .' Index: rpm/rpmio/todbc.c $ cvs diff -u -r1.1.2.12 -r1.1.2.13 todbc.c --- rpm/rpmio/todbc.c 25 Mar 2012 00:36:53 - 1.1.2.12 +++ rpm/rpmio/todbc.c 25 Mar 2012 16:35:27 - 1.1.2.13 @@ -11,9 +11,9 @@ #include debug.h #if 0 -static char * _odbc_uri = mysql://luser:jasnl@localhost/test; +static char * _odbc_uri = mysql://luser:ja...@harwich.jbj.org/test; #else -static char * _odbc_uri = postgres://luser:jasnl@localhost/test; +static char * _odbc_uri = postgres://luser:ja...@harwich.jbj.org/test; #endif static int _odbc_flags = 0; @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm-5_4: rpm/ CHANGES rpm/rpmio/ Makefile.am set.c set.h
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 25-Mar-2012 18:37:25 Branch: rpm-5_4 Handle: 2012032516372400 Added files: (Branch: rpm-5_4) rpm/rpmio set.c set.h Modified files: (Branch: rpm-5_4) rpm CHANGES rpm/rpmio Makefile.am Log: - set: swipe the dependency set encoding from Alt. Summary: RevisionChanges Path 1.3501.2.233+1 -0 rpm/CHANGES 1.293.2.11 +1 -0 rpm/rpmio/Makefile.am 1.1.2.1 +1408 -0rpm/rpmio/set.c 1.1.2.1 +32 -0 rpm/rpmio/set.h patch -p0 '@@ .' Index: rpm/CHANGES $ cvs diff -u -r1.3501.2.232 -r1.3501.2.233 CHANGES --- rpm/CHANGES 22 Mar 2012 00:04:04 - 1.3501.2.232 +++ rpm/CHANGES 25 Mar 2012 16:37:24 - 1.3501.2.233 @@ -1,4 +1,5 @@ 5.4.7 - 5.4.8: +- jbj: set: swipe the dependency set encoding from Alt. - jbj: tests: dink with perl module load path to load from within tree. - jbj: tests: dink with python module load path to load from within tree. - jbj: tests: extend the unixodbc test case. @@ . patch -p0 '@@ .' Index: rpm/rpmio/Makefile.am $ cvs diff -u -r1.293.2.10 -r1.293.2.11 Makefile.am --- rpm/rpmio/Makefile.am 21 Mar 2012 19:08:20 - 1.293.2.10 +++ rpm/rpmio/Makefile.am 25 Mar 2012 16:37:24 - 1.293.2.11 @@ -11,6 +11,7 @@ fnmatch_loop.c getdate.y rpmcpio.c rpmcpio.h \ rpmgenbasedir.c rpmgenpkglist.c rpmgensrclist.c \ rpmjsio.msg rpmtar.c rpmtar.h \ + set.c set.h \ tdir.c tfts.c tget.c tgit.c tglob.c thkp.c thtml.c tinv.c tkey.c \ tmire.c todbc.c tput.c trpmio.c tsexp.c tsvn.c tsw.c lookup3.c tpw.c \ librpmio.vers testit.sh @@ . patch -p0 '@@ .' Index: rpm/rpmio/set.c $ cvs diff -u -r0 -r1.1.2.1 set.c --- /dev/null 2012-03-25 18:35:29.0 +0200 +++ set.c 2012-03-25 18:37:25.109854210 +0200 @@ -0,0 +1,1408 @@ +/* + * set.c - base62, golomb and set-string routines + * + * Copyright (C) 2010, 2011, 2012 Alexey Tourbin a...@altlinux.org + * + * License: GPLv2+ or LGPL, see RPM COPYING + */ + +#ifdef SELF_TEST +#undef NDEBUG +#include stdio.h +#endif + +#include string.h +#include stdlib.h +#include assert.h + +/* + * Base62 routines - encode bits with alnum characters. + * + * This is a base64-based base62 implementation. Values 0..61 are encoded + * with '0'..'9', 'a'..'z', and 'A'..'Z'. However, 'Z' is special: it will + * also encode 62 and 63. To achieve this, 'Z' will occupy two high bits in + * the next character. Thus 'Z' can be interpreted as an escape character + * (which indicates that the next character must be handled specially). + * Note that setting high bits to 00, 01 or 10 cannot contribute + * to another 'Z' (which would require high bits set to 11). This is + * how multiple escapes are avoided. + */ + +// Estimate base62 buffer size required to encode a given number of bits. +static inline +int encode_base62_size(int bitc) +{ +// In the worst case, which is ZxZxZx..., five bits can make a character; +// the remaining bits can make a character, too. And the string must be +// null-terminated. +return bitc / 5 + 2; +} + +// Main base62 encoding routine: pack bitv into base62 string. +static +int encode_base62(int bitc, const char *bitv, char *base62) +{ +char *base62_start = base62; +void put_digit(int c) +{ + assert(c = 0 c = 61); + if (c 10) + *base62++ = c + '0'; + else if (c 36) + *base62++ = c - 10 + 'a'; + else if (c 62) + *base62++ = c - 36 + 'A'; +} +int bits2 = 0; // number of high bits set +int bits6 = 0; // number of regular bits set +int num6b = 0; // pending 6-bit number +while (bitc-- 0) { + num6b |= (*bitv++ bits6++); + if (bits6 + bits2 6) + continue; + switch (num6b) { + case 61: + // escape + put_digit(61); + // extra 00 high bits (in the next character) + bits2 = 2; + bits6 = 0; + num6b = 0; + break; + case 62: + put_digit(61); + // extra 01 high bits +
[CVS] RPM: rpm-5_4: rpm/rpmio/ .cvsignore Makefile.am set.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 25-Mar-2012 18:55:11 Branch: rpm-5_4 Handle: 2012032516551100 Modified files: (Branch: rpm-5_4) rpm/rpmio .cvsignore Makefile.am set.c Log: - set: achieve SELF_TEST compilation. Summary: RevisionChanges Path 1.41.2.3+1 -0 rpm/rpmio/.cvsignore 1.293.2.12 +5 -1 rpm/rpmio/Makefile.am 1.1.2.2 +15 -22 rpm/rpmio/set.c patch -p0 '@@ .' Index: rpm/rpmio/.cvsignore $ cvs diff -u -r1.41.2.2 -r1.41.2.3 .cvsignore --- rpm/rpmio/.cvsignore 17 Mar 2012 19:25:03 - 1.41.2.2 +++ rpm/rpmio/.cvsignore 25 Mar 2012 16:55:11 - 1.41.2.3 @@ -54,6 +54,7 @@ tring trpmio truby +tset tsexp tsvn tsw @@ . patch -p0 '@@ .' Index: rpm/rpmio/Makefile.am $ cvs diff -u -r1.293.2.11 -r1.293.2.12 Makefile.am --- rpm/rpmio/Makefile.am 25 Mar 2012 16:37:24 - 1.293.2.11 +++ rpm/rpmio/Makefile.am 25 Mar 2012 16:55:11 - 1.293.2.12 @@ -20,7 +20,7 @@ rpmgenbasedir rpmgenpkglist rpmgensrclist rpmgpg \ rpmpbzip2 rpmpigz rpmtar rpmz \ tasn tdir tfts tget tglob thkp thtml tinv tkey tmacro tmagic \ - tmire todbc tperl tpython tput tpw trpmio tsexp tsvn tsw ttcl \ + tmire todbc tperl tpython tput tpw trpmio tset tsexp tsvn tsw ttcl \ dumpasn1 lookup3 noinst_PROGRAMS = @@ -393,6 +393,10 @@ trpmio_SOURCES = trpmio.c trpmio_LDADD = $(RPMIO_LDADD_COMMON) +tset_SOURCES = set.c +tset_CFLAGS = $(CFLAGS) -DSELF_TEST -Wmissing-field-initializers +tset_LDFLAGS = $(RPMIO_LDADD_COMMON) + tsexp_SOURCES = tsexp.c tsexp_LDFLAGS = $(RPMIO_LDADD_COMMON) @@ . patch -p0 '@@ .' Index: rpm/rpmio/set.c $ cvs diff -u -r1.1.2.1 -r1.1.2.2 set.c --- rpm/rpmio/set.c 25 Mar 2012 16:37:24 - 1.1.2.1 +++ rpm/rpmio/set.c 25 Mar 2012 16:55:11 - 1.1.2.2 @@ -6,14 +6,13 @@ * License: GPLv2+ or LGPL, see RPM COPYING */ -#ifdef SELF_TEST -#undef NDEBUG -#include stdio.h -#endif +#include system.h + +#include rpmiotypes.h +#define _SET_INTERNAL +#include set.h -#include string.h -#include stdlib.h -#include assert.h +#include debug.h /* * Base62 routines - encode bits with alnum characters. @@ -187,7 +186,7 @@ #ifdef SELF_TEST static -void test_base62() +void test_base62(void) { const char rnd_bitv[] = { 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, @@ -352,7 +351,7 @@ #ifdef SELF_TEST static -void test_golomb() +void test_golomb(void) { const unsigned rnd_v[] = { // do re mi fa sol la si @@ -417,7 +416,6 @@ }; // Combine two characters into array index (with respect to endianness). -#include sys/types.h #if BYTE_ORDER BYTE_ORDER == LITTLE_ENDIAN #define CCI(c1, c2) ((c1) | ((c2) 8)) #elif BYTE_ORDER BYTE_ORDER == BIG_ENDIAN @@ -707,7 +705,7 @@ #ifdef SELF_TEST static -void test_word_table() +void test_word_table(void) { int i, j; for (i = 0; i 256; i++) @@ -724,7 +722,7 @@ } static -void test_base62_golomb() +void test_base62_golomb(void) { const char str[] = set:hdf7q2P5VZwtLGr9TKxhrEM1; const char *base62 = str + 4 + 2; @@ -776,7 +774,7 @@ #ifdef SELF_TEST static -void test_delta() +void test_delta(void) { unsigned v[] = { 1, 3, 7, 0 @@ -1042,7 +1040,7 @@ #ifdef SELF_TEST static -void test_set() +void test_set(void) { unsigned rnd_v[] = { 0x020a, 0x07e5, 0x3305, 0x35f5, @@ -1086,8 +1084,6 @@ * API routines start here. */ -#include set.h - // main API routine int rpmsetcmp(const char *str1, const char *str2) { @@ -1231,9 +1227,6 @@ * Simple API for creating set-versions. */ -#include system.h -#include rpmlib.h - // Internally, struct set is just a bag of strings and their hash values. struct set { int c; @@ -1243,7 +1236,7 @@ } *sv; }; -struct set *set_new() +struct set *set_new(void) { struct set *set = xmalloc(sizeof *set); set-c = 0; @@ -1346,7 +1339,7 @@ #ifdef SELF_TEST static -void test_api() +void test_api(void) { struct set
[CVS] RPM: rpm-5_4: rpm/rpmio/ Makefile.am set.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 25-Mar-2012 19:07:40 Branch: rpm-5_4 Handle: 2012032517074000 Modified files: (Branch: rpm-5_4) rpm/rpmio Makefile.am set.c Log: - set: build tset always. Summary: RevisionChanges Path 1.293.2.13 +3 -3 rpm/rpmio/Makefile.am 1.1.2.3 +27 -1 rpm/rpmio/set.c patch -p0 '@@ .' Index: rpm/rpmio/Makefile.am $ cvs diff -u -r1.293.2.12 -r1.293.2.13 Makefile.am --- rpm/rpmio/Makefile.am 25 Mar 2012 16:55:11 - 1.293.2.12 +++ rpm/rpmio/Makefile.am 25 Mar 2012 17:07:40 - 1.293.2.13 @@ -20,10 +20,10 @@ rpmgenbasedir rpmgenpkglist rpmgensrclist rpmgpg \ rpmpbzip2 rpmpigz rpmtar rpmz \ tasn tdir tfts tget tglob thkp thtml tinv tkey tmacro tmagic \ - tmire todbc tperl tpython tput tpw trpmio tset tsexp tsvn tsw ttcl \ + tmire todbc tperl tpython tput tpw trpmio tsexp tsvn tsw ttcl \ dumpasn1 lookup3 -noinst_PROGRAMS = +noinst_PROGRAMS = tset if WITH_LIBGIT2 noinst_PROGRAMS += tgit else @@ -394,7 +394,7 @@ trpmio_LDADD = $(RPMIO_LDADD_COMMON) tset_SOURCES = set.c -tset_CFLAGS = $(CFLAGS) -DSELF_TEST -Wmissing-field-initializers +tset_CFLAGS = $(CFLAGS) -DSELF_TEST -Wno-override-init --std=c99 tset_LDFLAGS = $(RPMIO_LDADD_COMMON) tsexp_SOURCES = tsexp.c @@ . patch -p0 '@@ .' Index: rpm/rpmio/set.c $ cvs diff -u -r1.1.2.2 -r1.1.2.3 set.c --- rpm/rpmio/set.c 25 Mar 2012 16:55:11 - 1.1.2.2 +++ rpm/rpmio/set.c 25 Mar 2012 17:07:40 - 1.1.2.3 @@ -9,11 +9,19 @@ #include system.h #include rpmiotypes.h +#ifdef SELF_TEST +#include poptIO.h +#endif + #define _SET_INTERNAL #include set.h #include debug.h +int _rpmset_debug = -1; + +/*==*/ + /* * Base62 routines - encode bits with alnum characters. * @@ -1386,8 +1394,23 @@ #endif #ifdef SELF_TEST +/*==*/ +static struct poptOption rpmsetOptionsTable[] = { + { debug, 'd', POPT_ARG_VAL, _rpmset_debug, -1, NULL, NULL }, + + { NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmioAllPoptTable, 0, +N_(Common options for all rpmio executables:), NULL }, + + POPT_AUTOALIAS + POPT_AUTOHELP + POPT_TABLEEND +}; + int main(int argc, char *argv[]) { +poptContext con = rpmioInit(argc, argv, rpmsetOptionsTable); +int rc = 0; + test_base62(); test_golomb(); test_word_table(); @@ -1395,7 +1418,10 @@ test_delta(); test_set(); test_api(); -return 0; + +con = rpmioFini(con); +return rc; } #endif + // ex: set ts=8 sts=4 sw=4 noet: @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm-5_4: rpm/ CHANGES rpm/rpmio/ Makefile.am librpmio.vers ...
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 25-Mar-2012 20:13:40 Branch: rpm-5_4 Handle: 2012032518133801 Modified files: (Branch: rpm-5_4) rpm CHANGES rpm/rpmio Makefile.am librpmio.vers poptIO.c rpmio.c set.c set.h Log: - set: make the version-set into an rpmset object. Summary: RevisionChanges Path 1.3501.2.234+1 -0 rpm/CHANGES 1.293.2.14 +2 -3 rpm/rpmio/Makefile.am 2.199.2.16 +6 -0 rpm/rpmio/librpmio.vers 1.94.2.4+5 -1 rpm/rpmio/poptIO.c 1.230.2.6 +2 -0 rpm/rpmio/rpmio.c 1.1.2.4 +67 -55 rpm/rpmio/set.c 1.1.2.2 +86 -16 rpm/rpmio/set.h patch -p0 '@@ .' Index: rpm/CHANGES $ cvs diff -u -r1.3501.2.233 -r1.3501.2.234 CHANGES --- rpm/CHANGES 25 Mar 2012 16:37:24 - 1.3501.2.233 +++ rpm/CHANGES 25 Mar 2012 18:13:38 - 1.3501.2.234 @@ -1,4 +1,5 @@ 5.4.7 - 5.4.8: +- jbj: set: make the version-set into an rpmset object. - jbj: set: swipe the dependency set encoding from Alt. - jbj: tests: dink with perl module load path to load from within tree. - jbj: tests: dink with python module load path to load from within tree. @@ . patch -p0 '@@ .' Index: rpm/rpmio/Makefile.am $ cvs diff -u -r1.293.2.13 -r1.293.2.14 Makefile.am --- rpm/rpmio/Makefile.am 25 Mar 2012 17:07:40 - 1.293.2.13 +++ rpm/rpmio/Makefile.am 25 Mar 2012 18:13:39 - 1.293.2.14 @@ -11,7 +11,6 @@ fnmatch_loop.c getdate.y rpmcpio.c rpmcpio.h \ rpmgenbasedir.c rpmgenpkglist.c rpmgensrclist.c \ rpmjsio.msg rpmtar.c rpmtar.h \ - set.c set.h \ tdir.c tfts.c tget.c tgit.c tglob.c thkp.c thtml.c tinv.c tkey.c \ tmire.c todbc.c tput.c trpmio.c tsexp.c tsvn.c tsw.c lookup3.c tpw.c \ librpmio.vers testit.sh @@ -101,7 +100,7 @@ rpmodbc.h rpmperl.h rpmpython.h rpmruby.h rpmsm.h rpmsp.h \ rpmsq.h rpmsql.h rpmsquirrel.h rpmssl.h rpmsvn.h rpmsx.h rpmsyck.h \ rpmtcl.h rpmtpm.h rpmurl.h rpmuuid.h rpmxar.h rpmz.h rpmzq.h \ - tar.h ugid.h rpmio-stub.h + set.h tar.h ugid.h rpmio-stub.h usrlibdir = $(libdir) usrlib_LTLIBRARIES = librpmio.la @@ -120,7 +119,7 @@ rpmodbc.c rpmperl.c rpmpgp.c rpmpython.c rpmrpc.c rpmruby.c rpmsm.c rpmsp.c \ rpmsq.c rpmsql.c rpmsquirrel.c rpmssl.c rpmsvn.c rpmsw.c rpmsx.c \ rpmsyck.c rpmtcl.c rpmtpm.c rpmuuid.c rpmxar.c rpmzlog.c rpmzq.c \ - strcasecmp.c strtolocale.c tar.c url.c ugid.c xzdio.c yarn.c + set.c strcasecmp.c strtolocale.c tar.c url.c ugid.c xzdio.c yarn.c librpmio_la_LDFLAGS = -release $(LT_CURRENT).$(LT_REVISION) if HAVE_LD_VERSION_SCRIPT librpmio_la_LDFLAGS += -Wl,@LD_VERSION_SCRIPT_FLAG@,@top_srcdir@/rpmio/librpmio.vers @@ . patch -p0 '@@ .' Index: rpm/rpmio/librpmio.vers $ cvs diff -u -r2.199.2.15 -r2.199.2.16 librpmio.vers --- rpm/rpmio/librpmio.vers 25 Mar 2012 00:36:53 - 2.199.2.15 +++ rpm/rpmio/librpmio.vers 25 Mar 2012 18:13:39 - 2.199.2.16 @@ -601,6 +601,12 @@ rpmrubyNew; rpmrubyRun; rpmrubyRunFile; +_rpmsetPool; +_rpmset_debug; +rpmsetAdd; +rpmsetCmp; +rpmsetFinish; +rpmsetNew; _rpmsm_debug; _rpmsmI; rpmsmNew; @@ . patch -p0 '@@ .' Index: rpm/rpmio/poptIO.c $ cvs diff -u -r1.94.2.3 -r1.94.2.4 poptIO.c --- rpm/rpmio/poptIO.c18 Mar 2012 14:02:14 - 1.94.2.3 +++ rpm/rpmio/poptIO.c25 Mar 2012 18:13:39 - 1.94.2.4 @@ -54,6 +54,8 @@ #include rpmsp.h #include rpmsx.h +#include set.h + #include debug.h const char *__progname; @@ -636,7 +638,9 @@ { rpmcvsdebug, '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, _rpmcvs_debug, -1, N_(Debug CVS wrappers ), NULL}, { rpmgitdebug, '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, _rpmgit_debug, -1, - N_(Debug CVS wrappers ), NULL}, + N_(Debug GIT wrappers ), NULL}, + { rpmsetdebug, '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, _rpmset_debug, -1, + N_(Debug SET-VERSION wrappers ), NULL}, { rpmsvndebug, '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN,
[CVS] RPM: rpm-5_4: rpm/ CHANGES rpm/lib/ rpmds.c rpm/rpmdb/ hdrfmt.c ...
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 25-Mar-2012 20:54:31 Branch: rpm-5_4 Handle: 2012032518542901 Modified files: (Branch: rpm-5_4) rpm CHANGES rpm/lib rpmds.c rpm/rpmdb hdrfmt.c rpmevr.c Log: - set: stub-in a 1st attempt to do Alt version-set comparisons. Summary: RevisionChanges Path 1.3501.2.235+1 -0 rpm/CHANGES 2.170.2.13 +22 -0 rpm/lib/rpmds.c 1.151.2.8 +52 -0 rpm/rpmdb/hdrfmt.c 1.37.2.5+20 -2 rpm/rpmdb/rpmevr.c patch -p0 '@@ .' Index: rpm/CHANGES $ cvs diff -u -r1.3501.2.234 -r1.3501.2.235 CHANGES --- rpm/CHANGES 25 Mar 2012 18:13:38 - 1.3501.2.234 +++ rpm/CHANGES 25 Mar 2012 18:54:29 - 1.3501.2.235 @@ -1,4 +1,5 @@ 5.4.7 - 5.4.8: +- jbj: set: stub-in a 1st attempt to do Alt version-set comparisons. - jbj: set: make the version-set into an rpmset object. - jbj: set: swipe the dependency set encoding from Alt. - jbj: tests: dink with perl module load path to load from within tree. @@ . patch -p0 '@@ .' Index: rpm/lib/rpmds.c $ cvs diff -u -r2.170.2.12 -r2.170.2.13 rpmds.c --- rpm/lib/rpmds.c 20 Sep 2011 17:25:50 - 2.170.2.12 +++ rpm/lib/rpmds.c 25 Mar 2012 18:54:30 - 2.170.2.13 @@ -88,6 +88,7 @@ #include rpmcb.h /* XXX fnpyKey */ #include rpmmacro.h #include argv.h +#include set.h #include rpmtypes.h #include rpmtag.h @@ -1553,6 +1554,10 @@ (RPMSENSE_RPMLIB|RPMSENSE_EQUAL), N_(package payload can be compressed using xz.) }, #endif +/* XXX FIXME: Alt should _NOT_ have added a tracking dependency. */ +{ rpmlib(SetVersions), 4.0.4-alt98, +(RPMSENSE_RPMLIB|RPMSENSE_EQUAL), +N_(dependencies support set/subset versions.) }, { NULL, NULL, 0,NULL } }; @@ -4084,7 +4089,24 @@ #else if (a-F[ix] *a-F[ix] b-F[ix] *b-F[ix]) #endif + { + /* XXX ALT version-set comparison */ + if (ix == RPMEVR_V + !strncmp(a-F[ix], set:, sizeof(set:)-1) + !strncmp(b-F[ix], set:, sizeof(set:)-1)) + { + sense = rpmsetCmp(a-F[ix], b-F[ix]); + if (sense -1) { + if (sense == -3) + rpmlog(RPMLOG_WARNING, _(failed to decode %s\n), a-F[ix]); + if (sense == -4) + rpmlog(RPMLOG_WARNING, _(failed to decode %s\n), b-F[ix]); + /* neither is subset of each other */ + sense = 0; + } + } else /*@i@*/ sense = EVRcmp(a-F[ix], b-F[ix]); + } if (sense) break; } @@ . patch -p0 '@@ .' Index: rpm/rpmdb/hdrfmt.c $ cvs diff -u -r1.151.2.7 -r1.151.2.8 hdrfmt.c --- rpm/rpmdb/hdrfmt.c12 Sep 2011 14:26:23 - 1.151.2.7 +++ rpm/rpmdb/hdrfmt.c25 Mar 2012 18:54:30 - 1.151.2.8 @@ -1550,6 +1550,58 @@ return val; } +#ifdef NOTYET +static const char * bfstring(unsigned int x, const char * xbf) +{ +const char * s = xbf; +static char digits[] = 0123456789abcdefghijklmnopqrstuvwxyz; +static char buf[BUFSIZ]; +char * t, * te; +unsigned radix; +unsigned c, i, k; + +radix = (s != NULL ? *s++ : 16); + +if (radix = 1 || radix = 32) + radix = 16; + +t = buf; +switch (radix) { +case 8: *t++ = '0'; break; +case 16: *t++ = '0'; *t++ = 'x'; break; +} + +i = 0; +k = x; +do { i++; k /= radix; } while (k); + +te = t + i; + +k = x; +do { --i; t[i] = digits[k % radix]; k /= radix; } while (k); + +t = te; +i = ''; +if (s != NULL) +while ((c = *s++) != '\0') { + if (c ' ') continue; + + k = (1 (c - 1)); + if (!(x k)) continue; + + if (t == te) *t++ = '='; + + *t++ = i; + i = ','; + while (*s ' ') + *t++ = *s++; +} +if (t te) *t++ = ''; +*t = '\0'; +return buf; +} +#endif + /** * Retrieve install prefixes. * @param h header @@ . patch -p0 '@@ .' Index: rpm/rpmdb/rpmevr.c
[CVS] RPM: rpm-5_4: rpm/tests/ref/ alt-minimal.x86_64.manifest
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 25-Mar-2012 21:17:51 Branch: rpm-5_4 Handle: 2012032519175000 Added files: (Branch: rpm-5_4) rpm/tests/ref alt-minimal.x86_64.manifest Log: - tests: add a proof-of-concept snapshot for Sisyphus. Summary: RevisionChanges Path 1.1.2.1 +28 -0 rpm/tests/ref/alt-minimal.x86_64.manifest patch -p0 '@@ .' Index: rpm/tests/ref/alt-minimal.x86_64.manifest $ cvs diff -u -r0 -r1.1.2.1 alt-minimal.x86_64.manifest --- /dev/null 2012-03-25 21:15:28.0 +0200 +++ alt-minimal.x86_64.manifest 2012-03-25 21:17:50.985155934 +0200 @@ -0,0 +1,28 @@ +http://ftp.linux.kiev.ua/pub/Linux/ALT/Sisyphus/noarch/RPMS.classic/alt-gpgkeys-0.7.50-alt1.noarch.rpm +http://ftp.linux.kiev.ua/pub/Linux/ALT/Sisyphus/noarch/RPMS.classic/setup-2.2.14-alt1.noarch.rpm +http://ftp.linux.kiev.ua/pub/Linux/ALT/Sisyphus/x86_64/RPMS.classic/filesystem-2.3.10-alt1.x86_64.rpm +http://ftp.linux.kiev.ua/pub/Linux/ALT/Sisyphus/x86_64/RPMS.classic/glibc-preinstall-2.11.3-alt7.x86_64.rpm +http://ftp.linux.kiev.ua/pub/Linux/ALT/Sisyphus/x86_64/RPMS.classic/glibc-core-2.11.3-alt7.x86_64.rpm +http://ftp.linux.kiev.ua/pub/Linux/ALT/Sisyphus/x86_64/RPMS.classic/bzlib-1.0.6-alt3.x86_64.rpm +http://ftp.linux.kiev.ua/pub/Linux/ALT/Sisyphus/x86_64/RPMS.classic/libattr-2.4.46-alt1.x86_64.rpm +http://ftp.linux.kiev.ua/pub/Linux/ALT/Sisyphus/x86_64/RPMS.classic/libacl-2.2.51-alt1.x86_64.rpm +http://ftp.linux.kiev.ua/pub/Linux/ALT/Sisyphus/x86_64/RPMS.classic/libcap-2.16-alt4.x86_64.rpm +http://ftp.linux.kiev.ua/pub/Linux/ALT/Sisyphus/x86_64/RPMS.classic/libgmp-4.3.2-alt3.x86_64.rpm +http://ftp.linux.kiev.ua/pub/Linux/ALT/Sisyphus/x86_64/RPMS.classic/libgcc1-4.5.3-alt1.x86_64.rpm +http://ftp.linux.kiev.ua/pub/Linux/ALT/Sisyphus/x86_64/RPMS.classic/glibc-pthread-2.11.3-alt7.x86_64.rpm +http://ftp.linux.kiev.ua/pub/Linux/ALT/Sisyphus/x86_64/RPMS.classic/sh-3.2.51-alt1.x86_64.rpm +http://ftp.linux.kiev.ua/pub/Linux/ALT/Sisyphus/x86_64/RPMS.classic/libselinux-2.0.98-alt2.1.x86_64.rpm +http://ftp.linux.kiev.ua/pub/Linux/ALT/Sisyphus/x86_64/RPMS.classic/terminfo-5.7-alt6.x86_64.rpm +http://ftp.linux.kiev.ua/pub/Linux/ALT/Sisyphus/x86_64/RPMS.classic/libtinfo-5.7-alt6.x86_64.rpm +http://ftp.linux.kiev.ua/pub/Linux/ALT/Sisyphus/x86_64/RPMS.classic/coreutils-8.15-alt1.x86_64.rpm +http://ftp.linux.kiev.ua/pub/Linux/ALT/Sisyphus/x86_64/RPMS.classic/getopt-2.20.1-alt1.x86_64.rpm +http://ftp.linux.kiev.ua/pub/Linux/ALT/Sisyphus/x86_64/RPMS.classic/fakeroot-1.12.2-alt1.x86_64.rpm +http://ftp.linux.kiev.ua/pub/Linux/ALT/Sisyphus/x86_64/RPMS.classic/libbeecrypt7-4.2.1-alt7.x86_64.rpm +http://ftp.linux.kiev.ua/pub/Linux/ALT/Sisyphus/x86_64/RPMS.classic/libdb4.7-4.7.25-alt7.x86_64.rpm +http://ftp.linux.kiev.ua/pub/Linux/ALT/Sisyphus/x86_64/RPMS.classic/libelf-0.152-alt1.x86_64.rpm +http://ftp.linux.kiev.ua/pub/Linux/ALT/Sisyphus/x86_64/RPMS.classic/liblzma-5.0.3-alt1.x86_64.rpm +http://ftp.linux.kiev.ua/pub/Linux/ALT/Sisyphus/x86_64/RPMS.classic/libpopt-1.14-alt6.x86_64.rpm +http://ftp.linux.kiev.ua/pub/Linux/ALT/Sisyphus/x86_64/RPMS.classic/zlib-1.2.5-alt3.x86_64.rpm +http://ftp.linux.kiev.ua/pub/Linux/ALT/Sisyphus/x86_64/RPMS.classic/librpm-4.0.4-alt100.48.x86_64.rpm +http://ftp.linux.kiev.ua/pub/Linux/ALT/Sisyphus/x86_64/RPMS.classic/librpmbuild-4.0.4-alt100.48.x86_64.rpm +http://ftp.linux.kiev.ua/pub/Linux/ALT/Sisyphus/x86_64/RPMS.classic/rpm-4.0.4-alt100.48.x86_64.rpm @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm-5_4: rpm/ configure.ac
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 25-Mar-2012 22:27:40 Branch: rpm-5_4 Handle: 2012032520273900 Modified files: (Branch: rpm-5_4) rpm configure.ac Log: - set: orphan check-in. Summary: RevisionChanges Path 2.472.2.57 +2 -0 rpm/configure.ac patch -p0 '@@ .' Index: rpm/configure.ac $ cvs diff -u -r2.472.2.56 -r2.472.2.57 configure.ac --- rpm/configure.ac 22 Mar 2012 00:41:40 - 2.472.2.56 +++ rpm/configure.ac 25 Mar 2012 20:27:39 - 2.472.2.57 @@ -158,6 +158,8 @@ CFLAGS=$CFLAGS -Wall -W -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -Wno-unused-parameter -Wformat-security # XXX gcc-4.2 on Mac OS X hasn't #CFLAGS=$CFLAGS -Wno-unused-but-set-variable +# XXX rpmio/set.c needs this +CFLAGS=$CFLAGS -Wno-override-init elif test .`$CC -V 21 | grep 'Sun C'` != .; then dnl # Sun Studio (usually cc) CFLAGS=$CFLAGS -v @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm-5_4: rpm/rpmio/ set.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 25-Mar-2012 23:20:42 Branch: rpm-5_4 Handle: 2012032521204200 Modified files: (Branch: rpm-5_4) rpm/rpmio set.c Log: - set: fix: include pool prototypes. Summary: RevisionChanges Path 1.1.2.5 +194 -138 rpm/rpmio/set.c patch -p0 '@@ .' Index: rpm/rpmio/set.c $ cvs diff -u -r1.1.2.4 -r1.1.2.5 set.c --- rpm/rpmio/set.c 25 Mar 2012 18:13:39 - 1.1.2.4 +++ rpm/rpmio/set.c 25 Mar 2012 21:20:42 - 1.1.2.5 @@ -10,7 +10,7 @@ #include system.h -#include rpmiotypes.h +#include rpmio.h #ifdef SELF_TEST #include poptIO.h #endif @@ -37,17 +37,19 @@ * how multiple escapes are avoided. */ -// Estimate base62 buffer size required to encode a given number of bits. +/* Estimate base62 buffer size required to encode a given number of bits. */ static inline int encode_base62_size(int bitc) { -// In the worst case, which is ZxZxZx..., five bits can make a character; -// the remaining bits can make a character, too. And the string must be -// null-terminated. +/* + * In the worst case, which is ZxZxZx..., five bits can make a character; + * the remaining bits can make a character, too. And the string must be + * null-terminated. + */ return bitc / 5 + 2; } -// Main base62 encoding routine: pack bitv into base62 string. +/* Main base62 encoding routine: pack bitv into base62 string. */ static int encode_base62(int bitc, const char *bitv, char *base62) { @@ -62,32 +64,32 @@ else if (c 62) *base62++ = c - 36 + 'A'; } -int bits2 = 0; // number of high bits set -int bits6 = 0; // number of regular bits set -int num6b = 0; // pending 6-bit number +int bits2 = 0; /* number of high bits set */ +int bits6 = 0; /* number of regular bits set */ +int num6b = 0; /* pending 6-bit number */ while (bitc-- 0) { num6b |= (*bitv++ bits6++); if (bits6 + bits2 6) continue; switch (num6b) { case 61: - // escape + /* escape */ put_digit(61); - // extra 00 high bits (in the next character) + /* extra 00 high bits (in the next character) */ bits2 = 2; bits6 = 0; num6b = 0; break; case 62: put_digit(61); - // extra 01 high bits + /* extra 01 high bits */ bits2 = 2; bits6 = 0; num6b = 16; break; case 63: put_digit(61); - // extra 10 high bits + /* extra 10 high bits */ bits2 = 2; bits6 = 0; num6b = 32; @@ -109,15 +111,15 @@ return base62 - base62_start; } -// Estimate how many bits will result from decoding a base62 string. +/* Estimate how many bits will result from decoding a base62 string. */ static inline int decode_base62_size(int len) { -// Each character will fill at most 6 bits. +/* Each character will fill at most 6 bits. */ return len * 6; } -// This table maps alnum characters to their numeric values. +/* This table maps alnum characters to their numeric values. */ static const int char_to_num[256] = { [0 ... 255] = 0xee, @@ -132,7 +134,7 @@ C26('A', 'A' + 36), }; -// Main base62 decoding routine: unpack base62 string into bitv[]. +/* Main base62 decoding routine: unpack base62 string into bitv[]. */ static int decode_base62(const char *base62, char *bitv) { @@ -203,26 +205,26 @@ 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, - // trigger some 'Z' + /* trigger some 'Z' */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }; const int rnd_bitc = sizeof rnd_bitv; -// encode +/* encode */ char base62[encode_base62_size(rnd_bitc)]; int len = encode_base62(rnd_bitc, rnd_bitv, base62); assert(len 0); assert(len == (int)strlen(base62)); fprintf(stderr, len=%d base62=%s\n, len, base62); -// The length cannot be shorter than 6 bits per symbol. +/* The length cannot be shorter than 6 bits per symbol. */ assert(len =