mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-26 08:58:22 -04:00
[unpackfs] Document fields of the UnpackEntry
- Document fields - While here, remove code for special-casing single-file copies. Those already work, based on rsync.
This commit is contained in:
parent
05c0398126
commit
4acf63fd9a
1 changed files with 11 additions and 5 deletions
|
@ -52,6 +52,17 @@ class UnpackEntry:
|
||||||
__slots__ = ['source', 'sourcefs', 'destination', 'copied', 'total']
|
__slots__ = ['source', 'sourcefs', 'destination', 'copied', 'total']
|
||||||
|
|
||||||
def __init__(self, source, sourcefs, destination):
|
def __init__(self, source, sourcefs, destination):
|
||||||
|
"""
|
||||||
|
@p source is the source file name (might be an image file, or
|
||||||
|
a directory, too)
|
||||||
|
@p sourcefs is a type indication; "file" is special, as is
|
||||||
|
"squashfs".
|
||||||
|
@p destination is where the files from the source go. This is
|
||||||
|
**already** prefixed by rootMountPoint, so should be a
|
||||||
|
valid absolute path within the host system.
|
||||||
|
|
||||||
|
The members copied and total are filled in by the copying process.
|
||||||
|
"""
|
||||||
self.source = source
|
self.source = source
|
||||||
self.sourcefs = sourcefs
|
self.sourcefs = sourcefs
|
||||||
self.destination = destination
|
self.destination = destination
|
||||||
|
@ -85,7 +96,6 @@ def list_excludes(destination):
|
||||||
|
|
||||||
return lst
|
return lst
|
||||||
|
|
||||||
|
|
||||||
def file_copy(source, dest, progress_cb):
|
def file_copy(source, dest, progress_cb):
|
||||||
"""
|
"""
|
||||||
Extract given image using rsync.
|
Extract given image using rsync.
|
||||||
|
@ -303,10 +313,6 @@ class UnpackOperation:
|
||||||
try:
|
try:
|
||||||
if entry.is_file():
|
if entry.is_file():
|
||||||
source = entry.source
|
source = entry.source
|
||||||
if entry.total <= 1:
|
|
||||||
# If there is one file, *and* the target does not exist (as a file or dir)
|
|
||||||
# but the dirname of the target does, we should copy just one file and rename.
|
|
||||||
pass
|
|
||||||
else:
|
else:
|
||||||
source = imgmountdir
|
source = imgmountdir
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue