]> git.saurik.com Git - apt.git/commitdiff
rename 'apt-get files' to 'apt-get indextargets'
authorDavid Kalnischkies <david@kalnischkies.de>
Thu, 9 Jul 2015 22:07:37 +0000 (00:07 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Mon, 10 Aug 2015 15:27:17 +0000 (17:27 +0200)
'files' is a bit too generic as a name for a command usually only used
programmatically (if at all) by developers, so instead of "wasting" this
generic name for this we use "indextargets" which is actually the name
of the datastructure the displayed data is stored in.
Along with this rename the config options are renamed accordingly.

apt-pkg/deb/debmetaindex.cc
apt-pkg/init.cc
apt-private/private-cmndline.cc
cmdline/apt-get.cc
doc/acquire-additional-files.txt
doc/apt-get.8.xml
doc/sources.list.5.xml
test/integration/test-acquire-same-repository-multiple-times
test/integration/test-apt-acquire-additional-files
test/integration/test-apt-get-update-unauth-warning
test/integration/test-sourceslist-lang-plusminus-options

index 46a7181fc5e1efd4a91476a7e8ac55aeec5c8d13..480317db3b8c1dad4480597b0f0a00ac7b3becc4 100644 (file)
@@ -128,12 +128,12 @@ static void GetIndexTargetsFor(char const * const Type, std::string const &URI,
    {
       for (std::vector<std::string>::const_iterator T = E->Targets.begin(); T != E->Targets.end(); ++T)
       {
-#define APT_T_CONFIG(X) _config->Find(std::string("APT::Acquire::Targets::") + Type  + "::" + *T + "::" + (X))
+#define APT_T_CONFIG(X) _config->Find(std::string("Acquire::IndexTargets::") + Type  + "::" + *T + "::" + (X))
         std::string const tplMetaKey = APT_T_CONFIG(flatArchive ? "flatMetaKey" : "MetaKey");
         std::string const tplShortDesc = APT_T_CONFIG("ShortDescription");
-        std::string const tplLongDesc = APT_T_CONFIG(flatArchive ? "flatDescription" : "Description");
-        bool const IsOptional = _config->FindB(std::string("APT::Acquire::Targets::") + Type + "::" + *T + "::Optional", true);
-        bool const KeepCompressed = _config->FindB(std::string("APT::Acquire::Targets::") + Type + "::" + *T + "::KeepCompressed", GzipIndex);
+        std::string const tplLongDesc = "$(SITE) " + APT_T_CONFIG(flatArchive ? "flatDescription" : "Description");
+        bool const IsOptional = _config->FindB(std::string("Acquire::IndexTargets::") + Type + "::" + *T + "::Optional", true);
+        bool const KeepCompressed = _config->FindB(std::string("Acquire::IndexTargets::") + Type + "::" + *T + "::KeepCompressed", GzipIndex);
 #undef APT_T_CONFIG
         if (tplMetaKey.empty())
            continue;
@@ -721,7 +721,7 @@ class APT_HIDDEN debSLTypeDebian : public pkgSourceList::Type               /*{{{*/
       Deb->AddComponent(
            IsSrc,
            Section,
-           parsePlusMinusOptions("target", Options, _config->FindVector(std::string("APT::Acquire::Targets::") + Name, "", true)),
+           parsePlusMinusOptions("target", Options, _config->FindVector(std::string("Acquire::IndexTargets::") + Name, "", true)),
            parsePlusMinusOptions("arch", Options, APT::Configuration::getArchitectures()),
            parsePlusMinusOptions("lang", Options, APT::Configuration::getLanguages(true))
            );
index 1fbb035f780e0c4e05aeed99186928acdebf0c94..858bcec43b008f53fc327fa394fe1d5307c21a35 100644 (file)
@@ -99,23 +99,23 @@ bool pkgInitConfig(Configuration &Cnf)
    // The default user we drop to in the methods
    Cnf.CndSet("APT::Sandbox::User", "_apt");
 
-   Cnf.CndSet("APT::Acquire::Targets::deb::Packages::MetaKey", "$(COMPONENT)/binary-$(ARCHITECTURE)/Packages");
-   Cnf.CndSet("APT::Acquire::Targets::deb::Packages::flatMetaKey", "Packages");
-   Cnf.CndSet("APT::Acquire::Targets::deb::Packages::ShortDescription", "Packages");
-   Cnf.CndSet("APT::Acquire::Targets::deb::Packages::Description", "$(SITE) $(RELEASE)/$(COMPONENT) $(ARCHITECTURE) Packages");
-   Cnf.CndSet("APT::Acquire::Targets::deb::Packages::flatDescription", "$(SITE) $(RELEASE) Packages");
-   Cnf.CndSet("APT::Acquire::Targets::deb::Packages::Optional", false);
-   Cnf.CndSet("APT::Acquire::Targets::deb::Translations::MetaKey", "$(COMPONENT)/i18n/Translation-$(LANGUAGE)");
-   Cnf.CndSet("APT::Acquire::Targets::deb::Translations::flatMetaKey", "$(LANGUAGE)");
-   Cnf.CndSet("APT::Acquire::Targets::deb::Translations::ShortDescription", "Translation-$(LANGUAGE)");
-   Cnf.CndSet("APT::Acquire::Targets::deb::Translations::Description", "$(SITE) $(RELEASE)/$(COMPONENT) Translation-$(LANGUAGE)");
-   Cnf.CndSet("APT::Acquire::Targets::deb::Translations::flatDescription", "$(SITE) $(RELEASE) Translation-$(LANGUAGE)");
-   Cnf.CndSet("APT::Acquire::Targets::deb-src::Sources::MetaKey", "$(COMPONENT)/source/Sources");
-   Cnf.CndSet("APT::Acquire::Targets::deb-src::Sources::flatMetaKey", "Sources");
-   Cnf.CndSet("APT::Acquire::Targets::deb-src::Sources::ShortDescription", "Sources");
-   Cnf.CndSet("APT::Acquire::Targets::deb-src::Sources::Description", "$(SITE) $(RELEASE)/$(COMPONENT) Sources");
-   Cnf.CndSet("APT::Acquire::Targets::deb-src::Sources::flatDescription", "$(SITE) $(RELEASE) Sources");
-   Cnf.CndSet("APT::Acquire::Targets::deb-src::Sources::Optional", false);
+   Cnf.CndSet("Acquire::IndexTargets::deb::Packages::MetaKey", "$(COMPONENT)/binary-$(ARCHITECTURE)/Packages");
+   Cnf.CndSet("Acquire::IndexTargets::deb::Packages::flatMetaKey", "Packages");
+   Cnf.CndSet("Acquire::IndexTargets::deb::Packages::ShortDescription", "Packages");
+   Cnf.CndSet("Acquire::IndexTargets::deb::Packages::Description", "$(RELEASE)/$(COMPONENT) $(ARCHITECTURE) Packages");
+   Cnf.CndSet("Acquire::IndexTargets::deb::Packages::flatDescription", "$(RELEASE) Packages");
+   Cnf.CndSet("Acquire::IndexTargets::deb::Packages::Optional", false);
+   Cnf.CndSet("Acquire::IndexTargets::deb::Translations::MetaKey", "$(COMPONENT)/i18n/Translation-$(LANGUAGE)");
+   Cnf.CndSet("Acquire::IndexTargets::deb::Translations::flatMetaKey", "$(LANGUAGE)");
+   Cnf.CndSet("Acquire::IndexTargets::deb::Translations::ShortDescription", "Translation-$(LANGUAGE)");
+   Cnf.CndSet("Acquire::IndexTargets::deb::Translations::Description", "$(RELEASE)/$(COMPONENT) Translation-$(LANGUAGE)");
+   Cnf.CndSet("Acquire::IndexTargets::deb::Translations::flatDescription", "$(RELEASE) Translation-$(LANGUAGE)");
+   Cnf.CndSet("Acquire::IndexTargets::deb-src::Sources::MetaKey", "$(COMPONENT)/source/Sources");
+   Cnf.CndSet("Acquire::IndexTargets::deb-src::Sources::flatMetaKey", "Sources");
+   Cnf.CndSet("Acquire::IndexTargets::deb-src::Sources::ShortDescription", "Sources");
+   Cnf.CndSet("Acquire::IndexTargets::deb-src::Sources::Description", "$(RELEASE)/$(COMPONENT) Sources");
+   Cnf.CndSet("Acquire::IndexTargets::deb-src::Sources::flatDescription", "$(RELEASE) Sources");
+   Cnf.CndSet("Acquire::IndexTargets::deb-src::Sources::Optional", false);
 
    Cnf.CndSet("Acquire::Changelogs::URI::Origin::Debian", "http://metadata.ftp-master.debian.org/changelogs/CHANGEPATH_changelog");
    Cnf.CndSet("Acquire::Changelogs::URI::Origin::Ubuntu", "http://changelogs.ubuntu.com/changelogs/pool/CHANGEPATH/changelog");
index 11e88b1e7f96c4dd793c40029fb471bcb4a0d9ab..71dceb55917360452b8666bca3a21fe9c74824ba 100644 (file)
@@ -163,10 +163,10 @@ static bool addArgumentsAPTGet(std::vector<CommandLine::Args> &Args, char const
       // once sbuild is fixed, this option can be removed
       addArg('f', "fix-broken", "APT::Get::Fix-Broken", 0);
    }
-   else if (CmdMatches("files"))
+   else if (CmdMatches("indextargets"))
    {
-      addArg(0,"format","APT::Get::Files::Format", CommandLine::HasArg);
-      addArg(0,"release-info","APT::Get::Files::ReleaseInfo", 0);
+      addArg(0,"format","APT::Get::IndexTargets::Format", CommandLine::HasArg);
+      addArg(0,"release-info","APT::Get::IndexTargets::ReleaseInfo", 0);
    }
    else if (CmdMatches("clean", "autoclean", "check", "download", "changelog") ||
            CmdMatches("markauto", "unmarkauto")) // deprecated commands
index 9232e15054c8decff9ebc6424356e7a42483abc7..a69f5418a096cdb9f20b09ed63a8e0fc362872a3 100644 (file)
@@ -1468,7 +1468,7 @@ static bool DoChangelog(CommandLine &CmdL)
    return true;
 }
                                                                        /*}}}*/
-// DoFiles - Lists all IndexTargets                                    /*{{{*/
+// DoIndexTargets - Lists all IndexTargets                             /*{{{*/
 static std::string format_key(std::string key)
 {
    // deb822 is case-insensitive, but the human eye prefers candy
@@ -1484,7 +1484,7 @@ static std::string format_key(std::string key)
    }
    return key;
 }
-static bool DoFiles(CommandLine &CmdL)
+static bool DoIndexTargets(CommandLine &CmdL)
 {
    pkgCacheFile CacheFile;
    pkgSourceList *SrcList = CacheFile.GetSourceList();
@@ -1492,8 +1492,8 @@ static bool DoFiles(CommandLine &CmdL)
    if (SrcList == NULL)
       return false;
 
-   std::string const Format = _config->Find("APT::Get::Files::Format");
-   bool const ReleaseInfo = _config->FindB("APT::Get::Files::ReleaseInfo", true);
+   std::string const Format = _config->Find("APT::Get::IndexTargets::Format");
+   bool const ReleaseInfo = _config->FindB("APT::Get::IndexTargets::ReleaseInfo", true);
    bool Filtered = CmdL.FileSize() > 1;
    for (pkgSourceList::const_iterator S = SrcList->begin(); S != SrcList->end(); ++S)
    {
@@ -1687,7 +1687,7 @@ int main(int argc,const char *argv[])                                     /*{{{*/
                                   {"source",&DoSource},
                                    {"download",&DoDownload},
                                    {"changelog",&DoChangelog},
-                                  {"files",&DoFiles},
+                                  {"indextargets",&DoIndexTargets},
                                   {"moo",&DoMoo},
                                   {"help",&ShowHelp},
                                    {0,0}};
index f9a16318db74b28792fbac62bc79961eda946e4b..71ce7b0cb917d5c23e76b40e208c0716ccb8195a 100644 (file)
@@ -26,7 +26,7 @@ they would be written in a configuration file the configuration
 instructing the Acquire system to download the Packages files would look
 like this (see also apt.conf(5) manpage for configuration file syntax):
 
-       APT::Acquire::Targets::deb::Packages {
+       Acquire::IndexTargets::deb::Packages {
                MetaKey "$(COMPONENT)/binary-$(ARCHITECTURE)/Packages";
                ShortDescription "Packages";
                Description "$(SITE) $(RELEASE)/$(COMPONENT) $(ARCHITECTURE) Packages";
@@ -38,7 +38,7 @@ like this (see also apt.conf(5) manpage for configuration file syntax):
        };
 
 All files which should be downloaded (nicknamed 'Targets') are mentioned
-below the APT::Acquire::Targets scope. 'deb' is here the type of the
+below the Acquire::IndexTargets scope. 'deb' is here the type of the
 sources.list entry the file should be acquired for. The only other
 supported value is hence 'deb-src'. Beware: You can't specify multiple
 types here and you can't download the same (evaluated) MetaKey from
@@ -47,7 +47,7 @@ multiple types!
 After the type you can pick any valid and unique string which preferable
 refers to the file it downloads (In the example we picked 'Packages').
 This string is used as identifier for the target class and accessible as
-'Created-By' e.g. in the "apt-get files" output as detailed below.
+'Created-By' e.g. in the "apt-get indextargets" output as detailed below.
 
 All targets have three main properties you can define:
 * MetaKey: The identifier of the file to be downloaded as used in the
@@ -92,7 +92,7 @@ NO properties have to be set to enable this.
 The stanzas for Translation-* files as well as for Sources files would
 look like this:
 
-APT::Acquire::Targets {
+Acquire::IndexTargets {
        deb::Translations {
                MetaKey "$(COMPONENT)/i18n/Translation-$(LANGUAGE)";
                ShortDescription "Translation-$(LANGUAGE)";
@@ -152,7 +152,7 @@ design so multiple applications can download and use the same file
 rather than each and every one of them potentially downloads and uses
 its own copy somewhere on disk.
 
-"apt-get files" can be used to get the location as well as other
+"apt-get indextargets" can be used to get the location as well as other
 information about all files downloaded (aka: you will see Packages,
 Sources and Translation-* files here as well). Provide a line of the
 default output format as parameter to filter out all entries which do
@@ -161,12 +161,16 @@ own output style. The variables are what you see in the output, just all
 uppercase and wrapped in $(), as in the configuration file.
 
 To get all the filenames of all Translation-en files you can e.g. call:
-       apt-get files --format '$(FILENAME)' "Created-By: Translations" "Language: en"
+       apt-get indextargets --format '$(FILENAME)' "Created-By: Translations" "Language: en"
+
+The line-based filtering and the formating is rather crude and feature-
+less by design, so it is recommend to use dedicated and more powerful
+tools like 'grep-dctrl'.
 
 Accessing this information via libapt is done by reading the
 sources.lists (pkgSourceList), iterating over the metaIndex objects this
 creates and calling GetIndexTargets() on them. See the sourcecode of
-"apt-get files" for a complete example.
+"apt-get indextargets" for a complete example.
 
 Note that by default targets are not listed if they weren't downloaded.
 If you want to see all targets, you can use the --no-release-info, which
index b0fe390df848907238c0e13b3194addb9b8e79d5..81a9036c452a93b7cfc17c2ebccb0ba133aa062e 100644 (file)
        </listitem>
      </varlistentry>
 
-     <varlistentry><term><option>files</option></term>
+     <varlistentry><term><option>indextargets</option></term>
        <listitem><para>Displays by default a deb822 formatted listing of
-             information about all data files <command>apt-get
+             information about all data files (aka index targets) <command>apt-get
                 update</command> would download. Supports a
              <option>--format</option> option to modify the output format as
              well as accepts lines of the default output to filter the records
                   <term><option>--dry-run</option></term>
                   <term><option>--recon</option></term>
                   <term><option>--no-act</option></term>
-     <listitem><para>No action; perform a simulation of events that would occur but do not
-     actually change the system. 
-     Configuration Item: <literal>APT::Get::Simulate</literal>.</para>
-
-     <para>Simulated runs performed as a user will automatically deactivate locking
-     (<literal>Debug::NoLocking</literal>), and if the option
-     <literal>APT::Get::Show-User-Simulation-Note</literal> is set
-     (as it is by default) a notice will also be displayed indicating that
-     this is only a simulation. Runs performed as root do not trigger either
-     NoLocking or the notice - superusers should know what they are doing
-     without further warnings from <literal>apt-get</literal>.</para>
+     <listitem><para>No action; perform a simulation of events that would occur
+          based on the current system state but do not actually change the
+          system. Locking will be disabled (<option>Debug::NoLocking</option>)
+          so the system state could change while <command>apt-get</command> is
+          running. Simulations can also be executed by non-root users which might
+          not have read access to all apt configuration distorting the simulation.
+          A notice expressing this warning is also shown by default for non-root
+          users (<option>APT::Get::Show-User-Simulation-Note</option>).
+          Configuration Item: <literal>APT::Get::Simulate</literal>.</para>
 
      <para>Simulated runs print out a series of lines, each representing a <command>dpkg</command>
      operation: configure (<literal>Conf</literal>), remove (<literal>Remv</literal>)
index 12a7773f54e74922ee8f7c54870131fe758d8b5b..3bc8a94ac747de1a9e4e6ffcb6b3621c753301c4 100644 (file)
@@ -221,7 +221,7 @@ deb-src [ option1=value1 option2=value2 ] uri suite [component1] [component2] [.
                (<option>target</option>) is a multivalue option defining
                which download targets apt will try to acquire from this
                source. If not specified, the default set is defined by the
-               <option>APT::Acquire::Targets</option> configuration scope.
+               <option>Acquire::IndexTargets</option> configuration scope.
          </para></listitem>
        </itemizedlist>
 
index ad9cd6d7e76461be60813737101ee8b6f6a99414..d3cb46c14454776105f16f2379c7c33490c39434 100755 (executable)
@@ -43,7 +43,7 @@ tworepos() {
        testsuccess --nomsg aptget update -o Debug::pkgAcquire::Worker=1
        cp rootdir/tmp/testsuccess.output download.log
        #cat download.log
-       aptget files --format '$(FILENAME)' --no-release-info | sort > file.lst
+       aptget indextargets --format '$(FILENAME)' --no-release-info | sort > file.lst
        testequal "$(find $(readlink -f ./rootdir/var/lib/apt/lists) -name '*_dists_*' \( ! -name '*InRelease' \) -type f | sort)" cat file.lst
        testsuccess aptcache policy
        testequal "foo:
index fecdf30bfcb5115b390ab209d3922b6b65cbdbb0..ee7908a2d972102fd66c20e2dfebd565c1b60c88 100755 (executable)
@@ -30,18 +30,18 @@ Reading package lists..." aptget update
 testempty find rootdir/var/lib/apt/lists -name '*Contents*'
 
 cat > rootdir/etc/apt/apt.conf.d/content-target.conf <<EOF
-APT::Acquire::Targets::deb::Contents {
+Acquire::IndexTargets::deb::Contents {
        MetaKey "\$(COMPONENT)/Contents-\$(ARCHITECTURE)";
        ShortDescription "Contents";
-       Description "\$(SITE) \$(RELEASE)/\$(COMPONENT) \$(ARCHITECTURE) Contents";
+       Description "\$(RELEASE)/\$(COMPONENT) \$(ARCHITECTURE) Contents";
 };
 EOF
 
-testequal "$(readlink -f ./rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64)" aptget files --no-release-info --format '$(FILENAME)' 'Created-By: Contents'
-testempty aptget files --format '$(FILENAME)' 'Created-By: Contents'
+testequal "$(readlink -f ./rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64)" aptget indextargets --no-release-info --format '$(FILENAME)' 'Created-By: Contents'
+testempty aptget indextargets --format '$(FILENAME)' 'Created-By: Contents'
 # lets fake the existence of a compressed Contents file
 touch ./rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64.gz
-testequal "$(readlink -f ./rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64.gz)" aptget files --format '$(FILENAME)' 'Created-By: Contents'
+testequal "$(readlink -f ./rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64.gz)" aptget indextargets --format '$(FILENAME)' 'Created-By: Contents'
 
 testequal "'http://localhost:8080/dists/unstable/InRelease' localhost:8080_dists_unstable_InRelease 0 
 'http://localhost:8080/dists/unstable/main/source/Sources.bz2' localhost:8080_dists_unstable_main_source_Sources 0 
@@ -54,32 +54,32 @@ Get:2 http://localhost:8080 unstable/main amd64 Contents [$(stat -c%s aptarchive
 Reading package lists..." aptget update
 
 testequal 'rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64' find rootdir/var/lib/apt/lists -name '*Contents*'
-testequal "$(readlink -f ./rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64)" aptget files --format '$(FILENAME)' 'Created-By: Contents'
+testequal "$(readlink -f ./rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64)" aptget indextargets --format '$(FILENAME)' 'Created-By: Contents'
 testsuccess cmp 'rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64' 'aptarchive/dists/unstable/main/Contents-amd64'
 
 rm ./rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64
-testempty aptget files --format '$(FILENAME)' 'Created-By: Contents'
+testempty aptget indextargets --format '$(FILENAME)' 'Created-By: Contents'
 
 # if we asked for keeping it compressed, keep it
-echo 'APT::Acquire::Targets::deb::Contents::KeepCompressed "true";' >> rootdir/etc/apt/apt.conf.d/content-target.conf
+echo 'Acquire::IndexTargets::deb::Contents::KeepCompressed "true";' >> rootdir/etc/apt/apt.conf.d/content-target.conf
 testsuccessequal "Hit:1 http://localhost:8080 unstable InRelease
 Get:2 http://localhost:8080 unstable/main amd64 Contents [$(stat -c%s aptarchive/dists/unstable/main/Contents-amd64.gz) B]
 Reading package lists..." aptget update
 
 testequal 'rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64.gz' find rootdir/var/lib/apt/lists -name '*Contents*'
-testequal "$(readlink -f ./rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64.gz)" aptget files --format '$(FILENAME)' 'Created-By: Contents'
+testequal "$(readlink -f ./rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64.gz)" aptget indextargets --format '$(FILENAME)' 'Created-By: Contents'
 testsuccess cmp 'rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64.gz' 'aptarchive/dists/unstable/main/Contents-amd64.gz'
 
 rm ./rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64.gz
-testempty aptget files --format '$(FILENAME)' 'Created-By: Contents'
+testempty aptget indextargets --format '$(FILENAME)' 'Created-By: Contents'
 
 # and no automatic uncompress based on the name please,
 # only if we downloaded a compressed file, but target was uncompressed
 cat > rootdir/etc/apt/apt.conf.d/content-target.conf <<EOF
-APT::Acquire::Targets::deb::Contents {
+Acquire::IndexTargets::deb::Contents {
        MetaKey "\$(COMPONENT)/Contents-\$(ARCHITECTURE).gz";
        ShortDescription "Contents.gz";
-       Description "\$(SITE) \$(RELEASE)/\$(COMPONENT) \$(ARCHITECTURE) Contents.gz";
+       Description "\$(RELEASE)/\$(COMPONENT) \$(ARCHITECTURE) Contents.gz";
 };
 EOF
 
@@ -95,7 +95,7 @@ Get:2 http://localhost:8080 unstable/main amd64 Contents.gz [$(stat -c%s aptarch
 Reading package lists..." aptget update
 
 testequal 'rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64.gz' find rootdir/var/lib/apt/lists -name '*Contents*'
-testequal "$(readlink -f ./rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64.gz)" aptget files --format '$(FILENAME)' 'Created-By: Contents'
+testequal "$(readlink -f ./rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64.gz)" aptget indextargets --format '$(FILENAME)' 'Created-By: Contents'
 testsuccess cmp 'rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64.gz' 'aptarchive/dists/unstable/main/Contents-amd64.gz'
 
 rm -f rootdir/etc/apt/apt.conf.d/content-target.conf
index fcabf244ab1a85a472438b34750fcc48d4bfac22..bc8e6d3eaaba801abac61b8eb01fa8920903cf7c 100755 (executable)
@@ -35,7 +35,7 @@ testequal 'lock
 partial' ls rootdir/var/lib/apt/lists
 
 filesize() {
-       stat -c%s "$(aptget files --no-release-info --format '$(URI)' "Created-By: $1" | cut -d'/' -f 3- ).gz"
+       stat -c%s "$(aptget indextargets --no-release-info --format '$(URI)' "Created-By: $1" | cut -d'/' -f 3- ).gz"
 }
 # allow override
 #aptget update --allow-insecure-repositories -o Debug::pkgAcquire::worker=1
index 28d5f9e0655ed48ebd7313dad9d161a39a1a7229..c61d5a4ca7b0e60956187d8bd9f7dd70db2ef536 100755 (executable)
@@ -11,7 +11,7 @@ testlangs() {
        local LANGS="$2"
        shift 2
        rm -f gotlangs.list
-       aptget files --no-release-info 'Created-By: Translations' "$@" --format '$(LANGUAGE)' | sort -u > gotlangs.list
+       aptget indextargets --no-release-info 'Created-By: Translations' "$@" --format '$(LANGUAGE)' | sort -u > gotlangs.list
        if [ -z "$LANGS" ]; then
                echo -n | tr ',' '\n' | sort | checkdiff - gotlangs.list && msgpass || msgfail
        else
@@ -44,7 +44,7 @@ testlangs 'lang=de_DE' 'de_DE'
 
 echo 'deb [lang=none] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
 testlangs 'lang=none' ''
-testequal 'amd64' aptget files --no-release-info 'Created-By: Packages' --format '$(ARCHITECTURE)'
+testequal 'amd64' aptget indextargets --no-release-info 'Created-By: Packages' --format '$(ARCHITECTURE)'
 
 echo 'deb [lang+=pt] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
 testlangs 'lang+=pt' 'en,de,de_DE,pt'