Bug 81454 - portupgrade leaves temporary directory when -b option is specified
Summary: portupgrade leaves temporary directory when -b option is specified
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Sergey Matveychuk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-25 01:00 UTC by KOMATSU Shinichiro
Modified: 2006-06-04 18:22 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (1.05 KB, patch)
2005-05-25 01:00 UTC, KOMATSU Shinichiro
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description KOMATSU Shinichiro 2005-05-25 01:00:25 UTC
portupgrade keeps bacup packages of the old versions
in temporary directory when it is run with -b option.

Since portupgrade-20041226_2, this temporary directory is created by mktemp(1)
instead of /var/tmp, and removed at the end of the portupgrade process.
But as the backup packages are kept in that directory,
rmdir fails as follows:

    --->  [Executing a command as root: sudo /usr/bin/install -m 644 /tmp/portupgrade18478.1 /var/tmp/portupgrade.results]
    ** Could not clean up temporary directory: Directory not empty - /var/tmp/portupgradeMmWsL1P6

Fix: If the following patch is applied,
the backup packages are moved to the directory
specified by PKG_BACKUP_DIR environment variable
at end of the portupgrade process,
and the temporary directory becomes empty before removed.

I am wondering whether PKG_BACKUP_DIR should have the default value,
and what directory if it should have.
So, I decided to keep the old behavior if PKG_BACKUP_DIR is not set
(i.e rmdir fails at the end), but this should be changed.
How-To-Repeat: 
Run portupgrade >= 20041226_2 with -b option.
Comment 1 Jean-Yves Lefort freebsd_committer freebsd_triage 2005-05-25 09:41:07 UTC
Responsible Changed
From-To: freebsd-ports-bugs->knu

Over to maintainer.
Comment 2 Daichi GOTO freebsd_committer freebsd_triage 2005-06-22 06:53:27 UTC
State Changed
From-To: open->feedback

Over to new maintainer. 


Comment 3 Daichi GOTO freebsd_committer freebsd_triage 2005-06-22 06:53:27 UTC
Responsible Changed
From-To: knu->daichi

Grab.
Comment 4 Sergey Matveychuk freebsd_committer freebsd_triage 2006-06-01 09:00:02 UTC
Responsible Changed
From-To: daichi->sem

Take all portupgrade related PRs
Comment 5 Sergey Matveychuk freebsd_committer freebsd_triage 2006-06-02 11:14:08 UTC
State Changed
From-To: feedback->open

Back to open state
Comment 6 Sergey Matveychuk freebsd_committer freebsd_triage 2006-06-04 18:22:44 UTC
State Changed
From-To: open->closed

Committed a fix based on your submission. Thanks!