[Rpm-maint] [rpm-software-management/rpm] Enhance requires with version information from the build root. (PR #2372)

Gordon Messmer notifications at github.com
Wed Feb 8 02:31:24 UTC 2023


@gordonmessmer commented on this pull request.



> +    destsize = readlink(filename, dest, PATH_MAX);
+    if (destsize > 0) {
+	dest[destsize] = 0;
+	filename = dest;
+    }
+    /*
+     * Start from the end of the string.  Verify that it ends with
+     * numbers and dots, preceded by ".so.".
+     */
+    so = filename + strlen(filename);
+    while (so > filename+2) {
+	if (*so == '.') {
+	    found_dot++;
+	    so--;
+	    continue;
+	} else if (strchr("0123456789", *so)) {

Without defined semantics, it's probably a bad idea to process any non-numeric versions.  Is 13git a version leading up to a stable release of version 13?  If so, that'd be very difficult to correct later:

```
 $ rpmdev-vercmp 13git 13
13git > 13
```

I was less concerned about that class of problems when I suggested using the rpm version, since maintainers already have to make sure that rpm understands the progression of releases.  (Though, on the other hand, I did not initially use the epoch, and that probably would have been necessary.)

Thinking through that further: there would be a problem if libfoo.so.12.0.0 were available in a build root and packages built against it, and later that package were updated with libfoo.so.13.0.0git.  The new version wouldn't "provide" a versioned library, and that'd break dependencies or force the maintainer to manually Provide something.

It bears thinking about further, I guess.  But I do think this is a problem worth solving.  I'll keep working.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2372#discussion_r1099579368
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/2372/review/1288377910 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20230207/076b681e/attachment.html>


More information about the Rpm-maint mailing list