diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-03-12 15:39:06 +0100 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-03-12 15:39:06 +0100 |
commit | ddff663f897a422d61a36238ec71edb7fe3e3eb1 (patch) | |
tree | e042767c9c5c4a7c018c1af69cd2f7b2f68479c3 /cmdline/apt-get.cc | |
parent | eefacd4c6653485b3da8dc267a8068207398464b (diff) |
* cmdline/apt-get.cc:
- if apt-get source foo=version or foo/distro can not be found,
error out (LP: #502641)
Diffstat (limited to 'cmdline/apt-get.cc')
-rw-r--r-- | cmdline/apt-get.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 34ae2fed9..d4fefa9c7 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1317,9 +1317,11 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs, if (Src.empty() == true) { // Sources files have no codename information - if (VerTag.empty() == true && DefRel.empty() == false) - _error->Warning(_("Ignore unavailable target release '%s' of package '%s'"), DefRel.c_str(), TmpSrc.c_str()); - DefRel.clear(); + if (VerTag.empty() == true && DefRel.empty() == false) + { + _error->Error(_("Ignore unavailable target release '%s' of package '%s'"), DefRel.c_str(), TmpSrc.c_str()); + return 0; + } } } if (Src.empty() == true) @@ -1386,8 +1388,8 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs, if (Last != 0 || VerTag.empty() == true) break; //if (VerTag.empty() == false && Last == 0) - _error->Warning(_("Ignore unavailable version '%s' of package '%s'"), VerTag.c_str(), TmpSrc.c_str()); - VerTag.clear(); + _error->Error(_("Ignore unavailable version '%s' of package '%s'"), VerTag.c_str(), TmpSrc.c_str()); + return 0; } if (Last == 0 || Last->Jump(Offset) == false) |