Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am working on a ship so once at sea I have no internet. The idea is to clone the complete git repository so that I can still install software when offine. I am using apt-mirror with debian which works great. I am looking to do something similiar with gentoo.

share|improve this question

1 Answer 1

I don’t know a whole lot about funtoo but I assume it is similar to Gentoo.

The main problem you’ll face is that gentoo/funtoo repositories hardly ever store the source codes, only the metadata (which tells you where to download it). Once offline, if you don’t have the source codes, you can’t install the program

Luckily, portage lets you fetch a program source code (or data) via emerge -f <package>, so using this, you could fetch the data of each ebuilds. This is gonna take a lot of space and a lot of time, but here is how you could go:

cd /usr/portage

# for every ebuild, convert its path into a valid atom name
find . -iname "*.ebuild" | sed -e 's_\./\([^/]\+\)/\([^/]\+\)/\(.*\).ebuild$_=\1/\3_g' > /tmp/all_ebuilds

# for every line of the file, start fetching the source code (or the data)
while read package; do emerge -f "$package"; done < /tmp/all_ebuilds

This is not a complete solution, but I hope it gives you an idea on how to do it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.