Cross Rootfs on Git
Nice idea to use put rootfs in Git
- init git rootfs
cd /usr/armv4tl-softfloat-linux-gnueabi git init
- .gitignore
var/cache/edb/counter var/cache/edb/vdb_blockers.pickle var/cache/edb/vdb_metadata.pickle var/db/.pkg.portage_lockfile var/cache/ldconfig/aux-cache
- adding hack for committing every package to git during emerge, etc/portage/bashrc
if [[ $EBUILD_PHASE == "clean" ]]; then cd ${ROOT} && git add . && git commit -a -m "=${CATEGORY}/${PF}"; fi - git usage
- man git
- GUI: git gui , gitk --all
- workflows
- Now you can easy return back to any git status.
- Create branches/tags, allowing you fix errors via ugly hacks, and then return and fix them correctly.
- Your...
Cross Rootfs on Git (Method 2)
I use the following to place my $ROOT under git control, it's slightly modified.
- init git rootfs
cd /usr/armv4tl-softfloat-linux-gnueabi git init
- .gitignore
var/cache/edb/counter var/cache/edb/vdb_blockers.pickle var/cache/edb/vdb_metadata.pickle var/db/.pkg.portage_lockfile var/cache/ldconfig/aux-cache tmp/*
- adding hack for committing every package to git during emerge, etc/portage/bashrc (This also executes cross_fix_root and etc-update prior to add/commit)
if [[ $EBUILD_PHASE == "postinst" ]]; then # This is the cross-fix-root from http://gentoo.mindzoo.de [[ $EMERGE_FROM != binary ]] && cross_fix_root ${CHOST} # This ensures that etc-update is handled before we do git commits ROOT=${ROOT} etc-update # This removes the /usr/share/gtk-doc directory rm -rf ${ROOT}/usr/share/gtk-doc # This commits newly installed packages to git for tracking cd ${ROOT} && git add . && git commit -a -m "=${CATEGORY}/${PF}, `date`"; fi
The modified version above does the submit only during portinst, executing during clean stage had the add and commit being run twice in most packages, and was resulting in a very large git archive.
