Skip to Content.
Sympa Menu

sm-sorcery-bugs - [SM-Sorcery-Bugs] [Bug 9682] New: Cleanse could clean up /usr/src if TMPFS is on

sm-sorcery-bugs AT lists.ibiblio.org

Subject: Bugs for Sorcery are reported here

List archive

Chronological Thread  
  • From: bugzilla-daemon AT bugs.sourcemage.org
  • To: sm-sorcery-bugs AT lists.ibiblio.org
  • Subject: [SM-Sorcery-Bugs] [Bug 9682] New: Cleanse could clean up /usr/src if TMPFS is on
  • Date: 25 Nov 2006 20:25:39 -0000

http://bugs.sourcemage.org/show_bug.cgi?id=9682

Summary: Cleanse could clean up /usr/src if TMPFS is on
Product: Sorcery
Version: Untargetted future release
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P5
Component: Cleanse
AssignedTo: sm-sorcery-bugs AT lists.ibiblio.org
ReportedBy: sergey AT sourcemage.org
CC: seth AT swoolley.homeip.net


When TMPFS is on, there might be a lot of sources in /usr/src that didn't
build
for whatever reason. If the sorcery is not configured to delete them right
away,
maybe cleanse could do that. The script that I use follows. I think
maintainers
will appreciate this feature-let, I know I would.

#!/bin/sh
DIRECTORIES=$(
mount | grep
'^[[:alnum:]]+[[:space:]]on[[:space:]]/usr/src/[^/[:space:]]+[[:space:]]type[[:space:]]tmpfs'
| cut -d ' ' -f 3
)
[[ -z "$DIRECTORIES" ]] && exit

umount -v $DIRECTORIES &&
rmdir -v $DIRECTORIES


------- Additional Comments From seth AT swoolley.homeip.net 2006-11-25 14:25
-------
This appears to only apply to tmpfs. If we are going to automate this, it
should be more general and probably involve:

touch $SOURCE_DIRECTORY/created-by-sorcery

in PRE_BUILD so that we can know that it was created by sorcery.

Somebody who edits the src and wants to keep it around after the cleanse run
may
remove the file, and linux sources, etc., that we want to keep around
intentionally can just skip this stage of PRE_BUILD.

Though, I've been deleting /usr/src directories without cleanse for a while,
this could come in as a nice tool for the cleanse swiss-army knife. The
question is if we want this managed by sorcery.

My concern is that there are things in /usr/src for some people that are not
sorcery's and moreover that somebody may mimick sorcery's tmpfs behavior and
lose work as a result of cleanse. Cleanse doesn't normally lose anybody's
work,
so a feature like this should be careful.

Perhaps alternatively if sorcery placed its own extracted source files in a
/usr/src/sorcery-build, we wouldn't even need any fancy features like this and
can just rm -rf the directory when we want to clean up after sorcery.

--
Configure bugmail: http://bugs.sourcemage.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



  • [SM-Sorcery-Bugs] [Bug 9682] New: Cleanse could clean up /usr/src if TMPFS is on, bugzilla-daemon, 11/25/2006

Archive powered by MHonArc 2.6.24.

Top of Page