Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] What are all the zero-length files in binpkgs?
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
lars_the_bear
Guru
Guru


Joined: 05 Jun 2024
Posts: 522

PostPosted: Tue Jun 25, 2024 8:25 am    Post subject: [Solved] What are all the zero-length files in binpkgs? Reply with quote

Hi folks

I'm trying to consolidate all the binary packages I built myself on various computers, into a single place, so I can make sure I have everything in my private binhost.

I copied all the packages to one computer's /var/cache/binpkgs, and then ran 'emaint binhost --fix', which I understand will rebuild the `Packages` file.

But `emaint` spat out a load of error messages about 'invalid binary package'. These messages turned out to correspond to `.gpkg.tar` files that are empty. I have a stack of these on all my machines, in the /var/cache/binpkgs directory.

I think this situation arises when a later version of a package gets built. In a package directory with multiple versions of the package, all but the latest `.gpkg.tar` is zero-length. I also have a bunch of `.partial` files, most of which are empty.

Is it normal to have all these zero-length files? Or have I been doing something wrong? Can I just delete them, so `emaint` stops complaining?

BR, Lars.


Last edited by lars_the_bear on Wed Jun 26, 2024 8:37 am; edited 1 time in total
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20485

PostPosted: Tue Jun 25, 2024 12:51 pm    Post subject: Reply with quote

Are you using FEATURES=buildpkg ?

If so, I don't think you should be seeing either 0 length files of that name or partial's. Are you syncing other binpkgs from other systems, or does this machine only have it's own binary packages?
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
lars_the_bear
Guru
Guru


Joined: 05 Jun 2024
Posts: 522

PostPosted: Tue Jun 25, 2024 1:58 pm    Post subject: Reply with quote

pjp wrote:
Are you using FEATURES=buildpkg ?

If so, I don't think you should be seeing either 0 length files of that name or partial's. Are you syncing other binpkgs from other systems, or does this machine only have it's own binary packages?


Thanks. I'm not using FEATURES=buildpkg, although I would have done, had I known about it. I do have FEATURES=getbinpkg, so some of the binaries on this system would have come from Gentoo binhosts. The problem is present on the first machine I installed, which I'm using to provide a binhost for all the others. This machine did not have any binhost except the Gentoo one.

Just for example, the `/var/cache/binpkgs/app-alternatives/cpio` directory looks like this:

-rw-r--r-- 1 root root 0 Jun 7 11:14 cpio-0-1.gpkg.tar
-rw-r--r-- 1 root root 20480 Mar 18 11:53 cpio-0-1.gpkg.tar.partial
-rw-r--r-- 1 root root 0 Jun 7 11:16 cpio-0-2.gpkg.tar
-rw-r--r-- 1 root root 20480 Mar 18 11:53 cpio-0-2.gpkg.tar.partial
-rw-r--r-- 1 root root 0 Jun 7 11:18 cpio-0-3.gpkg.tar
-rw-r--r-- 1 root root 20480 Mar 18 11:53 cpio-0-3.gpkg.tar.partial
-rw-r--r-- 1 root root 0 Jun 7 11:22 cpio-0-4.gpkg.tar
-rw-r--r-- 1 root root 20480 Mar 18 11:53 cpio-0-4.gpkg.tar.partial
-rw-r--r-- 1 root root 0 Jun 7 11:23 cpio-0-5.gpkg.tar
-rw-r--r-- 1 root root 20480 Mar 18 11:53 cpio-0-5.gpkg.tar.partial
-rw-r--r-- 1 root root 0 Jun 7 11:30 cpio-0-6.gpkg.tar
-rw-r--r-- 1 root root 20480 Mar 18 11:53 cpio-0-6.gpkg.tar.partial
-rw-r--r-- 1 root root 20480 Mar 18 11:53 cpio-0-7.gpkg.tar

However, at least fifty directories show the same pattern.

I have no idea what any of this means. Can the '.partial' files actually be used? Are are they just broken? And, if they're just broken, can I delete them?

I don't think I've done anything odd -- just a bunch of `emerge` operations. It's plausible (well, actually, certain) that I ctrl-c'd quite a few emerge operations that seemed to be taking too long. I don't know if that's relevant.

None of this seems to be breaking anything -- I think `emaint` is building the Packages file correctly, despite all its error messages. I just need to know whether it's safe to delete all this stuff.

BR, Lars.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2436

PostPosted: Tue Jun 25, 2024 2:07 pm    Post subject: Reply with quote

lars_the_bear wrote:
It's plausible (well, actually, certain) that I ctrl-c'd quite a few emerge operations that seemed to be taking too long. I don't know if that's relevant.


Next time

Code:
tail -f /var/log/emerge-fetch.log


before you hit CTRL+C because you think it's taking too long.

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


Joined: 29 Oct 2023
Posts: 228

PostPosted: Tue Jun 25, 2024 6:51 pm    Post subject: Reply with quote

.partial files are created by FEATURES=getbinpkg, when downloading remote files. They can happen if you ever interrupt emerge via CTRL+C while it is silently downloading lots of files in the background, and never end up fully downloading those binpackages.

empty .gpkg.tar files are reserved by portage when using FEATURES=buildpkg. They are created due to https://bugs.gentoo.org/900226

Both can be freely deleted as they are effectively useless. The latter is actually a portage bug.
Back to top
View user's profile Send private message
lars_the_bear
Guru
Guru


Joined: 05 Jun 2024
Posts: 522

PostPosted: Wed Jun 26, 2024 8:34 am    Post subject: Reply with quote

Thanks. Conceivably some of the ctrl-c's I've done on emerge have been for my own .ebuild scripts. I mean, I don't see any point letting them run to completion, if they've already failed. But I wouldn't expect that to affect binaries apart from my own -- it seems odd to me, the pattern of packages that have zero-length files.

Oh, well. I've just deleted them.

BR, Lars.
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