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

static gchar* lu_parse_installed ( const gchar *  name,
const gchar *  src,
const gchar *  locale 
) [static]

Parses list of all installed packages.

Store a list of existing target packages by skipping those already installed.

namefull package name from dpkg status
srcsource package for name, from the apt cache
localethe locale the TDeb needs to supply.

Definition at line 312 of file langupdate.cc.

References lu_check_pkg_name().

Referenced by main().

      GList * match;
      gchar *target, * lang;

      if (!g_strcmp0 (locale, ""))
            return NULL;
      match = NULL;
      /* generate the full locale-lang suffix */
      lang = g_strconcat ("-", LOCALE_SUFFIX, "-", locale, NULL);
      target = g_strconcat (src, lang, NULL);
      if ((g_str_has_suffix (name, lang)) or 
            (!g_strcmp0(target, name)))
            /* pkg is already a suitable locale package, skip it. */
            installed = g_list_prepend (installed, target);
            /* in case the target occurs later in the list */
            targets = g_list_remove (targets, target);
            return NULL;
      match = g_list_find_custom (installed, target, lu_check_pkg_name);
      if (g_list_length (match) != 0)
            targets = g_list_prepend (targets, target);
      g_free (lang);
      return target;

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index