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

deinstall does not order packages correctly #113

Closed
0-wiz-0 opened this issue Jun 15, 2021 · 8 comments
Closed

deinstall does not order packages correctly #113

0-wiz-0 opened this issue Jun 15, 2021 · 8 comments
Assignees

Comments

@0-wiz-0
Copy link

0-wiz-0 commented Jun 15, 2021

I played around with pandoc.
First, I installed it.

pkgin in pandoc

and got some strange warnings in the log.
pandoc.log

Afterwards, I deinstalled it:

pkgin rm pandoc
pkgin ar

and got more warnings.
pandoc-deinstall.log

I think this shows a couple of issues:

  • installation does not seem to honor all dependencies, or some are missing for a couple hs-* packages
  • deinstall does not sort the packages to delete in the right order: ghc is deleted much too early, breaking the removal of other packages
@iMilnb
Copy link
Contributor

iMilnb commented Jul 26, 2021

Hi wiz!

This is a pretty annoying bug, and of course I am not able to reproduce it ;) could you please provide the output of the pkgin sfd pandoc command?
I can't find this package on the officials binaries repos, is it a custom bulk build? Any particular option added to the build?

Thanks

@0-wiz-0
Copy link
Author

0-wiz-0 commented Jul 30, 2021

I had built pandoc in a limited pbulk myself.
I just did that again and tried again, and pkgin still ignores dependencies when installing packages.

# pkgin in pandoc
installing pandoc-2.13nb1...                                                                                                              
...
installing hs-SHA-1.6.4.4nb1...                                                                                                           
...
installing ghc-9.0.1nb5...                                                                                                                
...

i.e. the installation STARTS with pandoc, and ghc is installed in the middle, after some hs-* are already installed, even though:

# pkg_info hs-SHA
...
Requires:
ghc>=9.0
...

and similar for pandoc with a much longer list.
on stdout there are no errors, but the pkg_install.log is quite unhappy, starting with:

---Jul 30 12:09:46: installing pandoc-2.13nb1...
hashable-1.3.1.0: package(s) with this id already exist: hashable-1.3.1.0-IDbfflc1pEO449reqjcct1
hashable-1.3.1.0: package hashable-1.3.1.0 is already installed
hashable-1.3.1.0: Package names may be treated case-insensitively in the future.
Package hashable-1.3.1.0 overlaps with: hashable-1.3.1.0 (use --force to override)
integer-logarithms-1.0.3.1: package(s) with this id already exist: integer-logarithms-1.0.3.1-4RpwtjMVqT0IdWLCKsR7uo
integer-logarithms-1.0.3.1: package integer-logarithms-1.0.3.1 is already installed
integer-logarithms-1.0.3.1: Package names may be treated case-insensitively in the future.

lots more like that, then it seems pkgin tries to install the packages it should have installed before:

---Jul 30 12:10:30: installing hs-zlib-0.6.2.3nb1...
unregistering would break the following packages: pandoc-2.13 zip-archive-0.4.1 skylighting-0.10.5.1 skylighting-core-0.10.5.1 JuicyPixels-3.3.5 http-client-tls-0.3.5.3 http-client-0.7.8 citeproc-0.3.0.9 streaming-commons-0.2.2.1 conduit-extra-1.3.5 xml-conduit-1.9.1.1 (ignoring)

lots more like that.

pkgin sfd pandoc looks ok:

