@@ -52,7 +52,7 @@ sw::PackageDescriptionMap getPackages(const sw::SwBuild &b, const sw::SourceDirM
5252 for (auto &[pkg, td] : b.getTargets ())
5353 {
5454 // deps
55- if (pkg.ppath .isAbsolute ())
55+ if (pkg.getPath () .isAbsolute ())
5656 continue ;
5757 auto t = td.getAnyTarget ();
5858
@@ -61,14 +61,14 @@ sw::PackageDescriptionMap getPackages(const sw::SwBuild &b, const sw::SourceDirM
6161 // source, version, path
6262 t->getSource ().save (j[" source" ]);
6363 j[" version" ] = pkg.getVersion ().toString ();
64- j[" path" ] = pkg.ppath .toString ();
64+ j[" path" ] = pkg.getPath () .toString ();
6565
6666 // find root dir
6767 path rd;
6868 if (!sources.empty ())
6969 {
7070 auto src = t->getSource ().clone (); // copy
71- src->applyVersion (pkg.version );
71+ src->applyVersion (pkg.getVersion () );
7272 auto si = sources.find (src->getHash ());
7373 if (si == sources.end ())
7474 throw SW_RUNTIME_ERROR (" no such source" );
@@ -126,8 +126,7 @@ SUBCOMMAND_DECL2(upload)
126126 for (auto &[id, d] : m)
127127 {
128128 write_file (fs::current_path () / SW_BINARY_DIR / " upload" / id.toString () += " .json" , d->getString ());
129- auto id2 = id;
130- id2.ppath = sw::PackagePath (upload_prefix) / id2.ppath ;
129+ auto id2 = sw::PackageId (sw::PackagePath (upload_prefix) / id.getPath (), id.getVersion ());
131130 LOG_INFO (logger, " Uploading " + id2.toString ());
132131 }
133132
0 commit comments