-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] abi support #331
base: master
Are you sure you want to change the base?
[RFC] abi support #331
Conversation
repodata can't contain packages with different ABIs.
Interesting would this work with the musl update, once appropriate changes are added to |
It's an idea for a possible solution to the musl update. |
@ericonr Would love to help making this happen, what Is missing here ? It looks feature complete this pr ... |
@motorto we need to implement the xbps-install side where, upon receiving a package with a greater ABI field, we force update the entire system in one go. |
probably not good, but here is my currently work on it I just don't know how can I get the repo abi version. And I am not sure if its the repo abi version that increases or the package that increases: Here is the diffdiff --git a/bin/xbps-install/transaction.c b/bin/xbps-install/transaction.c
index d747c760..aa1f7793 100644
--- a/bin/xbps-install/transaction.c
+++ b/bin/xbps-install/transaction.c
@@ -292,6 +292,8 @@ install_new_pkg(struct xbps_handle *xhp, const char *pkg, bool force)
fprintf(stderr, "Package `%s' contains invalid dependencies, exiting.\n", pkg);
else if (rv == EBUSY)
fprintf(stderr, "The 'xbps' package must be updated, please run `xbps-install -u xbps`\n");
+ else if (rv == 2) // TODO: FIND GOOD VALUE HERE
+ fprintf(stderr, "ABI changed, please run `xbps-install -Su` to do a full system upgrade\n");
else if (rv != 0) {
fprintf(stderr, "Unexpected error: %s\n", strerror(rv));
rv = -1;
diff --git a/lib/transaction_ops.c b/lib/transaction_ops.c
index 5c0deda4..ba7907d4 100644
--- a/lib/transaction_ops.c
+++ b/lib/transaction_ops.c
@@ -1,4 +1,4 @@
-/*-
+/*
* Copyright (c) 2009-2020 Juan Romero Pardines.
* All rights reserved.
*
@@ -347,8 +347,10 @@ xbps_transaction_update_packages(struct xbps_handle *xhp)
int
xbps_transaction_update_pkg(struct xbps_handle *xhp, const char *pkg, bool force)
{
+ const char *t_abi = NULL;
+ xbps_dictionary_t pkg_pkgdb = NULL;
xbps_array_t rdeps;
- int rv;
+ int abi_repo, abi_pkg, rv;
rv = xbps_autoupdate(xhp);
xbps_dbg_printf(xhp, "%s: xbps_autoupdate %d\n", __func__, rv);
@@ -366,6 +368,19 @@ xbps_transaction_update_pkg(struct xbps_handle *xhp, const char *pkg, bool force
break;
}
+ /* check abi version */
+ xbps_dictionary_get_cstring_nocopy(xhp->pkgdb,"abi", &t_abi);
+ abi_repo=atoi(t_abi);
+
+ pkg_pkgdb = xbps_pkgdb_get_pkg(xhp, pkg);
+ xbps_dictionary_get_cstring_nocopy(pkg_pkgdb,"abi", &t_abi);
+
+ abi_pkg=atoi(t_abi);
+
+ if (abi_repo < abi_pkg) {
+ return 2;
+ }
+
/* update its reverse dependencies */
rdeps = xbps_pkgdb_get_pkg_revdeps(xhp, pkg);
if (xhp->flags & XBPS_FLAG_DOWNLOAD_ONLY) {
|
I'm pretty new to this whole stuff, but I want to contribute. How can I help and what should I read to understand the bigger picture? |
No description provided.