full dependency tree for pandoc-2.13nb1
        hs-indexed-traversable>=0.1.1nb1
        hs-distributive>=0.6.2.1nb1
        hs-comonad>=5.0.8nb1
        xmlcatmgr>=2.0beta1
        hs-bifunctors>=5.5.10nb1
        hs-vector-algorithms>=0.8.0.4nb1
        hs-mono-traversable>=1.0.15.1nb1
        hs-typed-process>=0.2.6.0nb1
        hs-unliftio-core>=0.2.0.1nb1
        hs-haskell-lexer>=1.1nb1
        hs-byteorder>=1.0.4nb1
        hs-appar>=0.1.8nb1
        hs-async>=2.2.3nb1
        hs-cereal>=0.5.8.1nb1
        hs-asn1-parse>=0.9.5nb1
        hs-pem>=0.2.4nb1
        hs-hourglass>=0.2.12nb1
        hs-asn1-types>=0.3.4nb1
        hs-asn1-encoding>=0.9.6nb1
        hs-assoc>=1.0.2nb1
        hs-semigroups>=0.19.1nb2
        hs-old-locale>=1.0.0.7nb1
        hs-base-orphans>=0.8.4nb1
        hs-generic-deriving>=1.14nb1
        hs-fail>=4.9.0.0nb1
        libxml2>=2.9.10nb4
        llvm-[0-9]*
        libffi>=3.3nb1
        gmp>=5.0.1
        hs-transformers-compat>=0.6.6nb1
        hs-uuid-types>=1.0.4nb1
        hs-time-compat>=1.9.5nb1
        hs-these>=1.1.1.1nb1
        hs-th-abstraction>=0.4.2.0nb1
        hs-tagged>=0.8.6.1nb1
        hs-strict>=0.4.0.1nb1
        hs-dlist>=1.0nb1
        hs-data-fix>=0.3.1nb1
        hs-base-compat-batteries>=0.11.2nb1
        hs-cmdargs>=0.10.21nb1
        hs-base-compat>=0.11.2nb1
        hs-uniplate>=1.6.13nb1
        hs-rfc5051>=0.2nb1
        hs-x509-validation>=1.6.11nb1
        hs-x509-system>=1.6.6nb1
        hs-x509-store>=1.6.7nb1
        hs-x509>=1.7.5nb1
        hs-socks>=0.6.1nb1
        hs-basement>=0.0.11nb1
        hs-data-default-instances-old-locale>=0.0.1nb1
        hs-data-default-instances-dlist>=0.0.1nb5
        hs-data-default-instances-containers>=0.0.1nb1
        hs-vector>=0.12.0.3nb1
        lua53>=5.3.0<5.4
        hs-streaming-commons>=0.2.2.1nb1
        hs-mime-types>=0.1.0.9nb1
        hs-iproute>=1.7.11nb1
        hs-cookie>=0.4.5nb1
        hs-blaze-builder>=0.4.2.1nb1
        hs-tls>=1.5.5nb1
        hs-memory>=0.15.0nb1
        hs-cryptonite>=0.28nb1
        hs-th-compat>=0.1.2nb1
        hs-QuickCheck>=2.14.2nb1
        hs-splitmix>=0.1.0.3nb1
        hs-primitive>=0.7.1.0nb1
        hs-integer-logarithms>=1.0.3.1nb1
        hs-pretty-show>=1.10nb1
        hs-utf8-string>=1.0.2nb1
        hs-colour>=2.3.5nb1
        hs-ansi-terminal>=0.11nb1
        hs-errors>=2.3.0nb1
        hs-base16-bytestring>=1.0.1.0nb1
        hs-hashable>=1.3.1.0nb1
        hs-xml-types>=0.3.8nb1
        hs-resourcet>=1.2.4.2nb1
        hs-data-default-class>=0.1.2.0nb1
        hs-conduit-extra>=1.3.5nb1
        hs-conduit>=1.3.4.1nb1
        hs-digest>=0.0.1.2nb1
        hs-zlib>=0.6.2.3nb1
        hs-zip-archive>=0.4.1nb1
        hs-xml-conduit>=1.9.1.1nb1
        hs-xml>=1.3.14nb1
        hs-unordered-containers>=0.2.13.0nb1
        hs-unicode-transforms>=0.3.7.1nb1
        hs-text-conversions>=0.3.1nb1
        hs-texmath>=0.12.2nb1
        hs-temporary>=1.3nb1
        hs-tagsoup>=0.14.8nb1
        hs-syb>=0.7.2.1nb1
        hs-split>=0.2.3.4nb1
        hs-skylighting-core>=0.10.5.1nb1
        hs-skylighting>=0.10.5.1nb1
        hs-scientific>=0.3.6.2nb2
        hs-safe>=0.3.19nb1
        hs-random>=1.2.0nb1
        hs-pandoc-types>=1.22nb1
        hs-network-uri>=2.6.4.1nb1
        hs-network>=3.1.2.1nb1
        hs-jira-wiki-markup>=1.3.4nb1
        hs-ipynb>=0.1.0.1nb1
        hs-http-types>=0.12.3nb1
        hs-http-client-tls>=0.3.5.3nb1
        hs-http-client>=0.7.8nb1
        hs-hslua-module-text>=0.3.0.1nb1
        hs-hslua-module-system>=0.2.2.1nb1
        hs-hslua-module-path>=0.1.0.1nb1
        hs-hslua>=1.3.0.1nb1
        hs-haddock-library>=1.10.0nb1
        hs-file-embed>=0.0.13.0nb1
        hs-emojis>=0.1nb1
        hs-doctemplates>=0.9nb1
        hs-doclayout>=0.3.0.2nb1
        hs-data-default>=0.7.1.1nb1
        hs-connection>=0.3.1nb1
        hs-commonmark-pandoc>=0.2.0.1nb1
        hs-commonmark-extensions>=0.2.0.4nb1
        hs-commonmark>=0.1.1.4nb1
        hs-citeproc>=0.3.0.9nb1
        hs-case-insensitive>=1.2.1.0nb1
        hs-blaze-markup>=0.8.2.8nb1
        hs-blaze-html>=0.9.1.2nb1
        hs-base64-bytestring>=1.2.0.1nb1
        hs-attoparsec>=0.14.1nb1
        hs-aeson-pretty>=0.8.8nb1
        hs-aeson>=1.5.6.0nb1
        hs-SHA>=1.6.4.4nb1
        hs-JuicyPixels>=3.3.5nb1
        hs-HsYAML>=0.2.1.0nb1
        hs-HTTP>=4000.3.16nb1
        hs-Glob>=0.10.1nb1
        ghc>=9.0

