Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
emerge --depclean wants to remove package installed recently
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
rzdndr
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2024
Posts: 77

PostPosted: Wed Jul 31, 2024 12:19 pm    Post subject: emerge --depclean wants to remove package installed recently Reply with quote

Hello,

I have installed libreoffice (not the bin version). The installation finished without problems and have run libreoffice to check if it is working.

I then wanted to update my system and did these.

Code:

emerge --sync
emerge -auUDNv --with-bdeps=y @world (**** installed 6 more packages ****)
emerge --ask --depclean


The emerge --depclean wants to uninstall the libreoffice package besides other packages.

Quote:
Code:

 * Always study the list of packages to be cleaned for any obvious
 * mistakes. Packages that are part of the world set will always
 * be kept.  They can be manually added to this set with
 * `emerge --noreplace <atom>`.  Packages that are listed in
 * package.provided (see portage(5)) will be removed by
 * depclean, even if they are part of the world set.
 *
 * As a safety measure, depclean will not remove any packages
 * unless *all* required dependencies have been resolved.  As a
 * consequence of this, it often becomes necessary to run
 * `emerge --update --newuse --deep @world` prior to depclean.

Calculating dependencies... done!
>>> Calculating removal order...

>>> These are the packages that would be unmerged:

...

 app-office/libreoffice
    selected: 24.2.4.2-r1
   protected: none
     omitted: none

...

All selected packages: =dev-libs/redland-1.0.17-r3 =dev-libs/libatasmart-0.19_p5 =app-text/libabw-0.1.3 =dev-python/pycairo-1.26.1 =dev-cpp/libcmis-0.6.2 =app-text/libwps-0.4.14 =app-text/libwpd-0.10.3 =media-libs/libfreehand-0.1.2-r1 =media-libs/zxing-cpp-2.2.1 =dev-util/cppunit-1.15.1-r3 =dev-libs/xmlsec-1.3.3-r1 =app-text/mythes-1.2.5 =app-office/libreoffice-l10n-24.2.4.2 =app-text/evince-45.0 =acct-user/libreoffice-0-r1 =app-text/libnumbertext-1.0.11 =dev-libs/libixion-0.19.0 =app-crypt/argon2-20190702-r1 =gui-libs/libhandy-1.8.3 =games-engines/box2d-2.4.1 =media-libs/libzmf-0.0.2-r1 =app-text/libodfgen-0.1.8 =dev-cpp/clucene-2.3.3.4-r9 =app-text/libmspub-0.1.4 =dev-libs/libbytesize-2.10 =dev-libs/libcdio-2.1.0-r2 =dev-perl/Archive-Zip-1.680.0 =app-text/libwpg-0.3.4 =dev-libs/hyphen-2.8.8-r2 =gnome-base/gvfs-1.52.2 =net-libs/libsoup-3.4.4 =dev-libs/libgudev-238-r1 =sys-fs/cryptsetup-2.7.2 =app-text/liblangtag-0.6.7 =dev-libs/rasqal-0.9.33-r2 =sys-apps/gptfdisk-1.0.9-r3 =sys-fs/lvm2-2.03.22-r5 =media-libs/libcdr-0.1.7 =app-eselect/eselect-cdparanoia-0.1-r1 =app-arch/zip-3.0-r7 =sci-mathematics/lpsolve-5.5.2.11-r2 =sys-libs/libnvme-1.9 =dev-python/pygobject-3.46.0-r1 =media-libs/glm-1.0.1 =sys-block/parted-3.6-r2 =app-text/libqxp-0.0.2 =app-arch/rpm2targz-2021.03.16 =app-text/libstaroffice-0.0.7 =dev-util/mdds-2.1.1 =sci-libs/suitesparseconfig-5.4.0 =media-gfx/fontforge-20230101-r2 =app-text/libepubgen-0.1.1-r1 =dev-util/itstool-2.0.7-r2 =media-libs/libpagemaker-0.0.4-r1 =dev-libs/liborcus-0.19.2 =dev-libs/appstream-glib-0.8.2 =sci-libs/colamd-2.9.6 =acct-group/libreoffice-0-r1 =dev-libs/librevenge-0.0.5 =media-libs/libvisio-0.1.7 =sys-libs/libblockdev-3.0.4 =app-crypt/mhash-0.9.9.9-r3 =app-text/libetonyek-0.1.10-r2 =app-text/libebook-0.1.3-r3 =app-text/libmwaw-0.3.22 =sys-fs/udisks-2.10.1 =app-office/libreoffice-24.2.4.2-r1 =dev-db/unixODBC-2.3.12 =dev-libs/libcdio-paranoia-2.0.1 =sys-apps/keyutils-1.6.3-r1 =dev-db/mariadb-connector-c-3.2.7 =dev-lang/swig-4.2.1 =media-libs/raptor-2.0.15-r8 =app-text/libexttextcat-3.4.7

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.

Would you like to unmerge these packages? [Yes/No]


Why would this want to do that?

Regards
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2162

PostPosted: Wed Jul 31, 2024 12:38 pm    Post subject: Reply with quote

What does

Code:
grep libreoffice /var/lib/portage/world


say?

p.s. U and N don't make sense. U is a subset of N. If you aren't building binary packages, better drop N, it may cause unnecessary rebuilds.

Best Regards,
Georgi
Back to top
View user's profile Send private message
rzdndr
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2024
Posts: 77

PostPosted: Wed Jul 31, 2024 12:39 pm    Post subject: Reply with quote

logrusx wrote:
What does

Code:
grep libreoffice /var/lib/portage/world


say?

Best Regards,
Georgi


Its is empty.
Back to top
View user's profile Send private message
rzdndr
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2024
Posts: 77

PostPosted: Wed Jul 31, 2024 12:42 pm    Post subject: Reply with quote

logrusx wrote:
What does

Code:
grep libreoffice /var/lib/portage/world


say?

p.s. U and N don't make sense. U is a subset of N. If you aren't building binary packages, better drop N, it may cause unnecessary rebuilds.

Best Regards,
Georgi


I have build binary package. One if firefox-bin, the other is gradle-bin.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2162

PostPosted: Wed Jul 31, 2024 12:43 pm    Post subject: Reply with quote

Could you check the file itself has something in it?

If not, then did you emerge libreoffice with -1 of --oneshot? Or did you run emerge --deselect lireoffice?

Best Regards,
Georgi
Back to top
View user's profile Send private message
eeckwrk99
Apprentice
Apprentice


Joined: 14 Mar 2021
Posts: 204
Location: Gentoo forums

PostPosted: Wed Jul 31, 2024 12:43 pm    Post subject: Reply with quote

rzdndr wrote:
logrusx wrote:
What does

Code:
grep libreoffice /var/lib/portage/world


say?

Best Regards,
Georgi


Its is empty.


In this case,
Code:
# emerge --noreplace app-office/libreoffice

should do the trick.
Back to top
View user's profile Send private message
rzdndr
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2024
Posts: 77

PostPosted: Wed Jul 31, 2024 12:47 pm    Post subject: Reply with quote

logrusx wrote:
Could you check the file itself has something in it?

If not, then did you emerge libreoffice with -1 of --oneshot? Or did you run emerge --deselect lireoffice?

Best Regards,
Georgi


Yes cat /var/lib/portage/word has content.

I have been building libreoffice using ebuild, after I have stopped the emerge build. Can this be the problem. But I did "ebuild <ebuild-file> merge" which installed the package. I could even run libreoffice, and it started. It spawned realy fast. Was not expecting that quick of an action.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2162

PostPosted: Wed Jul 31, 2024 12:47 pm    Post subject: Reply with quote

eeckwrk99 wrote:


In this case,
Code:
# emerge --noreplace app-office/libreoffice

should do the trick.


The real question is why this happened.

Best Regards,
Georgi
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2162

PostPosted: Wed Jul 31, 2024 12:50 pm    Post subject: Reply with quote

rzdndr wrote:
But I did "ebuild <ebuild-file> merge" which installed the package.


To my memory it should have recorded it in world, but I might be wrong. In this case follow the advice of eeckwrk99.

p.s. that's one reason I prefer keepwork over ebuild command in your other thread.

Best Regards,
Georgi
Back to top
View user's profile Send private message
rzdndr
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2024
Posts: 77

PostPosted: Wed Jul 31, 2024 12:50 pm    Post subject: Reply with quote

logrusx wrote:
eeckwrk99 wrote:


In this case,
Code:
# emerge --noreplace app-office/libreoffice

should do the trick.


The real question is why this happened.

Best Regards,
Georgi


It might be because the way I installed it? With ebuild to resume operation. But it merged fine, have seen messages of the install.
Back to top
View user's profile Send private message
rzdndr
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2024
Posts: 77

PostPosted: Wed Jul 31, 2024 12:52 pm    Post subject: Reply with quote

logrusx wrote:
rzdndr wrote:
But I did "ebuild <ebuild-file> merge" which installed the package.


To my memory it should have recorded it in world, but I might be wrong. In this case follow the advice of eeckwrk99.

p.s. that's one reason I prefer keepwork over ebuild command in your other thread.

Best Regards,
Georgi


Yes, Since I did start the emerge and continued with the ebuild on monday, I did not want to start from scratch.

I think after I do a noreplace to the package, it will be fine I believe?

I will be using keepwork for other packages.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2162

PostPosted: Wed Jul 31, 2024 12:56 pm    Post subject: Reply with quote

rzdndr wrote:

I think after I do a noreplace to the package, it will be fine I believe?


Yes. --noreplace instructs emerge to record it in world.

Best Regards,
Georgi
Back to top
View user's profile Send private message
rzdndr
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2024
Posts: 77

PostPosted: Wed Jul 31, 2024 1:16 pm    Post subject: Reply with quote

It turns out for two packages that I have used ebuild, the packages were not recorded in the world list. One of these was libreoffice. The other was evince, which I wanted to test ebuild with.

So I will be using keepwork for my next packages.

Thank you all for your answers.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2162

PostPosted: Wed Jul 31, 2024 1:58 pm    Post subject: Reply with quote

rzdndr wrote:
It turns out for two packages that I have used ebuild, the packages were not recorded in the world list. One of these was libreoffice. The other was evince, which I wanted to test ebuild with.

So I will be using keepwork for my next packages.

Thank you all for your answers.


It's a mystery for me why ebuild merge didn't record it in world. It should have done so.

Code:
# equery list  gnome-pomodoro
!!! No installed packages matching 'gnome-pomodoro'
 * Searching for gnome-pomodoro ...
# ebuild gnome-pomodoro-0.24.2.ebuild merge
 * gnome-pomodoro-0.24.2.tar.gz BLAKE2B SHA512 size ;-) ...                                                                                                                                                  [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                                                                                         [ ok ]
 * checking miscfile checksums ;-) ...                                                                   
...
>>> /usr/lib64/libgnome-pomodoro.so -> libgnome-pomodoro.so.0
 * Updating GSettings schemas ...                                                                                                                                                                            [ ok ]
 * Updating .desktop files database ...                                                                                                                                                                      [ ok ]
 * Updating icons cache ...                                                                                                                                                                                  [ ok ]
>>> gnome-extra/gnome-pomodoro-0.24.2 merged.
>>> Regenerating /etc/ld.so.cache...
# equery list  gnome-pomodoro
 * Searching for gnome-pomodoro ...
[I-O] [  ] gnome-extra/gnome-pomodoro-0.24.2:0


Gnome-pomodoro is an ebuild I wrote and maintain in my overlay. Ebuild merge has always merged it into the system, which means it should have recorded it in world too. I have no clue why it may have not recorded it in world. Are you sure you weren't running the old version of it thinking it was the new?

What ebuild command did you use?

Best Regards,
Georgi
Back to top
View user's profile Send private message
rzdndr
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2024
Posts: 77

PostPosted: Wed Jul 31, 2024 2:29 pm    Post subject: Reply with quote

logrusx wrote:
rzdndr wrote:
It turns out for two packages that I have used ebuild, the packages were not recorded in the world list. One of these was libreoffice. The other was evince, which I wanted to test ebuild with.

So I will be using keepwork for my next packages.

Thank you all for your answers.


It's a mystery for me why ebuild merge didn't record it in world. It should have done so.

Code:
# equery list  gnome-pomodoro
!!! No installed packages matching 'gnome-pomodoro'
 * Searching for gnome-pomodoro ...
# ebuild gnome-pomodoro-0.24.2.ebuild merge
 * gnome-pomodoro-0.24.2.tar.gz BLAKE2B SHA512 size ;-) ...                                                                                                                                                  [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                                                                                         [ ok ]
 * checking miscfile checksums ;-) ...                                                                   
...
>>> /usr/lib64/libgnome-pomodoro.so -> libgnome-pomodoro.so.0
 * Updating GSettings schemas ...                                                                                                                                                                            [ ok ]
 * Updating .desktop files database ...                                                                                                                                                                      [ ok ]
 * Updating icons cache ...                                                                                                                                                                                  [ ok ]
>>> gnome-extra/gnome-pomodoro-0.24.2 merged.
>>> Regenerating /etc/ld.so.cache...
# equery list  gnome-pomodoro
 * Searching for gnome-pomodoro ...
[I-O] [  ] gnome-extra/gnome-pomodoro-0.24.2:0


Gnome-pomodoro is an ebuild I wrote and maintain in my overlay. Ebuild merge has always merged it into the system, which means it should have recorded it in world too. I have no clue why it may have not recorded it in world. Are you sure you weren't running the old version of it thinking it was the new?

What ebuild command did you use?

Best Regards,
Georgi


I have also seen a message where it says Regenerating /etc/ld.so.cache....

But this beats me at the moment.

I have used ebuild <pkg-name> compile since I stoped it at the compile stage. Then ebuild <pkg-name> merge where it said that it regenerated the ld.so.cache.

I could have saved one command and issued the merge command instead, but did not feel appropriate at that time.
Back to top
View user's profile Send private message
Chiitoo
Administrator
Administrator


Joined: 28 Feb 2010
Posts: 2670
Location: Here and Away Again

PostPosted: Wed Jul 31, 2024 5:42 pm    Post subject: Reply with quote

As far as I know, and after a quick test, it seems to me that "ebuild <ebuild-file> merge" in fact does /not/ record packages into the 'world' file... which is good, I think, because otherwise I'd have quite a lot of entries there that I wouldn't want to be there. ^^;
_________________
Kindest of regardses.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2162

PostPosted: Wed Jul 31, 2024 5:48 pm    Post subject: Reply with quote

Chiitoo wrote:
As far as I know, and after a quick test, it seems to me that "ebuild <ebuild-file> merge" in fact does /not/ record packages into the 'world' file... which is good, I think, because otherwise I'd have quite a lot of entries there that I wouldn't want to be there. ^^;


Actually I have been making a mistake here. I've been checking with equery which correctly reports the package being installed, but that does not mean it's in world. So I'm wrong, ebuild merge does not record it in world and that's the answer to OP.

Best Regards,
Georgi
Back to top
View user's profile Send private message
eschwartz
Developer
Developer


Joined: 29 Oct 2023
Posts: 132

PostPosted: Wed Jul 31, 2024 9:51 pm    Post subject: Reply with quote

`ebuild ... merge` is a low-level tool and doesn't install DEPEND for you either -- it is hardly surprising that it also doesn't add packages to your world file.

Would be kind of awkward to try using low-level tooliing to test packages, if every time you did, it added the package to your world file and you had to deselect it again. :)

Adding libreoffice *once* to your world file suffices, it is fine to use the ebuild command instead of FEATURES=keepwork if you like.
Back to top
View user's profile Send private message
rzdndr
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2024
Posts: 77

PostPosted: Thu Aug 01, 2024 7:22 am    Post subject: Reply with quote

Chiitoo wrote:
As far as I know, and after a quick test, it seems to me that "ebuild <ebuild-file> merge" in fact does /not/ record packages into the 'world' file... which is good, I think, because otherwise I'd have quite a lot of entries there that I wouldn't want to be there. ^^;


So this is default behavior, good to know.
Back to top
View user's profile Send private message
rzdndr
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2024
Posts: 77

PostPosted: Thu Aug 01, 2024 7:24 am    Post subject: Reply with quote

eschwartz wrote:
`ebuild ... merge` is a low-level tool and doesn't install DEPEND for you either -- it is hardly surprising that it also doesn't add packages to your world file.

Would be kind of awkward to try using low-level tooliing to test packages, if every time you did, it added the package to your world file and you had to deselect it again. :)

Adding libreoffice *once* to your world file suffices, it is fine to use the ebuild command instead of FEATURES=keepwork if you like.


But keepwork will be better. I can clean up afterwards the tmp directories. I have also written a script that will just do that, taking into account any emerges that are in progress.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2162

PostPosted: Thu Aug 01, 2024 9:13 am    Post subject: Reply with quote

I think I should clarify you should not use keepwork all the time. Use it only to resume a terminated ebuild. It does not need to be started with keepwork enabled, it just needs to be resumed with it. Emerge won't clean anything on termination, only on successful emerge and normal emerge startup (of that same package). If you want it to not clean up on the next start of the same package, then you need to pass FEATURES="keepwork" on the command line. Do not put it in make.conf, that's a recipe for problems. My advice is as soon as it completes the terminated package, to break again, clean up and resume normally.

Ideally you should use those only to fix unwanted situations. And if you use the binhost, most of the time you wouldn't even need to think about them.

Best Regards,
Georgi
Back to top
View user's profile Send private message
rzdndr
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2024
Posts: 77

PostPosted: Thu Aug 01, 2024 9:31 am    Post subject: Reply with quote

logrusx wrote:
I think I should clarify you should not use keepwork all the time. Use it only to resume a terminated ebuild. It does not need to be started with keepwork enabled, it just needs to be resumed with it. Emerge won't clean anything on termination, only on successful emerge and normal emerge startup (of that same package). If you want it to not clean up on the next start of the same package, then you need to pass FEATURES="keepwork" on the command line. Do not put it in make.conf, that's a recipe for problems. My advice is as soon as it completes the terminated package, to break again, clean up and resume normally.

Ideally you should use those only to fix unwanted situations. And if you use the binhost, most of the time you wouldn't even need to think about them.

Best Regards,
Georgi


Thanks for the clarification. Will use keepwork when package install was aborted to make it resume. If the merge compleeted with keepwork, will remove the pacakges from the PORTAGE_TMPDIR.

I will not put this in my make.conf. It should not be global. And there is also warnings in the documentation, I believe. Remember reading that.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum