Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5246a7ef authored by Yu Liu's avatar Yu Liu
Browse files

Fix a gob related issue where anonymous fields need to be exported.

Also add a missing field in packagingSpecGob

Bug: 358427516
Test: Manual verify.
Change-Id: Ib97b4eaf9e342db6a00142fdf045db8e4d9f499c
parent 3bbf9276
Loading
Loading
Loading
Loading
+23 −20
Original line number Diff line number Diff line
@@ -69,6 +69,7 @@ type packagingSpecGob struct {
	SrcPath               Path
	SymlinkTarget         string
	Executable            bool
	EffectiveLicenseFiles *Paths
	Partition             string
	SkipInstall           bool
	AconfigPaths          *Paths
@@ -83,6 +84,7 @@ func (p *PackagingSpec) ToGob() *packagingSpecGob {
		SrcPath:               p.srcPath,
		SymlinkTarget:         p.symlinkTarget,
		Executable:            p.executable,
		EffectiveLicenseFiles: p.effectiveLicenseFiles,
		Partition:             p.partition,
		SkipInstall:           p.skipInstall,
		AconfigPaths:          p.aconfigPaths,
@@ -97,6 +99,7 @@ func (p *PackagingSpec) FromGob(data *packagingSpecGob) {
	p.srcPath = data.SrcPath
	p.symlinkTarget = data.SymlinkTarget
	p.executable = data.Executable
	p.effectiveLicenseFiles = data.EffectiveLicenseFiles
	p.partition = data.Partition
	p.skipInstall = data.SkipInstall
	p.aconfigPaths = data.AconfigPaths
+6 −6
Original line number Diff line number Diff line
@@ -1363,21 +1363,21 @@ type OutputPath struct {
}

type outputPathGob struct {
	basePath
	BasePath basePath
	OutDir   string
	FullPath string
}

func (p *OutputPath) ToGob() *outputPathGob {
	return &outputPathGob{
		basePath: p.basePath,
		BasePath: p.basePath,
		OutDir:   p.outDir,
		FullPath: p.fullPath,
	}
}

func (p *OutputPath) FromGob(data *outputPathGob) {
	p.basePath = data.basePath
	p.basePath = data.BasePath
	p.outDir = data.OutDir
	p.fullPath = data.FullPath
}
@@ -1788,7 +1788,7 @@ type InstallPath struct {
}

type installPathGob struct {
	basePath
	BasePath     basePath
	SoongOutDir  string
	PartitionDir string
	Partition    string
@@ -1798,7 +1798,7 @@ type installPathGob struct {

func (p *InstallPath) ToGob() *installPathGob {
	return &installPathGob{
		basePath:     p.basePath,
		BasePath:     p.basePath,
		SoongOutDir:  p.soongOutDir,
		PartitionDir: p.partitionDir,
		Partition:    p.partition,
@@ -1808,7 +1808,7 @@ func (p *InstallPath) ToGob() *installPathGob {
}

func (p *InstallPath) FromGob(data *installPathGob) {
	p.basePath = data.basePath
	p.basePath = data.BasePath
	p.soongOutDir = data.SoongOutDir
	p.partitionDir = data.PartitionDir
	p.partition = data.Partition