Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

How make emerge ignore packages basing on date?

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
11 posts • Page 1 of 1
Author
Message
ayvango
Tux's lil' helper
Tux's lil' helper
Posts: 118
Joined: Wed Feb 08, 2012 1:11 pm

How make emerge ignore packages basing on date?

  • Quote

Post by ayvango » Wed Oct 31, 2018 1:22 pm

I tried to to emerge -e --keep-going world, but it failed half-way with a package and couldn't keep-going since it detected some sort of conflict. That is not the first time when keep-going fell down on the job, but normally I just repeat the last command and portage manages to continue the build. In cast of -e entire world rebuilding it is really exhausting to rebuild world many times.

Is it possible to make emerge look into the date on /var/db/pkg and skip package building if it is newer then supplied? If there is no such built-in option, could there be some dirty hacks?
Top
freke
Veteran
Veteran
Posts: 1136
Joined: Thu Jan 23, 2003 3:17 pm
Location: Somewhere in Denmark
Contact:
Contact freke
Website

  • Quote

Post by freke » Wed Oct 31, 2018 1:49 pm

Doesn't

Code: Select all

emerge --resume
work for you?
Top
ayvango
Tux's lil' helper
Tux's lil' helper
Posts: 118
Joined: Wed Feb 08, 2012 1:11 pm

  • Quote

Post by ayvango » Wed Oct 31, 2018 1:51 pm

nope. It shows the same dependency resolution error as keep-going.

Code: Select all

 * The resume list contains packages that are either masked or have
 * unsatisfied dependencies. Please restart/continue the operation
 * manually, or use --skipfirst to skip the first package in the list and
 * any other packages that may be masked or have missing dependencies.
Top
John R. Graham
Administrator
Administrator
User avatar
Posts: 10894
Joined: Tue Mar 08, 2005 3:39 pm
Location: Somewhere over Winder, Georgia, USA

  • Quote

Post by John R. Graham » Wed Oct 31, 2018 2:20 pm

"emerge --emptytree @world" will generally work reliably if your system is up to date and conflict free before you run it. That means you need to run

Code: Select all

emerge --update --deep --changed-use --with-bdeps=y @world
and also follow any recommended preserved rebuild and --depclean instructions. Once your system is fully up to date and clean, try the --emptytree emerge again. ;)

If this is not true for you, then actual error messages will help.

- John
I can confirm that I have received between 0 and 499 National Security Letters.
Top
ayvango
Tux's lil' helper
Tux's lil' helper
Posts: 118
Joined: Wed Feb 08, 2012 1:11 pm

  • Quote

Post by ayvango » Wed Oct 31, 2018 2:37 pm

John R. Graham wrote:"emerge --emptytree @world" will generally work reliably if your system is up to date and conflict free before you run it.
Well, in my case error were caused by side info unavailable for the portage system.

sci-libs/hdf5 was rebuilding to the same version and use flags as it were previously installed, but failed.
after that I manually rebuild sys-claster/openmpi to the same version and use flags as it were previously installed
after that sci-liubs/hdf5 successfully emerged

ergo, portage could not catch all side-effects presented by packages. I believe this is the reason for the emptytree option existence: to rebuild all packages and redo all side effects that portage could not handle otherwise. This is exactly my case: I'm performing emerge -e as it was recommended for the profile update.

you have too many faith in portage. Actually it is not so good abstraction and leaks everywhere.

I expect that fast-patching portage to ignore packages would cost less time than rebuilding entire world many times. Now I'm skimming through sources to find function that calls actual package build and patch it. Could you point me any direction for my search?
Top
Hu
Administrator
Administrator
Posts: 24380
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Thu Nov 01, 2018 1:08 am

If you are that determined to bypass the package manager, would it not be simpler to enumerate all packages that need to be rebuilt, then use emerge --oneshot $(< enumerated-package-list )? This will ask Portage to rebuild all of them, and not add them to world. It will still respect dependency ordering, and it lets you include or exclude packages at will.
Top
Ant P.
Watchman
Watchman
Posts: 6920
Joined: Sat Apr 18, 2009 7:18 pm
Contact:
Contact Ant P.
Website

  • Quote

Post by Ant P. » Thu Nov 01, 2018 2:54 am

List of all packages that were last emerged at or before another given package:

Code: Select all

PKG=$(portageq best_version / sys-libs/zlib) # example
find /var/db/pkg/ -mindepth 2 -maxdepth 2 -! -newer /var/db/pkg/$PKG -printf '=%P\n'
As always, this information is provided without warranty.
Top
ayvango
Tux's lil' helper
Tux's lil' helper
Posts: 118
Joined: Wed Feb 08, 2012 1:11 pm

  • Quote

Post by ayvango » Thu Nov 01, 2018 6:34 pm

I have similar thoughts. Using find is not a problem, but how could I hack emerge to take that list into consideration. The ideal case it to hook function that does actual package building and omit it if some conditions is met. I looked inside the portage sources, but give up to locate expected procedure. Portage is too asynchronous and OOP to navigate through it with ease.
Top
Hu
Administrator
Administrator
Posts: 24380
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Fri Nov 02, 2018 1:48 am

Why are you hacking emerge at all? I told you how to invoke emerge with the package list in a file named enumerated-package-list, and Ant P. showed you how to generate the package list. No code changes are required. Use his command to generate a list of packages. Review it. If it satisfies your requirements, run emerge --oneshot and pass as command line arguments the list generated by his command.
Top
ayvango
Tux's lil' helper
Tux's lil' helper
Posts: 118
Joined: Wed Feb 08, 2012 1:11 pm

  • Quote

Post by ayvango » Fri Nov 02, 2018 4:07 pm

Ant. P. generates already installed list. But I'd like to get resolved list in the correct order from the emerge.

But in any case I get obsessed with strange ideas, when solution could be rather simple. Just make emerge --pretend generate list of packages and use bash for loop to install each packet in given order.
Top
Genone
Retired Dev
Retired Dev
User avatar
Posts: 9656
Joined: Fri Mar 14, 2003 6:02 pm
Location: beyond the rim

  • Quote

Post by Genone » Mon Nov 05, 2018 10:01 am

https://dev.gentoo.org/~zmedico/portage ... 03s12.html
Top
Post Reply

11 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy