pkgSrcRecords &SrcRecs,string &Src,
CacheFile &CacheFile)
{
- string VerTag;
+ string VerTag, UserRequestedVerTag;
string RelTag = _config->Find("APT::Default-Release");
string TmpSrc = Name;
pkgDepCache *Cache = CacheFile.GetDepCache();
if (TmpSrc[found] == '/')
RelTag = TmpSrc.substr(found+1);
else
- VerTag = TmpSrc.substr(found+1);
+ VerTag = UserRequestedVerTag = TmpSrc.substr(found+1);
TmpSrc = TmpSrc.substr(0,found);
}
const string Ver = Parse->Version();
// See if we need to look for a specific release tag
- if (RelTag != "")
+ if (RelTag != "" && UserRequestedVerTag == "")
{
const string Rel = GetReleaseForSourceRecord(SrcList, Parse);
if (VerTag.empty() == false && (VerTag == Ver))
break;
}
- if (Version != "" && RelTag != "")
+ if (UserRequestedVerTag == "" && Version != "" && RelTag != "")
ioprintf(c1out, "Selected version '%s' (%s) for %s\n",
Version.c_str(), RelTag.c_str(), Src.c_str());
E: Ignore unavailable version '9.9-not-there' of package 'foo'
E: Unable to find a source package for foo" aptget source -q --print-uris foo=9.9-not-there
+# version and release
+testequal "$HEADER
+Need to get 0 B of source archives.
+'file://${APTARCHIVE}/foo_0.0.1.dsc' foo_0.0.1.dsc 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e
+'file://${APTARCHIVE}/foo_0.0.1.tar.gz' foo_0.0.1.tar.gz 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e" aptget source -q --print-uris -t unstable foo=0.0.1