summaryrefslogtreecommitdiff
path: root/cmdline/apt-get.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-12-10 17:09:56 +0100
committerMichael Vogt <mvo@debian.org>2013-12-10 17:09:56 +0100
commit65dcff55dc5c9b47230d340a70c5067921eec4bf (patch)
treebe699c96bd6217bdbe59bcb7dcdea5ad4419b4c5 /cmdline/apt-get.cc
parentbfa7bfc8e426f662ee5a5d0fcba3daeea23fe2ae (diff)
user-requested version tag gets precedence in apt-get source -t dist pkg=version requests
Diffstat (limited to 'cmdline/apt-get.cc')
-rw-r--r--cmdline/apt-get.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index da04561c0..581466326 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -198,7 +198,7 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
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();
@@ -209,7 +209,7 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
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);
}
@@ -331,7 +331,7 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
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);
@@ -360,7 +360,7 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
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());