diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2009-08-12 14:52:43 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2009-08-12 14:52:43 +0200 |
commit | ebf6c42d9db4766c315ea15f25c4a7a9a799660b (patch) | |
tree | 8a88466c665b75ccfa016a20c388f9a5025b2ff3 | |
parent | 619596fcd20e3fda2ab352103cfeb9437015dfbc (diff) |
Add the pkg/release syntax to the source command in apt-get and also
add the understanding for codenames instead of archives here
[cmdline/apt-get.cc]
- add pkg/archive and codename in source (Closes: #414105, #441178)
-rw-r--r-- | cmdline/apt-get.cc | 22 | ||||
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | po/apt-all.pot | 118 |
3 files changed, 75 insertions, 66 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 71566fd55..1582fff85 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1220,17 +1220,25 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs, { // We want to pull the version off the package specification.. string VerTag; + string DefRel; string TmpSrc = Name; - string::size_type Slash = TmpSrc.rfind('='); + const size_t found = TmpSrc.find_last_of("/="); // honor default release - string DefRel = _config->Find("APT::Default-Release"); + if (found != string::npos && TmpSrc[found] == '/') + { + DefRel = TmpSrc.substr(found+1); + TmpSrc = TmpSrc.substr(0,found); + } + else + DefRel = _config->Find("APT::Default-Release"); + pkgCache::PkgIterator Pkg = Cache.FindPkg(TmpSrc); - if (Slash != string::npos) + if (found != string::npos && TmpSrc[found] == '=') { - VerTag = string(TmpSrc.begin() + Slash + 1,TmpSrc.end()); - TmpSrc = string(TmpSrc.begin(),TmpSrc.begin() + Slash); + VerTag = TmpSrc.substr(found+1); + TmpSrc = TmpSrc.substr(0,found); } else if(!Pkg.end() && DefRel.empty() == false) { @@ -1252,8 +1260,8 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs, pkgCache::Flag::NotSource && Pkg.CurrentVer() != Ver) continue; - //std::cout << VF.File().Archive() << std::endl; - if(VF.File().Archive() && (VF.File().Archive() == DefRel)) + if((VF.File().Archive() != 0 && VF.File().Archive() == DefRel) || + (VF.File().Codename() != 0 && VF.File().Codename() == DefRel)) { pkgRecords::Parser &Parse = Recs.Lookup(VF); VerTag = Parse.SourceVer(); diff --git a/debian/changelog b/debian/changelog index 3407cdcec..7dbbcdf7a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,7 @@ apt (0.7.22.3) unstable; urgency=low - correct the order of picked package binary vs source in source - use SourceVersion instead of the BinaryVersion to get the source Patch by Matt Kraai, thanks! (Closes: #382826) + - add pkg/archive and codename in source (Closes: #414105, #441178) * apt-pkg/contrib/strutl.cc: - enable thousand separator according to the current locale (by Luca Bruno, Closes: #223712) diff --git a/po/apt-all.pot b/po/apt-all.pot index 767d9f060..b20a3fd92 100644 --- a/po/apt-all.pot +++ b/po/apt-all.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-08-12 13:14+0200\n" +"POT-Creation-Date: 2009-08-12 14:46+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -151,7 +151,7 @@ msgstr "" #: cmdline/apt-cache.cc:1718 cmdline/apt-cdrom.cc:134 cmdline/apt-config.cc:70 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:547 -#: cmdline/apt-get.cc:2618 cmdline/apt-sortpkgs.cc:144 +#: cmdline/apt-get.cc:2626 cmdline/apt-sortpkgs.cc:144 #, c-format msgid "%s %s for %s compiled on %s %s\n" msgstr "" @@ -549,7 +549,7 @@ msgstr "" msgid "Y" msgstr "" -#: cmdline/apt-get.cc:149 cmdline/apt-get.cc:1687 +#: cmdline/apt-get.cc:149 cmdline/apt-get.cc:1695 #, c-format msgid "Regex compilation error - %s" msgstr "" @@ -708,11 +708,11 @@ msgstr "" msgid "Internal error, Ordering didn't finish" msgstr "" -#: cmdline/apt-get.cc:811 cmdline/apt-get.cc:2029 cmdline/apt-get.cc:2062 +#: cmdline/apt-get.cc:811 cmdline/apt-get.cc:2037 cmdline/apt-get.cc:2070 msgid "Unable to lock the download directory" msgstr "" -#: cmdline/apt-get.cc:821 cmdline/apt-get.cc:2110 cmdline/apt-get.cc:2359 +#: cmdline/apt-get.cc:821 cmdline/apt-get.cc:2118 cmdline/apt-get.cc:2367 #: apt-pkg/cachefile.cc:65 msgid "The list of sources could not be read." msgstr "" @@ -741,7 +741,7 @@ msgstr "" msgid "After this operation, %sB disk space will be freed.\n" msgstr "" -#: cmdline/apt-get.cc:866 cmdline/apt-get.cc:2205 +#: cmdline/apt-get.cc:866 cmdline/apt-get.cc:2213 #, c-format msgid "Couldn't determine free space in %s" msgstr "" @@ -775,7 +775,7 @@ msgstr "" msgid "Do you want to continue [Y/n]? " msgstr "" -#: cmdline/apt-get.cc:989 cmdline/apt-get.cc:2256 apt-pkg/algorithms.cc:1389 +#: cmdline/apt-get.cc:989 cmdline/apt-get.cc:2264 apt-pkg/algorithms.cc:1389 #, c-format msgid "Failed to fetch %s %s\n" msgstr "" @@ -784,7 +784,7 @@ msgstr "" msgid "Some files failed to download" msgstr "" -#: cmdline/apt-get.cc:1008 cmdline/apt-get.cc:2265 +#: cmdline/apt-get.cc:1008 cmdline/apt-get.cc:2273 msgid "Download complete and in download only mode" msgstr "" @@ -876,39 +876,39 @@ msgstr "" msgid "Selected version %s (%s) for %s\n" msgstr "" -#: cmdline/apt-get.cc:1315 +#: cmdline/apt-get.cc:1323 #, c-format msgid "No source package '%s' picking '%s' instead\n" msgstr "" -#: cmdline/apt-get.cc:1352 +#: cmdline/apt-get.cc:1360 msgid "The update command takes no arguments" msgstr "" -#: cmdline/apt-get.cc:1365 +#: cmdline/apt-get.cc:1373 msgid "Unable to lock the list directory" msgstr "" -#: cmdline/apt-get.cc:1421 +#: cmdline/apt-get.cc:1429 msgid "We are not supposed to delete stuff, can't start AutoRemover" msgstr "" -#: cmdline/apt-get.cc:1470 +#: cmdline/apt-get.cc:1478 msgid "" "The following packages were automatically installed and are no longer " "required:" msgstr "" -#: cmdline/apt-get.cc:1472 +#: cmdline/apt-get.cc:1480 #, c-format msgid "%lu packages were automatically installed and are no longer required.\n" msgstr "" -#: cmdline/apt-get.cc:1473 +#: cmdline/apt-get.cc:1481 msgid "Use 'apt-get autoremove' to remove them." msgstr "" -#: cmdline/apt-get.cc:1478 +#: cmdline/apt-get.cc:1486 msgid "" "Hmm, seems like the AutoRemover destroyed something which really\n" "shouldn't happen. Please file a bug report against apt." @@ -924,49 +924,49 @@ msgstr "" #. "that package should be filed.") << endl; #. } #. -#: cmdline/apt-get.cc:1481 cmdline/apt-get.cc:1771 +#: cmdline/apt-get.cc:1489 cmdline/apt-get.cc:1779 msgid "The following information may help to resolve the situation:" msgstr "" -#: cmdline/apt-get.cc:1485 +#: cmdline/apt-get.cc:1493 msgid "Internal Error, AutoRemover broke stuff" msgstr "" -#: cmdline/apt-get.cc:1504 +#: cmdline/apt-get.cc:1512 msgid "Internal error, AllUpgrade broke stuff" msgstr "" -#: cmdline/apt-get.cc:1559 +#: cmdline/apt-get.cc:1567 #, c-format msgid "Couldn't find task %s" msgstr "" -#: cmdline/apt-get.cc:1674 cmdline/apt-get.cc:1710 +#: cmdline/apt-get.cc:1682 cmdline/apt-get.cc:1718 #, c-format msgid "Couldn't find package %s" msgstr "" -#: cmdline/apt-get.cc:1697 +#: cmdline/apt-get.cc:1705 #, c-format msgid "Note, selecting %s for regex '%s'\n" msgstr "" -#: cmdline/apt-get.cc:1728 +#: cmdline/apt-get.cc:1736 #, c-format msgid "%s set to manually installed.\n" msgstr "" -#: cmdline/apt-get.cc:1741 +#: cmdline/apt-get.cc:1749 msgid "You might want to run `apt-get -f install' to correct these:" msgstr "" -#: cmdline/apt-get.cc:1744 +#: cmdline/apt-get.cc:1752 msgid "" "Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a " "solution)." msgstr "" -#: cmdline/apt-get.cc:1756 +#: cmdline/apt-get.cc:1764 msgid "" "Some packages could not be installed. This may mean that you have\n" "requested an impossible situation or if you are using the unstable\n" @@ -974,152 +974,152 @@ msgid "" "or been moved out of Incoming." msgstr "" -#: cmdline/apt-get.cc:1774 +#: cmdline/apt-get.cc:1782 msgid "Broken packages" msgstr "" -#: cmdline/apt-get.cc:1803 +#: cmdline/apt-get.cc:1811 msgid "The following extra packages will be installed:" msgstr "" -#: cmdline/apt-get.cc:1892 +#: cmdline/apt-get.cc:1900 msgid "Suggested packages:" msgstr "" -#: cmdline/apt-get.cc:1893 +#: cmdline/apt-get.cc:1901 msgid "Recommended packages:" msgstr "" -#: cmdline/apt-get.cc:1922 +#: cmdline/apt-get.cc:1930 msgid "Calculating upgrade... " msgstr "" -#: cmdline/apt-get.cc:1925 methods/ftp.cc:702 methods/connect.cc:112 +#: cmdline/apt-get.cc:1933 methods/ftp.cc:702 methods/connect.cc:112 msgid "Failed" msgstr "" -#: cmdline/apt-get.cc:1930 +#: cmdline/apt-get.cc:1938 msgid "Done" msgstr "" -#: cmdline/apt-get.cc:1997 cmdline/apt-get.cc:2005 +#: cmdline/apt-get.cc:2005 cmdline/apt-get.cc:2013 msgid "Internal error, problem resolver broke stuff" msgstr "" -#: cmdline/apt-get.cc:2105 +#: cmdline/apt-get.cc:2113 msgid "Must specify at least one package to fetch source for" msgstr "" -#: cmdline/apt-get.cc:2135 cmdline/apt-get.cc:2377 +#: cmdline/apt-get.cc:2143 cmdline/apt-get.cc:2385 #, c-format msgid "Unable to find a source package for %s" msgstr "" -#: cmdline/apt-get.cc:2184 +#: cmdline/apt-get.cc:2192 #, c-format msgid "Skipping already downloaded file '%s'\n" msgstr "" -#: cmdline/apt-get.cc:2215 +#: cmdline/apt-get.cc:2223 #, c-format msgid "You don't have enough free space in %s" msgstr "" -#: cmdline/apt-get.cc:2221 +#: cmdline/apt-get.cc:2229 #, c-format msgid "Need to get %sB/%sB of source archives.\n" msgstr "" -#: cmdline/apt-get.cc:2224 +#: cmdline/apt-get.cc:2232 #, c-format msgid "Need to get %sB of source archives.\n" msgstr "" -#: cmdline/apt-get.cc:2230 +#: cmdline/apt-get.cc:2238 #, c-format msgid "Fetch source %s\n" msgstr "" -#: cmdline/apt-get.cc:2261 +#: cmdline/apt-get.cc:2269 msgid "Failed to fetch some archives." msgstr "" -#: cmdline/apt-get.cc:2289 +#: cmdline/apt-get.cc:2297 #, c-format msgid "Skipping unpack of already unpacked source in %s\n" msgstr "" -#: cmdline/apt-get.cc:2301 +#: cmdline/apt-get.cc:2309 #, c-format msgid "Unpack command '%s' failed.\n" msgstr "" -#: cmdline/apt-get.cc:2302 +#: cmdline/apt-get.cc:2310 #, c-format msgid "Check if the 'dpkg-dev' package is installed.\n" msgstr "" -#: cmdline/apt-get.cc:2319 +#: cmdline/apt-get.cc:2327 #, c-format msgid "Build command '%s' failed.\n" msgstr "" -#: cmdline/apt-get.cc:2338 +#: cmdline/apt-get.cc:2346 msgid "Child process failed" msgstr "" -#: cmdline/apt-get.cc:2354 +#: cmdline/apt-get.cc:2362 msgid "Must specify at least one package to check builddeps for" msgstr "" -#: cmdline/apt-get.cc:2382 +#: cmdline/apt-get.cc:2390 #, c-format msgid "Unable to get build-dependency information for %s" msgstr "" -#: cmdline/apt-get.cc:2402 +#: cmdline/apt-get.cc:2410 #, c-format msgid "%s has no build depends.\n" msgstr "" -#: cmdline/apt-get.cc:2454 +#: cmdline/apt-get.cc:2462 #, c-format msgid "" "%s dependency for %s cannot be satisfied because the package %s cannot be " "found" msgstr "" -#: cmdline/apt-get.cc:2507 +#: cmdline/apt-get.cc:2515 #, c-format msgid "" "%s dependency for %s cannot be satisfied because no available versions of " "package %s can satisfy version requirements" msgstr "" -#: cmdline/apt-get.cc:2543 +#: cmdline/apt-get.cc:2551 #, c-format msgid "Failed to satisfy %s dependency for %s: Installed package %s is too new" msgstr "" -#: cmdline/apt-get.cc:2570 +#: cmdline/apt-get.cc:2578 #, c-format msgid "Failed to satisfy %s dependency for %s: %s" msgstr "" -#: cmdline/apt-get.cc:2586 +#: cmdline/apt-get.cc:2594 #, c-format msgid "Build-dependencies for %s could not be satisfied." msgstr "" -#: cmdline/apt-get.cc:2591 +#: cmdline/apt-get.cc:2599 msgid "Failed to process build dependencies" msgstr "" -#: cmdline/apt-get.cc:2623 +#: cmdline/apt-get.cc:2631 msgid "Supported modules:" msgstr "" -#: cmdline/apt-get.cc:2664 +#: cmdline/apt-get.cc:2672 msgid "" "Usage: apt-get [options] command\n" " apt-get [options] install|remove pkg1 [pkg2 ...]\n" @@ -1163,7 +1163,7 @@ msgid "" " This APT has Super Cow Powers.\n" msgstr "" -#: cmdline/apt-get.cc:2831 +#: cmdline/apt-get.cc:2839 msgid "" "NOTE: This is only a simulation!\n" " apt-get needs root privileges for real execution.\n" |