Skip to content
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

pkgin loses dependency information when upgrading packages (NetBSD PR 48620) #15

Closed
0-wiz-0 opened this issue Mar 27, 2014 · 4 comments
Closed

Comments

@0-wiz-0
Copy link

0-wiz-0 commented Mar 27, 2014

When using 'pkgin fug' to update packages, they lose the information by what packages
they are needed, while the packages needing them still know about this.
This causes problems later-on. For example, when you do pkg_delete -r, not all
depending packages are removed.

Example:
Upgrade a package that is used by another one.
E.g. after upgrading isl with 'pkgin fug':

pkg_info isl

Information for isl-0.12.2:

Comment:
Integer set library required by gcc graphite

Requires:
gmp>=5.0.1

Description:
isl is a library for manipulating sets and relations of integer
points bounded by linear constraints. Supported operations on sets
include intersection, union, set difference, emptiness check, convex
hull, (integer) affine hull, integer projection, and computing the
lexicographic minimum using parametric integer programming. It also
includes an ILP solver based on generalized basis reduction.

Homepage:
http://isl.gforge.inria.fr/

pkg_info gcc48

Information for gcc48-4.8.2nb1:

Comment:
The GNU Compiler Collection (GCC) - 4.8 Release Series

Requires:
gmp>=5.0.1
mpcomplex>=0.8.2
mpfr>=3.0.0.3
cloog>=0.18.0nb1
isl>=0.11.1

Required by:
icc11-11.1.080nb2

Description:
The GNU Compiler Collection (GCC) includes front ends for C, C++, Objective-C,
Fortran, Java, and Go, as well as libraries for these languages (libstdc++,
libgcj,...). This package provides the snapshot relases of version 4.8.
See http://gcc.gnu.org/gcc-4.8/changes.html for changes relative to 4.7.x.

Homepage:
http://gcc.gnu.org/

So isl doesn't know that gcc48 needs it, but gcc48 still remembers.

Suggested solution:
Do what 'make replace' does.
Move the file with the dependency information aside and restore it after
updating the package.

For bonus points: mark the depending packages with unsafe_depends, like
pkg_rr does.

@gdt
Copy link

gdt commented Jan 4, 2015

Really it seems that this should use "pkg_add -u -D", which is what make replace does now, with DESTDIR. Arguably pkg_add -u itself should set unsafe_depends.

@0-wiz-0
Copy link
Author

0-wiz-0 commented Jul 29, 2015

Just to be clear: The problem is that pkgin does it in two steps. pkg_delete on the old version (with -f) which removes the dependency information, and then pkg_add without manually re-adding the dependency information.

@jperkin
Copy link
Contributor

jperkin commented Jul 26, 2023

This should be fixed with recent changes including switching to pkg_add -U, and ensuring we're rebuilding +REQUIRED_BY after every operation.

In the next pkgin release I also have changes that avoid issues with bad reverse dependencies and instead uses the correct REQUIRED_BY data from the pkgdb.

I'll close this one out for now, and if you still see any issues after using the latest release (hopefully out soon) then we'll take a look.

@jperkin jperkin closed this as completed Jul 26, 2023
@0-wiz-0
Copy link
Author

0-wiz-0 commented Jul 27, 2023

Thanks for handling this one!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants