And, emerge --update --deep --newuse @world doesn't update build time dependencies of binary packages. Thus, eclean-dist -d complains that there are distfiles for unavailable versions of build time dependencies of binary packages. I want eclean-dist -d to stop complaining about distfiles for missing versions of build time dependencies. Reproducible: Always
--with-bdeps controls this behaviour, see man emerge.
The thing is that --with-bdeps applies to both binary packages and source packages. `--with-bdeps y` should not apply to binary packages. `--with-bdeps n` should not apply to source packages. The value of `--with-bdeps` should change dynamically according to the merge type.
(In reply to amano.kenji from comment #2) > The thing is that --with-bdeps applies to both binary packages and source > packages. It's not really supposed to apply to source packages because build time dependencies are unconditional for those. > `--with-bdeps y` should not apply to binary packages. It's only meaningful for binary packages or installed packages, since build time dependencies are unconditional for source packages. > `--with-bdeps n` should not apply to source packages. Right, it can't, because build time dependencies are unconditional for source packages. > The value of `--with-bdeps` should change dynamically according to the merge > type. It defaults with yes for removal actions (well it's complicated see --with-bdeps-auto) and no for installation actions.
Which default options do you propose?
I don't want emerge --depclean to remove build-time dependencies of source packages. I don't know how to do that, yet.
emerge --pretend --depclean --with-debps n tries to remove dev-lang/ocaml, dev-lang/go, and other build-time dependencies of source packages.
(In reply to amano.kenji from comment #5) > I don't want emerge --depclean to remove build-time dependencies of source > packages. > > I don't know how to do that, yet. That's the default --with-bdeps=y behavior for removal actions. (In reply to amano.kenji from comment #6) > emerge --pretend --depclean --with-debps n tries to remove dev-lang/ocaml, > dev-lang/go, and other build-time dependencies of source packages. Right, so it sounds like you want the default --with-bdeps=y behavior, no?
> Right, so it sounds like you want the default --with-bdeps=y behavior, no? I want emerge --depclean --with-bdeps y for source packages. I want emerge --depclean --with-bdeps n for binary packages --depclean does not treat binary packages differently from source packages for now.
Yes, --depclean only sees installed packages and does not distinguish whether they were installed from binary packages or built from source. The installed packages are all effectively "binary" packages regardless of whether or not there was a local source build involved.
What can I do to prevent eclean-dist -d from complaining about distfiles for missing versions of build time dependencies? I don't want to delete all build-time dependencies for every package.
(In reply to amano.kenji from comment #10) > What can I do to prevent eclean-dist -d from complaining about distfiles for > missing versions of build time dependencies? Please post the specific message that eclean-dist -d emits in this case, so that we can trace it back to the code responsible for emitting it.
When I searched the eclean code these "Could not get stat info" messages were suspect: > clean.py- statinfo = os.stat(file_) > clean.py- if statinfo.st_nlink == 1: > clean.py- key_size += statinfo.st_size > clean.py- except OSError as er: > clean.py: print(pp.error("Could not get stat info for:" + file_), file=sys.stderr) > clean.py- print(pp.error("Error: %s" % str(er)), file=sys.stderr) > clean.py- return key_size > clean.py- > clean.py- def _clean_files(self, files, key, file_type): > -- > clean.py- print(pp.error("Error: %s" % str(er)), file=sys.stderr) > clean.py- break > clean.py- else: > clean.py- print( > clean.py: pp.error("Could not get stat info for:" + file_), > clean.py- file=sys.stderr, > clean.py- ) > clean.py- print(pp.error("Error: %s" % str(er)), file=sys.stderr) > clean.py- if self.controller(statinfo.st_size, key, file_, file_type): > -- > clean.py- try: > clean.py- statinfo = os.stat(fp) > clean.py- except OSError as er: > clean.py- print( > clean.py: pp.error("Could not get stat info for:" + fp), > clean.py- file=sys.stderr, > clean.py- ) > clean.py- print(pp.error("Error: %s" % str(er)), file=sys.stderr) > clean.py- clean_size += statinfo.st_size
There is nothing wrong with eclean-dist -d. It is doing its job perfectly. The issue is with emerge. emerge --update --deep --newuse @world doesn't update build-time dependencies of binary packages. emerge --depclean doesn't delete build-time dependencies of binary packages which replaced source packages. Those source packages replaced by binary packages led to installation of build-time dependencies.
Sometimes, the same software can come from a binary package. Sometimes, it can come from a source package.
(In reply to amano.kenji from comment #13) > There is nothing wrong with eclean-dist -d. It is doing its job perfectly. > > The issue is with emerge. > > emerge --update --deep --newuse @world doesn't update build-time > dependencies of binary packages. > You've been told how to make it do that.
(In reply to amano.kenji from comment #13) > There is nothing wrong with eclean-dist -d. It is doing its job perfectly. In comment #10 you said eclean-dist -d was complaining and I suspected the "Could not get stat info" message but I really don't know what message you saw. So was it the "Could not get stat info" message and if not what was the specific message?
I did not get "Could not get stat info", but I remember that eclean-dist -d complained that some distfiles were associated with missing versions of some packages. Because I cleaned them up, I will have to wait for the same messages to appear again.
> You've been told how to make it do that. I want emerge --depclean to delete build-time dependencies of binary packages specifically. Right now, that doesn't seem possible.
(In reply to amano.kenji from comment #18) > > You've been told how to make it do that. > > I want emerge --depclean to delete build-time dependencies of binary > packages specifically. > > Right now, that doesn't seem possible. Maybe if we filtered out the build-time dependencies when we download the metadata from the binhost, it would give the result you want?
(In reply to Zac Medico from comment #19) > Maybe if we filtered out the build-time dependencies when we download the > metadata from the binhost, it would give the result you want? That sounds like a solution, but it will have to be tested.
Since packages can be signed, it would be better for us to tag them in a database rather than to actually modify their metadata. We can also use this database to track which binhost they were downloaded from. We can use a binrepos.conf setting to trigger the tagging, like "bdeps = n" or something like that.
The "bdeps = n" tags can possibly be stored in the database, or we can evaluate them more dynamically if we just associate packages with binrepos in the database and use that association to dynamically generate tags from binrepos.conf. At install time, we can permanently omit the build time deps from the installed metadata, or we can possibly preserve them and support dynamic behavior for installed packages.