Sfoglia il codice sorgente

rename 'apt-get files' to 'apt-get indextargets'

'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.
David Kalnischkies 11 anni fa
parent
commit
c2a4a8dded

+ 5 - 5
apt-pkg/deb/debmetaindex.cc

@@ -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))
 	    );

+ 17 - 17
apt-pkg/init.cc

@@ -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");

+ 3 - 3
apt-private/private-cmndline.cc

@@ -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

+ 5 - 5
cmdline/apt-get.cc

@@ -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}};

+ 11 - 7
doc/acquire-additional-files.txt

@@ -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

+ 11 - 13
doc/apt-get.8.xml

@@ -239,9 +239,9 @@
        </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
@@ -327,17 +327,15 @@
 		   <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>)

+ 1 - 1
doc/sources.list.5.xml

@@ -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>
 

+ 1 - 1
test/integration/test-acquire-same-repository-multiple-times

@@ -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:

+ 13 - 13
test/integration/test-apt-acquire-additional-files

@@ -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

+ 1 - 1
test/integration/test-apt-get-update-unauth-warning

@@ -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

+ 2 - 2
test/integration/test-sourceslist-lang-plusminus-options

@@ -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'