Re: noarch sub-packages

2008-06-15 Thread Alexey Tourbin
On Mon, Jun 16, 2008 at 01:20:31AM -0400, Jeff Johnson wrote: Certainly they really work (unless I missed pushing some patch to rpm-5.1.3): It looks like you cannot specify BuildArch: %_target_cpu in toplevel package. pgphiIGn556c8.pgp Description: PGP signature

Re: RPM: rpm/ CHANGES rpm/build/ files.c

2008-06-16 Thread Alexey Tourbin
On Mon, Jun 16, 2008 at 04:38:03AM -0400, Jeff Johnson wrote: Alexey: This is your patch reworked slightly. See what you think. + if (S_ISREG(flp-fl_mode)) { + int bingo = 1; + /* Hard links need be tallied only once. */ + if (flp-fl_nlink 1) { +

Re: RPM: rpm/build/ files.c

2008-07-07 Thread Alexey Tourbin
On Mon, Jul 07, 2008 at 01:31:55AM -0400, Jeff Johnson wrote: Here's the flaw (from the edos-test*.src.rpm build): ... re --nodeps edos-test-*.src.rpm (cd edos-test /X/src/wdj/rpm --macros /X/src/wdj/macros:/X/src/wdj/ tests/macros -q --specfile edos-test.spec /X/src/wdj/rpm --macros /

Re: rsyncable gzdio

2008-07-09 Thread Alexey Tourbin
On Wed, Jul 09, 2008 at 05:35:46AM -0700, Jeff Johnson wrote: 0) No one understands why --rsyncable is important, or why gzip != zlib, or why the fuzzy name patch in rsync would be a tremendous bandwidth saving for *.rpm packages. I've been tracking the issue for like 6+ years, and what is

Re: RPM: rpm/ CHANGES rpm/rpmio/ gzdio.c

2008-08-06 Thread Alexey Tourbin
On Wed, Aug 06, 2008 at 05:09:30AM -0400, Jeff Johnson wrote: So that's what I screwed. Tired old blind eyes here, sigh. void pointers are evil. gzFile is typdeffed as void *, which means there's no chances left for compiler to complain about pointer type mismatch. They'd better typdef gzFile

- jbj: replace stdint.h with private typedefs.

2008-08-07 Thread Alexey Tourbin
On Thu, Jul 31, 2008 at 04:40:11AM +0200, Jeff Johnson wrote: Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 31-Jul-2008 04:40:11 Branch: HEAD

rpmdbAdd

2008-08-07 Thread Alexey Tourbin
Can't you help me to understand the code please? What is the firstkey? What's going on? rpmdb.c (rpmdbAdd): 3214 { 3215 unsigned int firstkey = 0; 3216 void * keyp = firstkey; 3217 size_t keylen = sizeof(firstkey); 3218 void * datap = NULL;

Re: rpmdbAdd

2008-08-07 Thread Alexey Tourbin
On Thu, Aug 07, 2008 at 09:08:01PM -0400, Jeff Johnson wrote: Header indices are monotonically increasing integer instances starting with 1. And header instance #0 is where the monotonically increasing integer is stored. Thanks, that's the key point that I missed. I can lay out what I think

Re: Provideversion empty string index

2008-08-07 Thread Alexey Tourbin
On Thu, Aug 07, 2008 at 06:27:37PM -0400, Jeff Johnson wrote: On Thursday, August 07, 2008, at 06:21PM, Alexey Tourbin [EMAIL PROTECTED] wrote: If you try something like perl -MDB_File -MData::Dumper -le 'tie %db,DB_File,/var/lib/rpm/Provideversion,0,0,$DB_BTREE or die; print Dumper

Re: RPM: rpm/rpmdb/ rpmdb.c

2008-08-07 Thread Alexey Tourbin
On Fri, Aug 08, 2008 at 01:37:42AM -0400, Jeff Johnson wrote: Careful with this change. It's quite easy to end up truncating unloaded header blobs accidentally by 8b (which is what your deletion does afaict, not checked). headerGetMagic() is just a complicated way of setting nb = 8. ---

mire

2008-08-16 Thread Alexey Tourbin
I wonder if mires are of any use. Suppose I want to query provides by glob pattern 'perl(*)'. The desired output is 4 columns perl(...) perl(...)-version %{NAME} %{VERSION} E.g. something like $ rpm -qa --qf '%{PROVIDENAME}\t%{PROVIDEVERSION}\t%{NAME}\t%{VERSION}\n' |grep

Re: rpmdb.c blockSignals()

2008-08-16 Thread Alexey Tourbin
On Sat, Aug 16, 2008 at 05:57:30AM -0400, Jeff Johnson wrote: On Aug 16, 2008, at 4:12 AM, Jeff Johnson wrote: Please do not change anything with blockSignals. Hmmm, I've neglected to supply sufficient details, and so it sounds like I'm forbidding better engineering. That was not my

Re: rpmdb.c blockSignals()

2008-08-18 Thread Alexey Tourbin
On Sat, Aug 16, 2008 at 12:12:13PM -0400, Jeff Johnson wrote: I think this is wrong -- with this change, blockSignals() now does NOT block signals. Note that e.g. db-put is neither atomic nor reenterable (possibly cannot even close db if db-put is in progress). Correct, signals are not

Re: rpmdb.c blockSignals()

2008-08-18 Thread Alexey Tourbin
On Mon, Aug 18, 2008 at 09:13:14AM -0400, Jeff Johnson wrote: Consider that you open two rpmdb databases simultaneously. Signal handling is screwed, and after you close them both, rpmsq handler is still installed, and oact is lost. Screwed? signal handling reverts to the original state

Re: RPM: rpm/rpmdb/ db3.c dbconfig.c rpmdb.c rpmdb.h

2008-08-18 Thread Alexey Tourbin
On Mon, Aug 18, 2008 at 12:20:36PM -0400, Jeff Johnson wrote: @@ -2878,6 +2878,7 @@ if (db-db_tags != NULL) for (dbix = 0; dbix db-db_ndbi; dbix++) { + dbiIndex dbi; (Actually one of my previous changes moved these variables from the outer scope to the inner loop scope.)

Re: damaged headers are due to FILESTATES RPM_CHAR_TYPE

2008-08-27 Thread Alexey Tourbin
On Wed, Aug 27, 2008 at 09:16:50AM -0400, Jeff Johnson wrote: Damaged headers are due to FILESTATES from older rpmdb. rpmdb/header.c (regionSwab): 522 for (; il 0; il--, pe++) { 523 struct indexEntry_s ie; 524 rpmTagType type; 525 526

Re: damaged headers are due to FILESTATES RPM_CHAR_TYPE

2008-08-27 Thread Alexey Tourbin
On Wed, Aug 27, 2008 at 12:55:06PM -0400, Jeff Johnson wrote: This apparently means that rpm5 is not that widely used. Perhaps you should call for yet more major distributions. I'd agree that rpm5 is not widely used on legacy distributions. Face it, people use what they give them, and they

Re: damaged headers are due to FILESTATES RPM_CHAR_TYPE

2008-08-29 Thread Alexey Tourbin
On Wed, Aug 27, 2008 at 12:55:06PM -0400, Jeff Johnson wrote: $ ./rpm -q -vvv --whatprovides /a D: opening db index /var/lib/rpm/Packages rdonly mode=0x0 D: locked db index /var/lib/rpm/Packages D: opening db index /var/lib/rpm/Basenames rdonly mode=0x0 error: rpmdb:

Re: modular %posttrans-like scripts

2008-09-04 Thread Alexey Tourbin
On Wed, Aug 27, 2008 at 09:13:18AM -0400, Jeff Johnson wrote: There's the Mandriva solution, called file triggers, to the cache update problem in lib/filetriggers.c. I dislike several things with the the specific Mandriva implementation, but the idea is closest to being generally

lua bindings for rpmdb and header

2008-09-04 Thread Alexey Tourbin
On Thu, Sep 04, 2008 at 05:08:21PM -0400, Jeff Johnson wrote: Also, it is necessary to provide lua bindings for 1) retrieving headers by instance, perhepas something like h = getAddedHeader(num) and h = getRemovedHeader(num); and 2) retrieving header entries, e.g. h.filenames. BTW, back in

Re: rpm infinite recursions using manifests

2008-09-07 Thread Alexey Tourbin
On Sun, Sep 07, 2008 at 12:10:18PM -0400, Jeff Johnson wrote: There's a class of infinite recursion problems with manifests used on the rpm CLI that I don't know to fix. A manifest is a file containing a list of paths to packages (or other manifests) Forbid manifest files from within

Fwd: Re: v4.999.5alpha LZMA_STREAM_INIT_VAR

2008-09-14 Thread Alexey Tourbin
- Forwarded message from Lasse Collin [EMAIL PROTECTED] - Date: Sat, 13 Sep 2008 19:08:21 +0300 From: Lasse Collin [EMAIL PROTECTED] To: Alexey Tourbin [EMAIL PROTECTED] Subject: Re: v4.999.5alpha LZMA_STREAM_INIT_VAR Alexey Tourbin wrote: On Sat, Sep 13, 2008 at 01:17:42PM +0300, Lasse

Re: Conflicts on files not symmetric

2008-09-19 Thread Alexey Tourbin
On Fri, Sep 19, 2008 at 11:07:04AM +0200, Michael Schroeder wrote: while implementing virtual triggers [...] May I perhaps take a look at where you are? I'm implementing some sort of triggers, too. pgpcQRuXXG2Et.pgp Description: PGP signature

Re: Conflicts on files not symmetric

2008-09-19 Thread Alexey Tourbin
On Fri, Sep 19, 2008 at 04:59:35PM +0200, Michael Schroeder wrote: On Fri, Sep 19, 2008 at 02:52:21PM +, Alexey Tourbin wrote: On Fri, Sep 19, 2008 at 11:07:04AM +0200, Michael Schroeder wrote: while implementing virtual triggers [...] May I perhaps take a look at where you

Re: Conflicts on files not symmetric

2008-09-19 Thread Alexey Tourbin
On Fri, Sep 19, 2008 at 11:36:52AM -0400, Jeff Johnson wrote: On Fri, Sep 19, 2008 at 11:26:23AM -0400, Jeff Johnson wrote: Likely the 1st thing to get into place is the ability to trigger from adding a file to a directory, i.e. trigger if RPMTAG_DIRNAMES matches a trigger pattern, add

Re: Conflicts on files not symmetric

2008-09-19 Thread Alexey Tourbin
On Fri, Sep 19, 2008 at 11:51:32AM -0400, Jeff Johnson wrote: $ find /usr/share/icons/hicolor -mindepth 2 -type d |sort -u |head /usr/share/icons/hicolor/128x128/actions /usr/share/icons/hicolor/128x128/animations /usr/share/icons/hicolor/128x128/apps

Re: Conflicts on files not symmetric

2008-09-19 Thread Alexey Tourbin
On Fri, Sep 19, 2008 at 12:40:55PM -0400, Jeff Johnson wrote: On Fri, Sep 19, 2008 at 04:21:50PM +, Alexey Tourbin wrote: Technically there's no piping, only a file duplicated on stdin. And filetriggers are run only once, at the end of transaction (they're actually posttrans filetriggers

Re: Conflicts on files not symmetric

2008-09-19 Thread Alexey Tourbin
On Fri, Sep 19, 2008 at 04:01:13PM -0400, Jeff Johnson wrote: 1) %triggerin --posttrans -- /usr/share/icons/hicolor/*/*/ gtk-update-icon-cache /usr/share/icons/hicolor This trigger can be triggered/folded/called either by dirname or by glob pattern itself. Since there is no way to pass the

Re: Two limitations of triggers in rpm

2008-09-22 Thread Alexey Tourbin
On Sat, Sep 20, 2008 at 01:37:59PM -0400, Jeff Johnson wrote: There's the additional wrinkle of handling Provides: /path/to/file which muddles the implementation further, because 2 indices need to be searched. Personally, I think its way past time to

Re: Two limitations of triggers in rpm

2008-09-22 Thread Alexey Tourbin
On Mon, Sep 22, 2008 at 07:38:03AM -0400, Jeff Johnson wrote: Now, some paths are are virtual, which is e.g. executable paths under update-alternatives(1) control. Those paths are not packaged (and hence cannot be accessed via Basenames index), but rather created in % post script. We

Re: %post-script prerequisites

2008-09-24 Thread Alexey Tourbin
Think about this again: package foo has program /usr/bin/update-foo, which is invoked in %post-script of the package. The program is linked with e.g. libglib-2.0.so.0(GLIB_2.18), and we have the dependency Requires: libglib-2.0.so.0(GLIB_2.18). However, this is merely Requires. To run

Re: %post-script prerequisites

2008-09-24 Thread Alexey Tourbin
On Wed, Sep 24, 2008 at 01:56:35PM -0400, Jeff Johnson wrote: Anyway, perhaps I should do some rewording in my initial description of the problem. In ALT Linux mailing list (in Russian), there seems to be some misunderstanding (or maybe a lack of thereof), too. Lots of misunderstandings

Re: RPM: rpm/lib/ rpmal.c

2008-11-10 Thread Alexey Tourbin
On Mon, Nov 10, 2008 at 12:01:36PM -0500, Jeff Johnson wrote: BTW, where how are you seeing a flaw? What are the symptoms or usage case? This code has survived on 64bit platforms so I stumbled upon various bugs in rpmtsOrder: certain ordering relations ultimately were *NOT* added (T3) to tsi

ANN: RPM-Payload-0.10 on CPAN

2009-04-04 Thread Alexey Tourbin
and $entry-readlink methods may only be invoked before the next $cpio-next call. Hradlinks must be handled manually. Alternatively, you may want to skip entries with $entry-size == 0 altogether. AUTHOR Written by Alexey Tourbin a...@altlinux.org. COPYING Copyright

refined implementation of set-versions

2012-04-20 Thread Alexey Tourbin
Hello, I have just learnt that rpm5 project has borrowed set-string implementation recently from ALT Linux. At the very same time, I was working on on a new and improved encoding scheme which can make set-versions about 1% shorter in size, and which also permits more efficient decoding. There are

Re: refined implementation of set-versions

2012-04-21 Thread Alexey Tourbin
On Fri, Apr 20, 2012 at 5:16 PM, Jeffrey Johnson n3...@me.com wrote: The methods in the existing encoding/decoding are in rpmio/set.c @rpm5.org: the algorithm is unchanged from Alt. A change to the existing scheme over the next few months doesn't bother me at all. But legacy compatibility

Re: EVR issues: set:versions, epoch-as-string, now twiddle-in-version

2012-05-30 Thread Alexey Tourbin
On Mon, Apr 23, 2012 at 6:32 PM, Jeff Johnson n3npq@gmail.com wrote: I should point out that writing the attached message (and sending from the wrong e-mail address) has instantly led to a different -- and perhaps more natural -- syntax like Requires: set(libfoo.so.1) = whatever Hello,

Re: EVR issues: set:versions, epoch-as-string, now twiddle-in-version

2012-05-30 Thread Alexey Tourbin
On Thu, May 31, 2012 at 6:51 AM, Jeffrey Johnson n3...@me.com wrote: We are in violent agreement here over a minor issue of implementation/representation. By the way, actual problems that will arise are rarely what you expect them to be. In 2010, I was naive and I thought that char bitv[] was a

Re: EVR issues: set:versions, epoch-as-string, now twiddle-in-version

2012-05-31 Thread Alexey Tourbin
On Thu, May 31, 2012 at 9:03 AM, Jeffrey Johnson n3...@me.com wrote: The mixed code case is interesting: what happens if a set:version encoding contains the literal string 0:V-R I can't understand you question. A version is either a set-version, or not a set-version.  If a version is a

Re: EVR issues: set:versions, epoch-as-string, now twiddle-in-version

2012-06-15 Thread Alexey Tourbin
On Fri, Jun 1, 2012 at 6:07 AM, Jeffrey Johnson n3...@me.com wrote: I asked 2 very specific questions … the rest is quite important also, but I need to understand precisely what properties set:versions have in order to implement correctly (and I don't fully understand your reply).

Re: EVR issues: set:versions, epoch-as-string, now twiddle-in-version

2012-06-20 Thread Alexey Tourbin
On Mon, Jun 18, 2012 at 10:32 PM, Jeffrey Johnson n3...@me.com wrote: Good: the above confirmation of the characteristics allows a set:versions implementation to proceed. Hello, there's been some speculation about Bloom filters below, which I cannot address right now, offhand. Nevertheless, I

Re: EVR issues: set:versions, epoch-as-string, now twiddle-in-version

2012-06-20 Thread Alexey Tourbin
On Thu, Jun 21, 2012 at 12:15 AM, Alexey Tourbin alexey.tour...@gmail.com wrote: On Mon, Jun 18, 2012 at 10:32 PM, Jeffrey Johnson n3...@me.com wrote: Good: the above confirmation of the characteristics allows a set:versions implementation to proceed. Hello, there's been some speculation

Re: EVR issues: set:versions, epoch-as-string, now twiddle-in-version

2012-06-21 Thread Alexey Tourbin
On Thu, Jun 21, 2012 at 7:28 PM, Jeffrey Johnson n3...@me.com wrote: More precisely, a set-version can be (in principle) converted to a Bloom filter which uses only one hash function. The idea is that such a filter will set bits in a highly sparse set of bits, one by one. Instead, a

Re: EVR issues: set:versions, epoch-as-string, now twiddle-in-version

2012-06-22 Thread Alexey Tourbin
On Thu, Jun 21, 2012 at 7:51 PM, Jeffrey Johnson n3...@me.com wrote: On Jun 18, 2012, at 2:32 PM, Jeffrey Johnson wrote: The contained in or subset semantic that applies to the operations and = is rather easy to do as well. E.g. if (assuming on;y existence, not versioned inequality

Re: EVR issues: set:versions, epoch-as-string, now twiddle-in-version

2012-06-22 Thread Alexey Tourbin
On Fri, Jun 22, 2012 at 5:30 AM, Jeffrey Johnson n3...@me.com wrote: Sure numbers make sense. But God invented 0 and 1 and who needs steenkin carries to do arithmetic in Galois fields?!? Jeffery, I understand that you are ironic and sarcastic, but I can't see the reason why, as per our

Re: EVR issues: set:versions, epoch-as-string, now twiddle-in-version

2012-06-22 Thread Alexey Tourbin
On Sat, Jun 23, 2012 at 1:55 AM, Jeffrey Johnson n3...@me.com wrote: I would state that compression (of any sort) to minimize bandwidth is entirely the wrong problem to solve. So what kind of a problem are we trying to solve? Why are you making all these small puns? Are you ready to go out and

Re: EVR issues: set:versions, epoch-as-string, now twiddle-in-version

2012-06-23 Thread Alexey Tourbin
On Sat, Jun 23, 2012 at 1:55 AM, Jeffrey Johnson n3...@me.com wrote: There are lots of usage cases for efficient sub-set computations in package management, not just as a de facto API/ABI check using ELF symbols. Most of the other usage cases for efficient sub-set computations are not subject

Re: EVR issues: set:versions, epoch-as-string, now twiddle-in-version

2012-06-28 Thread Alexey Tourbin
On Sat, Jun 23, 2012 at 7:10 AM, Jeffrey Johnson n3...@me.com wrote: Why is it any wrong to minimize bandwidth, or, in other words, why it is bad to spend less money? Your answer is like, because the meaning of life is not to spend less money, which is a wrong perspective. Okay, but what's a

Re: EVR issues: set:versions, epoch-as-string, now twiddle-in-version

2012-06-28 Thread Alexey Tourbin
On Thu, Jun 28, 2012 at 8:18 PM, Alexey Tourbin alexey.tour...@gmail.com wrote: There is also a philosophical consideration which somehow accompanies this practical consideration. There is a short story, I believe by Borges, where a clever scientist devises a 1-1 map of reality. A 1-1 map

Re: EVR issues: set:versions, epoch-as-string, now twiddle-in-version

2012-07-01 Thread Alexey Tourbin
On Sat, Jun 23, 2012 at 10:29 PM, Jeffrey Johnson n3...@me.com wrote: In the interest of getting off negative nerdy obscure discussions, let's try a positive alternative application for Golob-Rice subset operations. All RPMv4 packages attach (a lightly filtered) file(1) magic string to every

Re: EVR issues: set:versions, epoch-as-string, now twiddle-in-version

2012-07-02 Thread Alexey Tourbin
On Mon, Jul 2, 2012 at 9:17 AM, Jeffrey Johnson n3...@me.com wrote: All RPMv4.4+ packages, that is, but not RPMv4.0. I find this file coloring business very annoying, by the way, and it took me some time to realize that fc actually stands for file coloring. :-) RPMv4.0 was a l-o-n-g time ago.