So it seems to me that the dependencies are registered correctly in the binary packages, butpkgin does not follow a bottom-up installation order.

@jperkin
Copy link
Contributor

jperkin commented Jul 30, 2021

Is it possible to copy this entire package set somewhere so we can just operate against it?

@0-wiz-0
Copy link
Author

0-wiz-0 commented Jul 30, 2021

Give me 30GB of space and I'll upload it.

Have you tried building pandoc and don't see this issue?

@jperkin
Copy link
Contributor

jperkin commented Jul 30, 2021

pandoc doesn't build on my NetBSD bulk build host due to ghc bugs: https://us-east.manta.joyent.com/pkgsrc/public/reports/NetBSD/trunk/x86_64/20210726.0823/ghc-9.0.1nb5/build.log

@jperkin
Copy link
Contributor

jperkin commented Jul 25, 2023

Sorry, didn't mean to trigger GitHub auto-close. While this is fixed, it's not yet released, so I'll do that when the next version is ready.

@jperkin jperkin reopened this Jul 25, 2023
@jperkin jperkin self-assigned this Jul 26, 2023
@0-wiz-0
Copy link
Author

0-wiz-0 commented Jul 27, 2023

Thank you for handling this one!

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Aug 16, 2023
## Version 23.8.0 (2023-08-16)

This is the biggest overhaul of pkgin yet!  As well as fixing many bugs, pkgin
23.8.0 runs "pkgin -n upgrade" over 2,000x faster on a test system with 12,663
packages installed compared to 22.10.0 (1.4 seconds vs over 54 minutes).

 * Large overhaul of dependency resolution code, fixing many upgrade issues,
   providing significant performance improvements, and improving code and
   logic readability.

 * Add support for SUPERSEDES.

 * Fix install and removal ordering.

 * Improve and fix handling of "keep" packages, using "pkg_add -A" to
   correctly install automatic packages rather than applying keep or unkeep
   flags afterwards.

 * Output improvements, sorting packages alphabetically and providing a
   simple progress counter.  Fix unwanted output that could end up mixed
   with package paths in "pkgin export".

 * Correct handling of +REQUIRED_BY for reverse dependencies, fixing
   DEPENDS that use alternate matches.

 * Many internal code improvements, memory leaks plugged, and compiler
   warnings eradicated.

Fixes at least the following issues:

 * NetBSDfr/pkgin#10
 * NetBSDfr/pkgin#44
 * NetBSDfr/pkgin#79
 * NetBSDfr/pkgin#95
 * NetBSDfr/pkgin#97
 * NetBSDfr/pkgin#110
 * NetBSDfr/pkgin#113
 * NetBSDfr/pkgin#128
 * NetBSD PR#51465
 * NetBSD PR#56683
@jperkin
Copy link
Contributor

jperkin commented Aug 18, 2023

Should be fixed in 23.8.0.

@jperkin jperkin closed this as completed Aug 18, 2023
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