@ffesti pushed 2 commits.
c0bb2aaf51f78ac30e86e65f772c17d4c8dde8ae Add rpmlogOnce() and rpmlogReset()
02750bb69f9ad931fe26bef15a4b2615cdfcc27b Use rpmlogOnce() in handleHdrVS
--
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3417/files/bf6baaa3ef7d62959064583d5ead2d64a1
@pmatilai commented on this pull request.
> @@ -412,3 +415,43 @@ void rpmlog (int code, const char *fmt, ...)
exit:
errno = saved_errno;
}
+
+int rpmlogOnce (uint64_t domain, const char * key, int code, const char *fmt,
...)
+{
+int saved_errno = errno;
+rpmlogCtx ctx = rpmlogCtx
OK; this should address all issues except for the Python based test case which
I will add next.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3417#issuecomment-2449444799
You are receiving this because you are subscribed to this thread.
That's caused by %len being mapped to lua's string.len() function, and lua
does not complain about the extra arg:
```
$ lua
> print(string.len("foo", "bar"))
3
>
```
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3410#issuecomment-24
@dmnks commented on this pull request.
> @@ -412,3 +415,43 @@ void rpmlog (int code, const char *fmt, ...)
exit:
errno = saved_errno;
}
+
+int rpmlogOnce (uint64_t domain, const char * key, int code, const char *fmt,
...)
+{
+int saved_errno = errno;
+rpmlogCtx ctx = rpmlogCtxAcq
@ffesti commented on this pull request.
> @@ -412,3 +415,43 @@ void rpmlog (int code, const char *fmt, ...)
exit:
errno = saved_errno;
}
+
+int rpmlogOnce (uint64_t domain, const char * key, int code, const char *fmt,
...)
+{
+int saved_errno = errno;
+rpmlogCtx ctx = rpmlogCtxAc
@ffesti pushed 2 commits.
f83a969b903a6cef614a2daa1e59650e1eeb0742 Add rpmlogOnce() and rpmlogReset()
7b3377bb0c2bff99a06c5dd4d3aa7ef560549ccf Use rpmlogOnce() in handleHdrVS
--
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3417/files/02750bb69f9ad931fe26bef15a4b2615cd
recs is not really suited for this. It is a vector so lookups are not cheap. It
only stores WARNING and above. We might want to link to the recs entry but even
that does not really solve anything if the lower prio entries are missing.
The additional string is there for cases where the message co
OK, test added.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3417#issuecomment-2450139574
You are receiving this because you are subscribed to this thread.
Message ID:
___
> The lifetime could be handled by throwing in a context or id to the mix,
this could be an arbitrary 64bit int so you can pass in a pointer (ts, spec,
whatever), have the keys hang off that
Realized today with some amusement that this was very much a C hacker proposal.
We, we could just use a
This looks do to me now. May be @dmnks can have a look and second opinion
before merging.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3408#issuecomment-2450223428
You are receiving this because you are subscribed to this thread.
Mes
**Describe the bug**
Hi team,
I'm working on a Centos 7 Docker container which brings RPM version `4.11.3`.
I'm able to cover the required deps and install the `4.18.2` version, but I can
not migrate the native rpm db to the installed one and the newer version never
knows about the already inst
@ffesti pushed 1 commit.
bf6baaa3ef7d62959064583d5ead2d64a18fda0c Add rpmlogOnce() and rpmlogReset()
--
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3417/files/7eb7b473a04ccad9457bbd0de1bc6c7f52d11b93..bf6baaa3ef7d62959064583d5ead2d64a18fda0c
You are receiving this bec
The existing tests don't cover #3336 which this claims to be fixing.
Rpm wont do multiple transactions in a process, but you should be able to test
it with the python bindings.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3417#issuecom
> I don't think we will have logging objects for every possible occasion but
> only for majors things like builds or transactions. So I expect the domain to
> stay relevant even if we no longer have global logging.
Yeah, logging is kind of global in nature, I don't see that fundamentally
chang
@pmatilai commented on this pull request.
> @@ -412,3 +415,43 @@ void rpmlog (int code, const char *fmt, ...)
exit:
errno = saved_errno;
}
+
+int rpmlogOnce (uint64_t domain, const char * key, int code, const char *fmt,
...)
+{
+int saved_errno = errno;
+rpmlogCtx ctx = rpmlogCtx
Also, this is two entirely different things in a single commit. Split them up.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3417#issuecomment-2449321967
You are receiving this because you are subscribed to this thread.
Message ID:
> recs is not really suited for this. It is a vector so lookups are not cheap.
> It only stores WARNING and above. We might want to link to the recs entry but
> even that does not really solve anything if the lower prio entries are
> missing.
Sure, the logic for populating `recs` would have to
> Yeah, logging is kind of global in nature, I don't see that fundamentally
> changing. The deal with _allowing_ non-global context is to allow something
> like dnf to have a context _they_ control, not so much with having multiple
> different contexts active within rpm at the same time. So I do
@pmatilai commented on this pull request.
> @@ -412,3 +415,43 @@ void rpmlog (int code, const char *fmt, ...)
exit:
errno = saved_errno;
}
+
+int rpmlogOnce (uint64_t domain, const char * key, int code, const char *fmt,
...)
+{
+int saved_errno = errno;
+rpmlogCtx ctx = rpmlogCtx
@pmatilai commented on this pull request.
> @@ -412,3 +415,43 @@ void rpmlog (int code, const char *fmt, ...)
exit:
errno = saved_errno;
}
+
+int rpmlogOnce (uint64_t domain, const char * key, int code, const char *fmt,
...)
+{
+int saved_errno = errno;
+rpmlogCtx ctx = rpmlogCtx
@pmatilai commented on this pull request.
> @@ -412,3 +415,43 @@ void rpmlog (int code, const char *fmt, ...)
exit:
errno = saved_errno;
}
+
+int rpmlogOnce (uint64_t domain, const char * key, int code, const char *fmt,
...)
+{
+int saved_errno = errno;
+rpmlogCtx ctx = rpmlogCtx
@ffesti commented on this pull request.
> @@ -412,3 +415,43 @@ void rpmlog (int code, const char *fmt, ...)
exit:
errno = saved_errno;
}
+
+int rpmlogOnce (uint64_t domain, const char * key, int code, const char *fmt,
...)
+{
+int saved_errno = errno;
+rpmlogCtx ctx = rpmlogCtxAc
@pmatilai pushed 2 commits.
b3731ba589f72035085d41c14f2016d901954d37 Replace macro locking with an
internal RAII-style C++ API
2a19bcd79cde0fdbbf769505c5b357c9ff10dc78 Convert a couple of rpmExpand()
usages to the C++ versions
--
View it on GitHub:
https://github.com/rpm-software-management/
Added a bunch of notes on the overall design + notes on API differences where
they exist.
Also added native expand_numeric() variants which I had somehow missed in the
first round.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3408#iss
@pmatilai commented on this pull request.
> + }
+ va_end(ap);
+}
+errno = saved_errno;
+return newkey;
+}
+
+void rpmlogReset(uint64_t domain, int mode=0)
+{
+rpmlogCtx ctx = rpmlogCtxAcquire();
+std::map, int> domain_data = {};
+
+if (ctx) {
+ wrlock lock
@dmnks commented on this pull request.
> @@ -412,3 +415,43 @@ void rpmlog (int code, const char *fmt, ...)
exit:
errno = saved_errno;
}
+
+int rpmlogOnce (uint64_t domain, const char * key, int code, const char *fmt,
...)
+{
+int saved_errno = errno;
+rpmlogCtx ctx = rpmlogCtxAcq
@dmnks commented on this pull request.
> @@ -412,3 +415,43 @@ void rpmlog (int code, const char *fmt, ...)
exit:
errno = saved_errno;
}
+
+int rpmlogOnce (uint64_t domain, const char * key, int code, const char *fmt,
...)
+{
+int saved_errno = errno;
+rpmlogCtx ctx = rpmlogCtxAcq
@dmnks commented on this pull request.
> @@ -412,3 +415,43 @@ void rpmlog (int code, const char *fmt, ...)
exit:
errno = saved_errno;
}
+
+int rpmlogOnce (uint64_t domain, const char * key, int code, const char *fmt,
...)
+{
+int saved_errno = errno;
+rpmlogCtx ctx = rpmlogCtxAcq
And yup, for reasons like this it's best done as an internal-only API just now
- so we don't need to commit to it for the rest of our lives :sweat_smile:
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3417#issuecomment-2449386312
You ar
Yeah the domain and its attached seen-stuff could be tracked as a proper object
too, I mumbled something along those lines in #3389 actually, the id is just a
kind of simplified version of that.
The log context itself is still a kind of different thing because at least in
rpm, if you specify a
> Redoing the whole rpmlog thing is a story for another time.
[...]
> but we really cannot get into that business now. It'll need to be thought
> through once we decide to do a logging overhaul.
Agreed, all are good points. Let's go ahead with this.
--
Reply to this email directly or view it on
@pmatilai commented on this pull request.
> @@ -412,3 +415,43 @@ void rpmlog (int code, const char *fmt, ...)
exit:
errno = saved_errno;
}
+
+int rpmlogOnce (uint64_t domain, const char * key, int code, const char *fmt,
...)
+{
+int saved_errno = errno;
+rpmlogCtx ctx = rpmlogCtx
I don't disagree that this can probably be done better with proper OO. But I
don't want to get into this right now. Redoing the whole rpmlog thing is a
story for another time. As this is a internal API for now we can still change
it later one when we get to that.
--
Reply to this email directl
@dmnks commented on this pull request.
> @@ -412,3 +415,43 @@ void rpmlog (int code, const char *fmt, ...)
exit:
errno = saved_errno;
}
+
+int rpmlogOnce (uint64_t domain, const char * key, int code, const char *fmt,
...)
+{
+int saved_errno = errno;
+rpmlogCtx ctx = rpmlogCtxAcq
@ffesti commented on this pull request.
> + }
+ va_end(ap);
+}
+errno = saved_errno;
+return newkey;
+}
+
+void rpmlogReset(uint64_t domain, int mode=0)
+{
+rpmlogCtx ctx = rpmlogCtxAcquire();
+std::map, int> domain_data = {};
+
+if (ctx) {
+ wrlock lock(c
@dmnks commented on this pull request.
> @@ -412,3 +415,43 @@ void rpmlog (int code, const char *fmt, ...)
exit:
errno = saved_errno;
}
+
+int rpmlogOnce (uint64_t domain, const char * key, int code, const char *fmt,
...)
+{
+int saved_errno = errno;
+rpmlogCtx ctx = rpmlogCtxAcq
The `sign_hash()` function is now deprecated in `libimaevm.so.5` (shipped in
Fedora 41) which causes a build warning (when configured with
`-DWITH_IMAEVM=ON`:
```
warning: ‘int sign_hash(const char*, const unsigned char*, int, const char*,
const char*, unsigned char*)’ is deprecated [-Wdeprecate
Merged #3418 into master.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3418#event-15035058916
You are receiving this because you are subscribed to this thread.
Message ID:
___
Rpm-maint mail
39 matches
Mail list logo