Ticket #131 (new defect)

Opened 11 months ago

Last modified 8 months ago

gracefully handle mount ro partitions

Reported by: mjrosenb@… Owned by:
Priority: normal Milestone:
Component: pkgcore Version:
Keywords: Cc:

Description

seems like pkgcore attempts to remove /etc when purging files in /etc, then it dies because / is ro, even though /etc doesn't need to be removed. backtrace:

Replacing app-portage/eix-0.10.2 with app-portage/eix-0.10.3 dir:/usr dir:/usr/bin dir:/usr/share dir:/usr/share/doc dir:/usr/share/doc/eix-0.10.3 dir:/usr/share/man dir:/usr/share/man/man1 file:/usr/bin/diff-eix file:/usr/bin/eix-sync file:/usr/share/doc/eix-0.10.3/TODO.gz file:/usr/bin/eix file:/usr/bin/update-eix-functions.sh file:/usr/share/doc/eix-0.10.3/ChangeLog.gz file:/usr/share/man/man1/eix.1.gz file:/usr/bin/update-eix-remote file:/usr/bin/update-eix file:/usr/bin/update-eix-layman file:/usr/bin/eix-test-obsolete file:/usr/share/doc/eix-0.10.3/AUTHORS.gz

<<< file:/usr/share/doc/eix-0.10.2/TODO.gz <<< file:/usr/share/doc/eix-0.10.2/AUTHORS.gz <<< file:/usr/share/doc/eix-0.10.2/ChangeLog.gz <<< file:/etc/eixrc Traceback (most recent call last):

File "/usr/bin/pmerge", line 36, in <module>

commandline.main(subcommands)

File "/usr/lib64/python2.5/site-packages/pkgcore/util/commandline.py", line 401, in main

exitstatus = main_func(options, out, err)

File "/usr/lib64/python2.5/site-packages/pkgcore/scripts/pmerge.py", line 568, in main

ret = i.finish()

File "/usr/lib64/python2.5/site-packages/snakeoil/dependant_methods.py", line 26, in ensure_deps

r = getattr(self, dep).raw_func(*a, **kw)

File "/usr/lib64/python2.5/site-packages/pkgcore/interfaces/repo.py", line 244, in remove

x()

File "/usr/lib64/python2.5/site-packages/pkgcore/merge/engine.py", line 277, in execute_hook

trigger(self, self.csets)

File "/usr/lib64/python2.5/site-packages/pkgcore/merge/triggers.py", line 120, in call

return self.trigger(engine, *self._get_csets(required_csets, csets))

File "/usr/lib64/python2.5/site-packages/pkgcore/merge/triggers.py", line 396, in trigger

return op(unmerging_cset, callback=engine.observer.removing_fs_obj)

File "/usr/lib64/python2.5/site-packages/pkgcore/fs/ops.py", line 310, in unmerge_contents

os.rmdir(x.location)

Change History

comment:1 Changed 9 months ago by ferringb

Not sure of how best to handle this- the rmdir attempt is fine (it's expected it'll fail if there are entries remaining), but specifically, not sure how best to tell pkgcore that "yes, some stuff is RO- this is fine".

Suggestions welcome- I'm uncomfortable w/ the notion of making it ignore RO in general though.

comment:2 Changed 9 months ago by ferringb

  • summary changed from pkgcore-0.3.4 improperly fails with / mounted ro to gracefully handle mount ro partitions
Note: See TracTickets for help on using tickets.