Author: dmacvicar Date: Sun Feb 10 23:34:15 2008 New Revision: 8592 URL: http://svn.opensuse.org/viewcvs/zypp?rev=8592&view=rev Log: - this is wrong, suse/ dir is a datadir told in the content file so this uggly append is not valid for yum repos. so for now, as the optimization of mediafile only happens in susetags repos append suse/ only for this case. Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Package.cc branches/tmp/ma/jump_sat/libzypp/zypp/sat/Solvable.cc Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Package.cc URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Package.cc?rev=8592&r1=8591&r2=8592&view=diff ============================================================================== --- branches/tmp/ma/jump_sat/libzypp/zypp/Package.cc (original) +++ branches/tmp/ma/jump_sat/libzypp/zypp/Package.cc Sun Feb 10 23:34:15 2008 @@ -108,9 +108,6 @@ OnMediaLocation loc; unsigned medianr; std::string filename = lookupLocation( medianr ); - /* XXX someone else needs to do this prepending of the datadir. - It's not necessarily "suse". */ - filename = "suse/" + filename; loc.setLocation(filename, medianr); return loc; } Modified: branches/tmp/ma/jump_sat/libzypp/zypp/sat/Solvable.cc URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/sat/Solvable.cc?rev=8592&r1=8591&r2=8592&view=diff ============================================================================== --- branches/tmp/ma/jump_sat/libzypp/zypp/sat/Solvable.cc (original) +++ branches/tmp/ma/jump_sat/libzypp/zypp/sat/Solvable.cc Sun Feb 10 23:34:15 2008 @@ -139,24 +139,31 @@ { if (data->state == REPODATA_STUB || data->state == REPODATA_ERROR) continue; - if (sid < data->start || sid >= data->end) - continue; + if (sid < data->start || sid >= data->end) + continue; repodata_search(data, sid - data->start, 0, location_cb, &lc); } medianr = lc.medianr; std::string ret; + + if (!lc.trivial) + { + if (lc.mediafile) + ret += lc.mediafile; + return ret; + } + if (lc.mediadir) - ret += std::string( lc.mediadir ) + "/"; + { + ret += std::string( lc.mediadir ) + "/"; + } else + { /* If we haven't seen an explicit dirname, then prepend the arch as directory. */ + ret += "suse/"; ret += IdString(_solvable->arch).asString() + "/"; - if (!lc.trivial) - { - if (lc.mediafile) - ret += lc.mediafile; - return ret; - } + } /* Trivial means that we can construct the rpm name from our solvable data, as name-evr.arch.rpm . */ ret += IdString(_solvable->name).asString(); -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org