Logo Search packages:      
Sourcecode: langupdate version File versions  Download package

gchar* lu_get_aptstring ( void   )

Collate the various apt options into a string.

Depending on various settings, the apt configuration list needs to be adjusted so it cannot be completely defined as a macro. This function adds the customisations, creates a newly allocated string and returns it. The caller is responsible for freeing the string.

Also sets the langupdate cache data to the same configuration if this has not been done already.

newly allocated string of apt options or NULL on error.

Collate the various apt options into a string.

Provides the main mechanism to separate the tdeb cache from the apt cache with support for the prefix.

Definition at line 146 of file langupdate.cc.

Referenced by apt_init(), and output().

      gchar * arch, * ret, * download;

      if (g_strcmp0(prefix, ""))
            // prefix in use, other options become available.
            // if user_arch is set, set arch and set unpack mode.
            arch = (user_arch) ? g_strdup(user_arch) : g_strdup(HOST_CPU);
            // if prefix is set, set download
            download = g_strdup (" -o APT::Get::Download-Only=true ");
            unpack_mode = true;
            download = g_strdup ("");
      arch = (user_arch and (g_strcmp0(prefix, "") != 0)) ? 
            g_strdup(user_arch) : g_strdup(HOST_CPU);
      ret = g_strconcat (" -o APT::Architecture=", arch, download,
            " -o APT::Get::List-Cleanup=off -o Apt::Install-Recommends=false "
            "-o Dir=", prefix, G_DIR_SEPARATOR_S, "/var/lib/"PACKAGE" ",
            "-o Dir::Etc=", prefix, G_DIR_SEPARATOR_S, "/var/lib/"PACKAGE" ",
            "-o Dir::Etc::SourceList=sources.list ",
            "-o Dir::State::Status=", prefix, G_DIR_SEPARATOR_S, 
            "/var/lib/"PACKAGE"/status ", "-o Dir::State=", suite_codename,
            " -o Dir::Cache=", suite_codename, NULL);
      g_free (arch);
      g_free (download);
      return ret;

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index