Ticket #11971 (closed defect: fixed)
BUG: "port -u -f upgrade installed" created many nested directories
| Reported by: | freebsd@… | Owned by: | jmr@… |
|---|---|---|---|
| Priority: | High | Milestone: | MacPorts 1.7.0 |
| Component: | base | Version: | 1.4 |
| Keywords: | haspatch | Cc: | |
| Port: |
Description
This is probably related to #10827 where upgrade repeats infinitely.
I have about 30 ports installed an attempted to force update to get rid of old libraries; I aborted the attempt after running for 50 hours.
When examining the /opt/local/var directory to determine why it was taking so long I noticed a lot of extra disk space was consumed by the distfiles and packages sub directories.
For example: distfiles/gettext had a copy of the .tar.bz2 plus another gettext subdirectory. This 2nd gettext directory only had a gettext subdirectory. The 3rd level had the .tar.bz2 and a gettext subdirectory.
This alternating pattern was repeated:
- The 4th, 6th, ... were like the second - just subdirectory.
- The 5th, 7th, ... included a copy of the .tar.bz2 files.
In total an extra 9 copies of gettext files; libiconv was similar. Many others had the same problem but usually only 3 to 5 extra copies.
A similar situation existed in the packages directory where darwin/powerpc was nested many times with copies of the compiled packages at each powerpc subdirectory.
removing all the duplicates recovered about 300MB of disk space.
Attachments
Change History
comment:2 Changed 6 years ago by nox@…
- Priority changed from Important to High
- Milestone set to MacPorts base bugs
- Summary changed from "port -u -f upgrade installed" created many nested directories to BUG: "port -u -f upgrade installed" created many nested directories
comment:4 Changed 5 years ago by jmr@…
- Cc jmr@… added
Looks like this is due to multiple invocations of fetch_init and archive_init, where dist_subdir is appended to distpath, and os.platform & os.arch are appended to archive.destpath, respectively.
comment:5 Changed 5 years ago by jmr@…
- Milestone changed from MacPorts base bugs to MacPorts 1.6.1
Unarchive could have been affected as well. The attached patch should make it harmless to call fetch_init, archive_init, and unarchive_init more than once.
Nominating this for the upcoming release.
comment:8 Changed 5 years ago by jmr@…
- Cc jmr@… removed
- Owner changed from macports-tickets@… to jmr@…
- Status changed from new to assigned
comment:9 Changed 5 years ago by jmr@…
Patch committed to trunk in r36679. Thanks for reviewing, Rainer!
Is there a simple test case we can use to ensure that the problem is really fixed?
comment:10 Changed 5 years ago by jmr@…
comment:11 Changed 5 years ago by raimue@…
- Status changed from assigned to closed
- Resolution set to fixed
Marking fixed.


Some system information: (for PowerBook G4/1.33GHz/256MB)
uname -v
Darwin Kernel Version 8.9.0: Thu Feb 22 20:54:07 PST 2007; root:xnu-792.17.14~1/RELEASE_PPC
port --version
MacPorts 1.440
gcc --version
powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5367)