First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 132180
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Catalyst Developers <catalyst@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Jonas Bernoulli <jonas@artavatar.org>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 132180 depends on: Show dependency tree
Bug 132180 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-05-03 16:13 0000
i try to create a stage1 using this specfile:

subarch: i686
version_stamp: artavatar.a
target: stage1
rel_type: default
profile: default-linux/x86/2006.0/artavatar.a
snapshot: 20060504
source_subpath: gentoo/stage3-i686-2006.0

but catalyst2 (2.0_rc45) failes to cleanup some folders in sequence "clean". is
 `rm' called without options -rf?

Running action sequence: clean
<...>
rm: cannot remove `./tmp/default/stage1-i686-artavatar.a': Is a directory
rm: cannot remove
`./tmp/portage/portage/profiles/default-linux/x86/2006.0/artavatar.a': Is a
directory
rm: cannot remove
`./tmp/portage/portage/profiles/default-linux/x86/2006.0/artavatar.a/artavatar.server.a':
Is a directory
rm: cannot remove `./packages/default/stage1-i686-artavatar.a': Is a directory
rm: cannot remove `./sources/portageconfs/artavatar.a': Is a directory
rm: cannot remove
`./snapshot_cache/20060504/portage/profiles/default-linux/x86/2006.0/artavatar.a':
Is a directory
rm: cannot remove
`./snapshot_cache/20060504/portage/profiles/default-linux/x86/2006.0/artavatar.a/artavatar.server.a':
Is a directory
rm: cannot remove `./kerncache/default/stage1-i686-artavatar.a': Is a directory

!!! catalyst: clean script failed.


Catalyst aborting....

------- Comment #1 From Jonas Bernoulli 2006-05-04 04:01:19 0000 -------
this is the function in question i believe:
(starting line 930 in /usr/lib/catalyst2/modules/generic_stage_target.py)

        def clean(self):
                print self.settings["cleanables"]

                if self.settings.has_key("AUTORESUME") \
                        and
os.path.exists(self.settings["autoresume_path"]+"clean"):
                        print "Resume point detected, skipping clean
operation..."
                else:
                    for x in self.settings["cleanables"]: 
                            print "Cleaning chroot: "+x+"... "
                            cmd("rm -rf "+self.settings["destpath"]+x,"Couldn't
clean "+x,env=self.env)

                    <...>

                    if os.path.exists(self.settings["controller_file"]):
                        cmd("/bin/bash "+self.settings["controller_file"]+"
clean","clean script failed.",env=self.env)
                        touch(self.settings["autoresume_path"]+"clean")

and this is the line where folder/files get removed:

cmd("rm -rf "+self.settings["destpath"]+x,"Couldn't clean "+x,env=self.env)

this seams okay (should be able to remove folders). but i do not understand why
"Couldn't clean filename" is never displayed on errors but only the
errormessage from rm itself.

i am currently trying to create a stage4 for which will take some time to see
if i get the same errors for other stages than stage1. i have added "print
self.settings["cleanables"]" to the function above to see if this list is
corrupted and will post its output once everything is compiled.

------- Comment #2 From Jonas Bernoulli 2006-05-09 07:48:19 0000 -------
['/etc/resolv.conf', '/var/tmp/*', '/tmp/*', '/root/*', '/usr/portage',
'/usr/share/gettext', '/usr/lib/python2.2/test',
'/usr/lib/python2.2/encodings', '/usr/lib/python2.2/email',
'/usr/lib/python2.2/lib-tk', '/usr/lib/python2.3/test',
'/usr/lib/python2.3/encodings', '/usr/lib/python2.3/email',
'/usr/lib/python2.3/lib-tk', '/usr/lib/python2.4/test',
'/usr/lib/python2.4/encodings', '/usr/lib/python2.4/email',
'/usr/lib/python2.4/lib-tk', '/usr/share/zoneinfo']

------- Comment #3 From Jonas Bernoulli 2006-05-09 07:56:49 0000 -------
okay i have tracked down the problem:

using .a as a versioning string is a really bad idea. in
/usr/lib/catalyst2/targets/stage1/stage1-controller.sh these lines are causing
the problem:

# Cleanup all .a files except libgcc.a, *_nonshared.a and
# /usr/lib/portage/bin/*.a
   find -iname "*.a" | grep -v 'libgcc.a' | grep -v 'nonshared.a' | \
     grep -v '/usr/lib/portage/bin/' | grep -v 'libgcc_eh.a' | xargs \
     rm -f

now that i know about this limitation i will adobt to a different naming
convention. while it might be likely that nobody else runs into this problem it
is still possible. so i was wondering if it was eighter possible to warn users
when they append .a to ... well anything. or limit the command above to only
clean files ending with .a from certain directories.

------- Comment #4 From Chris Gianelloni (RETIRED) 2006-05-23 13:00:12 0000 -------
I changed the find to:

find -type f -iname "*.a"

This will cause it to only actually find files which end in .a, and it will
skip any directories.

------- Comment #5 From Chris Gianelloni (RETIRED) 2006-05-25 09:31:53 0000 -------
Fixed in 2.0_rc46...

First Last Prev Next    No search results available      Search page      Enter new bug