Becram / pentoo

Automatically exported from code.google.com/p/pentoo
1 stars 0 forks source link

flushchanges: corrupts gentoo/pentoo repos #305

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I recently learned that deleted files are ignored when saving changes with 
flushchanges (tnx ZC) because of aufs/squashfs.

This effectively corrupts the local gentoo/pentoo repositories.
Example:
1. Boot into virgin LiveCD
2. run 'layman -S', then 'flushchanges'
3. reboot the LiveCD
4. run 'emerge -p pentoo-installer'
==> Error: masked by: corruption
Full output see attached file "emerge-pentoo-installer.error.log"

Reason for the error:
Files being in the repo but not in the Manifest of the ebuild.
In this case "pentoo-installer-20131013.ebuild"

I have a hacky workaround, ....

Original issue reported on code.google.com by Wuod...@gmail.com on 27 Oct 2014 at 5:49

Attachments:

GoogleCodeExporter commented 9 years ago
Here's the workaround:
1. Boot the virgin LiveCD (flushchanges never used on it)
2. sync the repos with 'emerge --sync' and 'layman -S'
3. Then run the attached script 'recreate_repo_lzm_files'
4. Then delete these files from '/mnt/cdrom/modules/':
- pentoo_overlay-20140922.lzm
- portage-20140922.lzm
5. Reboot! The deleted files were mounted!

Explanation of the script:
It creates new squashFS files for these 3 folders:
- /usr/portage
- /var/cache/edb
- /var/lib/layman

Original comment by Wuod...@gmail.com on 27 Oct 2014 at 5:56

Attachments:

GoogleCodeExporter commented 9 years ago
Yes, it IS hacky, but it seems to work here.

The tricky part was getting the paths right when creating the new squashFS 
files, so maybe this comes handy one day.

Original comment by Wuod...@gmail.com on 27 Oct 2014 at 5:58

GoogleCodeExporter commented 9 years ago
this will be accepted when the aufs modules handle whiteout properly.  I don't 
like this hack, or the fact that there will be dozens more caused by us not 
handling whitespace.

then again, use persistence properly and it should actually work fine.

Original comment by sidhayn on 27 Oct 2014 at 7:25

GoogleCodeExporter commented 9 years ago

Original comment by blshkv on 28 Oct 2014 at 12:32