Commit ba914695 authored by guinux's avatar guinux

v9.2.0beta2

parent 141099af
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Pamac\n"
"Report-Msgid-Bugs-To: guillaume@manjaro.org\n"
"POT-Creation-Date: 2019-11-02 15:00+0100\n"
"POT-Creation-Date: 2019-11-23 11:46+0100\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"
......@@ -711,6 +711,10 @@ msgid_plural "%u files"
msgstr[0] ""
msgstr[1] ""
#: src/preferences_dialog.vala
msgid "Choose Ignored Upgrades"
msgstr ""
#: src/transaction-cli.vala src/cli.vala
#, c-format
msgid "Enter a selection (default=%s)"
......@@ -910,16 +914,40 @@ msgid ""
"separating them with a comma"
msgstr ""
#: src/cli.vala
msgid "download all packages but do not install/upgrade anything"
msgstr ""
#: src/cli.vala
msgid "mark all packages installed as a dependency"
msgstr ""
#: src/cli.vala
msgid "mark all packages explicitly installed"
msgstr ""
#: src/cli.vala
msgid "do not check for updates"
msgstr ""
#: src/cli.vala
msgid "Reinstall packages"
msgstr ""
#: src/cli.vala
msgid "remove packages only if they are not required by any other packages"
msgstr ""
#: src/cli.vala
msgid ""
"remove dependencies that are not required by other packages, if this option "
"is used without package name remove all orphans"
msgstr ""
#: src/cli.vala
msgid "ignore files backup"
msgstr ""
#: src/cli.vala
msgid "Safely check for updates without modifiying the databases"
msgstr ""
......@@ -1033,6 +1061,13 @@ msgstr ""
msgid "%s is owned by %s"
msgstr ""
#: src/cli.vala
#, c-format
msgid "%u ignored update"
msgid_plural "%u ignored updates"
msgstr[0] ""
msgstr[1] ""
#: src/cli.vala resources/preferences_dialog.ui
msgid "Remove only the versions of uninstalled packages"
msgstr ""
......@@ -1159,33 +1194,55 @@ msgid "Reset build files"
msgstr ""
#: resources/preferences_dialog.ui
msgid "Remove unrequired dependencies"
msgid "Check for updates"
msgstr ""
#: resources/preferences_dialog.ui
msgid "Automatically download updates"
msgstr ""
#: resources/preferences_dialog.ui
msgid "Hide tray icon when no update available"
msgstr ""
#: resources/preferences_dialog.ui
msgid "General"
msgstr ""
#: resources/preferences_dialog.ui
msgid ""
"When removing a package, also remove its dependencies that are not required "
"by other packages"
"Bad configuration of those options can lead to system breakage.\n"
"Modify them only if you know what you are doing."
msgstr ""
#: resources/preferences_dialog.ui
msgid "Enable downgrade"
msgid "Check available disk space"
msgstr ""
#: resources/preferences_dialog.ui
msgid "Check for updates"
msgid "Remove unrequired dependencies"
msgstr ""
#: resources/preferences_dialog.ui
msgid "Automatically download updates"
msgid ""
"When removing a package, also remove its dependencies that are not required "
"by other packages"
msgstr ""
#: resources/preferences_dialog.ui
msgid "Hide tray icon when no update available"
msgid "Do not check for updates when installing"
msgstr ""
#: resources/preferences_dialog.ui
msgid "General"
msgid "Enable downgrade"
msgstr ""
#: resources/preferences_dialog.ui
msgid "Ignore upgrades for:"
msgstr ""
#: resources/preferences_dialog.ui
msgid "Advanced"
msgstr ""
#: resources/preferences_dialog.ui
......
......@@ -270,8 +270,14 @@ namespace Pamac {
}
internal bool clean_build_files (string aur_build_dir) {
string real_aur_build_dir;
if (aur_build_dir == "/var/tmp") {
real_aur_build_dir = Path.build_path ("/", aur_build_dir, "pamac-build-%s".printf (Environment.get_user_name ()));
} else {
real_aur_build_dir = Path.build_path ("/", aur_build_dir, "pamac-build");
}
try {
Process.spawn_command_line_sync ("rm -rf %s".printf (aur_build_dir));
Process.spawn_command_line_sync ("rm -rf %s".printf (real_aur_build_dir));
return true;
} catch (SpawnError e) {
critical ("SpawnError: %s\n", e.message);
......@@ -1996,20 +2002,20 @@ delegate void DownloadCallback (string filename, uint64 xfered, uint64 total);
void cb_multi_download (string filename, uint64 xfered, uint64 total) {
if (xfered == 0) {
string name_version_release = filename.slice (0, filename.last_index_of_char ('-'));
string? name_version_release = filename.slice (0, filename.last_index_of_char ('-'));
if (name_version_release == null) {
return;
}
string name_version = name_version_release.slice (0, name_version_release.last_index_of_char ('-'));
string? name_version = name_version_release.slice (0, name_version_release.last_index_of_char ('-'));
if (name_version == null) {
return;
}
int version_index = name_version.last_index_of_char ('-');
string name = name_version.slice (0, version_index);
string? name = name_version.slice (0, version_index);
if (name == null) {
return;
}
string version_release = name_version_release.slice (version_index + 1, name_version_release.length);
string? version_release = name_version_release.slice (version_index + 1, name_version_release.length);
if (version_release == null) {
return;
}
......@@ -2020,20 +2026,20 @@ void cb_multi_download (string filename, uint64 xfered, uint64 total) {
});
alpm_utils.emit_download (total_progress, total_download, true);
} else if (xfered == total) {
string name_version_release = filename.slice (0, filename.last_index_of_char ('-'));
string? name_version_release = filename.slice (0, filename.last_index_of_char ('-'));
if (name_version_release == null) {
return;
}
string name_version = name_version_release.slice (0, name_version_release.last_index_of_char ('-'));
string? name_version = name_version_release.slice (0, name_version_release.last_index_of_char ('-'));
if (name_version == null) {
return;
}
int version_index = name_version.last_index_of_char ('-');
string name = name_version.slice (0, version_index);
string? name = name_version.slice (0, version_index);
if (name == null) {
return;
}
string version_release = name_version_release.slice (version_index + 1, name_version_release.length);
string? version_release = name_version_release.slice (version_index + 1, name_version_release.length);
if (version_release == null) {
return;
}
......@@ -2052,20 +2058,20 @@ void cb_multi_download (string filename, uint64 xfered, uint64 total) {
void cb_download (string filename, uint64 xfered, uint64 total) {
if (xfered == 0) {
if (total_download > 0) {
string name_version_release = filename.slice (0, filename.last_index_of_char ('-'));
string? name_version_release = filename.slice (0, filename.last_index_of_char ('-'));
if (name_version_release == null) {
return;
}
string name_version = name_version_release.slice (0, name_version_release.last_index_of_char ('-'));
string? name_version = name_version_release.slice (0, name_version_release.last_index_of_char ('-'));
if (name_version == null) {
return;
}
int version_index = name_version.last_index_of_char ('-');
string name = name_version.slice (0, version_index);
string? name = name_version.slice (0, version_index);
if (name == null) {
return;
}
string version_release = name_version_release.slice (version_index + 1, name_version_release.length);
string? version_release = name_version_release.slice (version_index + 1, name_version_release.length);
if (version_release == null) {
return;
}
......
This diff is collapsed.
......@@ -173,17 +173,17 @@ namespace Pamac {
while ((info = enumerator.next_file (null)) != null) {
unowned string filename = info.get_name ();
string absolute_filename = "%s%s".printf (cachedir_name, filename);
string name_version_release = filename.slice (0, filename.last_index_of_char ('-'));
string? name_version_release = filename.slice (0, filename.last_index_of_char ('-'));
if (name_version_release == null) {
continue;
}
int release_index = name_version_release.last_index_of_char ('-');
string name_version = name_version_release.slice (0, release_index);
string? name_version = name_version_release.slice (0, release_index);
if (name_version == null) {
continue;
}
int version_index = name_version.last_index_of_char ('-');
string name = name_version.slice (0, version_index);
string? name = name_version.slice (0, version_index);
if (name == null) {
continue;
}
......@@ -198,7 +198,7 @@ namespace Pamac {
filenames.append (absolute_filename);
} else {
unowned SList<string> versions = pkg_versions.lookup (name);
string version_release = name_version_release.slice (version_index + 1, name_version_release.length);
string? version_release = name_version_release.slice (version_index + 1, name_version_release.length);
if (version_release == null) {
continue;
}
......@@ -209,7 +209,7 @@ namespace Pamac {
}
} else {
var versions = new SList<string> ();
string version_release = name_version_release.slice (version_index + 1, name_version_release.length);
string? version_release = name_version_release.slice (version_index + 1, name_version_release.length);
if (version_release == null) {
continue;
}
......@@ -280,8 +280,14 @@ namespace Pamac {
}
public HashTable<string, int64?> get_build_files_details () {
string real_aur_build_dir;
if (config.aur_build_dir == "/var/tmp") {
real_aur_build_dir = Path.build_path ("/", config.aur_build_dir, "pamac-build-%s".printf (Environment.get_user_name ()));
} else {
real_aur_build_dir = Path.build_path ("/", config.aur_build_dir, "pamac-build");
}
var filenames_size = new HashTable<string, int64?> (str_hash, str_equal);
enumerate_directory.begin (config.aur_build_dir, filenames_size, (obj, res) => {
enumerate_directory.begin (real_aur_build_dir, filenames_size, (obj, res) => {
loop.quit ();
});
loop.run ();
......@@ -1351,7 +1357,13 @@ namespace Pamac {
int status = 1;
string[] cmds;
var launcher = new SubprocessLauncher (SubprocessFlags.NONE);
var builddir = File.new_for_path (config.aur_build_dir);
string real_aur_build_dir;
if (config.aur_build_dir == "/var/tmp") {
real_aur_build_dir = Path.build_path ("/", config.aur_build_dir, "pamac-build-%s".printf (Environment.get_user_name ()));
} else {
real_aur_build_dir = Path.build_path ("/", config.aur_build_dir, "pamac-build");
}
var builddir = File.new_for_path (real_aur_build_dir);
if (!builddir.query_exists ()) {
try {
builddir.make_directory_with_parents ();
......@@ -1362,7 +1374,7 @@ namespace Pamac {
var pkgdir = builddir.get_child (pkgname);
if (pkgdir.query_exists ()) {
if (overwrite_files) {
launcher.set_cwd (config.aur_build_dir);
launcher.set_cwd (real_aur_build_dir);
cmds = {"rm", "-rf", "%s".printf (pkgdir.get_path ())};
launch_subprocess (launcher, cmds);
cmds = {"git", "clone", "-q", "--depth=1", "https://aur.archlinux.org/%s.git".printf (pkgname)};
......@@ -1420,14 +1432,14 @@ namespace Pamac {
if (status == 0) {
return pkgdir;
} else {
launcher.set_cwd (config.aur_build_dir);
launcher.set_cwd (real_aur_build_dir);
cmds = {"rm", "-rf", "%s".printf (pkgdir.get_path ())};
launch_subprocess (launcher, cmds);
cmds = {"git", "clone", "-q", "--depth=1", "https://aur.archlinux.org/%s.git".printf (pkgname)};
}
}
} else {
launcher.set_cwd (config.aur_build_dir);
launcher.set_cwd (real_aur_build_dir);
cmds = {"git", "clone", "-q", "--depth=1", "https://aur.archlinux.org/%s.git".printf (pkgname)};
}
status = launch_subprocess (launcher, cmds, cancellable);
......@@ -1450,7 +1462,12 @@ namespace Pamac {
}
bool regenerate_srcinfo_real (string pkgname, Cancellable? cancellable) {
string pkgdir_name = Path.build_path ("/", config.aur_build_dir, pkgname);
string pkgdir_name;
if (config.aur_build_dir == "/var/tmp") {
pkgdir_name = Path.build_path ("/", config.aur_build_dir, "pamac-build-%s".printf (Environment.get_user_name ()), pkgname);
} else {
pkgdir_name = Path.build_path ("/", config.aur_build_dir, "pamac-build", pkgname);
}
var srcinfo = File.new_for_path (Path.build_path ("/", pkgdir_name, ".SRCINFO"));
var pkgbuild = File.new_for_path (Path.build_path ("/", pkgdir_name, "PKGBUILD"));
if (srcinfo.query_exists ()) {
......@@ -1658,7 +1675,12 @@ namespace Pamac {
public string[] get_srcinfo_pkgnames (string pkgdir) {
string[] pkgnames = {};
var srcinfo = File.new_for_path (Path.build_path ("/", config.aur_build_dir, pkgdir, ".SRCINFO"));
File srcinfo;
if (config.aur_build_dir == "/var/tmp") {
srcinfo = File.new_for_path (Path.build_path ("/", config.aur_build_dir, "pamac-build-%s".printf (Environment.get_user_name ()), pkgdir, ".SRCINFO"));
} else {
srcinfo = File.new_for_path (Path.build_path ("/", config.aur_build_dir, "pamac-build", pkgdir, ".SRCINFO"));
}
if (srcinfo.query_exists ()) {
try {
// read .SRCINFO
......
......@@ -123,11 +123,6 @@ namespace Pamac {
clean_keep_num_pkgs = 3;
clean_rm_only_uninstalled = false;
parse_file (conf_path);
if (aur_build_dir == "/var/tmp") {
aur_build_dir = Path.build_path ("/", aur_build_dir, "pamac-build-%s".printf (Environment.get_user_name ()));
} else {
aur_build_dir = Path.build_path ("/", aur_build_dir, "pamac-build");
}
if (enable_aur == false) {
check_aur_updates = false;
check_aur_vcs_updates = false;
......
......@@ -55,11 +55,6 @@ namespace Pamac {
aur_build_dir = "/var/tmp";
max_parallel_downloads = 1;
parse_file (conf_path);
if (aur_build_dir == "/var/tmp") {
aur_build_dir = Path.build_path ("/", aur_build_dir, "pamac-build-%s".printf (Environment.get_user_name ()));
} else {
aur_build_dir = Path.build_path ("/", aur_build_dir, "pamac-build");
}
// limited max_parallel_downloads
if (max_parallel_downloads > 10) {
max_parallel_downloads = 10;
......
......@@ -555,7 +555,12 @@ namespace Pamac {
}
void ask_view_diff (string pkgname) {
string diff_path = Path.build_path ("/", database.config.aur_build_dir, pkgname, "diff");
string diff_path;
if (database.config.aur_build_dir == "/var/tmp") {
diff_path = Path.build_path ("/", database.config.aur_build_dir, "pamac-build-%s".printf (Environment.get_user_name ()), pkgname, "diff");
} else {
diff_path = Path.build_path ("/", database.config.aur_build_dir, "pamac-build", pkgname, "diff");
}
var diff_file = File.new_for_path (diff_path);
if (diff_file.query_exists ()) {
if (ask_user ("%s ?".printf (dgettext (null, "View %s build files diff").printf (pkgname)))) {
......
......@@ -585,7 +585,12 @@ namespace Pamac {
if ("PKGBUILD" in path) {
yield create_build_files_tab (path);
// add diff after PKGBUILD, do not failed if no diff
string diff_path = Path.build_path ("/", database.config.aur_build_dir, pkgname, "diff");
string diff_path;
if (database.config.aur_build_dir == "/var/tmp") {
diff_path = Path.build_path ("/", database.config.aur_build_dir, "pamac-build-%s".printf (Environment.get_user_name ()), pkgname, "diff");
} else {
diff_path = Path.build_path ("/", database.config.aur_build_dir, "pamac-build", pkgname, "diff");
}
var diff_file = File.new_for_path (diff_path);
if (diff_file.query_exists ()) {
yield create_build_files_tab (diff_path, false);
......@@ -606,8 +611,12 @@ namespace Pamac {
var scrolled_window = child as Gtk.ScrolledWindow;
var textview = scrolled_window.get_child () as Gtk.TextView;
if (textview.buffer.get_modified () == true) {
string pkgdir_name = Path.build_path ("/", database.config.aur_build_dir, pkgname);
string file_name = Path.build_path ("/", pkgdir_name, build_files_notebook.get_tab_label_text (child));
string file_name;
if (database.config.aur_build_dir == "/var/tmp") {
file_name = Path.build_path ("/", database.config.aur_build_dir, "pamac-build-%s".printf (Environment.get_user_name ()), pkgname, build_files_notebook.get_tab_label_text (child));
} else {
file_name = Path.build_path ("/", database.config.aur_build_dir, "pamac-build", pkgname, build_files_notebook.get_tab_label_text (child));
}
var file = File.new_for_path (file_name);
Gtk.TextIter start_iter;
Gtk.TextIter end_iter;
......
......@@ -143,7 +143,12 @@ namespace Pamac {
}
protected async SList<string> get_build_files (string pkgname) {
string pkgdir_name = Path.build_path ("/", database.config.aur_build_dir, pkgname);
string pkgdir_name;
if (database.config.aur_build_dir == "/var/tmp") {
pkgdir_name = Path.build_path ("/", database.config.aur_build_dir, "pamac-build-%s".printf (Environment.get_user_name ()), pkgname);
} else {
pkgdir_name = Path.build_path ("/", database.config.aur_build_dir, "pamac-build", pkgname);
}
var files = new SList<string> ();
// PKGBUILD
files.append (Path.build_path ("/", pkgdir_name, "PKGBUILD"));
......@@ -347,11 +352,17 @@ namespace Pamac {
}
already_checked_aur_dep.add (aur_pkg.packagebase);
} else {
clone_dir = File.new_for_path (Path.build_path ("/", database.config.aur_build_dir, pkgname));
string real_aur_build_dir;
if (database.config.aur_build_dir == "/var/tmp") {
real_aur_build_dir = Path.build_path ("/", database.config.aur_build_dir, "pamac-build-%s".printf (Environment.get_user_name ()));
} else {
real_aur_build_dir = Path.build_path ("/", database.config.aur_build_dir, "pamac-build");
}
clone_dir = File.new_for_path (Path.build_path ("/", real_aur_build_dir, pkgname));
if (!clone_dir.query_exists ()) {
// didn't find the target
// parse all builddir to be sure to find it
var builddir = File.new_for_path (database.config.aur_build_dir);
var builddir = File.new_for_path (real_aur_build_dir);
try {
FileEnumerator enumerator = yield builddir.enumerate_children_async ("standard::*", FileQueryInfoFlags.NONE);
FileInfo info;
......@@ -1025,7 +1036,12 @@ namespace Pamac {
emit_action (dgettext (null, "Building %s").printf (pkgname) + "...");
important_details_outpout (false);
var built_pkgs = new GenericSet<string?> (str_hash, str_equal);
string pkgdir = Path.build_path ("/", database.config.aur_build_dir, pkgname);
string pkgdir;
if (database.config.aur_build_dir == "/var/tmp") {
pkgdir = Path.build_path ("/", database.config.aur_build_dir, "pamac-build-%s".printf (Environment.get_user_name ()), pkgname);
} else {
pkgdir = Path.build_path ("/", database.config.aur_build_dir, "pamac-build", pkgname);
}
// building
building = true;
start_building ();
......@@ -1069,15 +1085,15 @@ namespace Pamac {
while (line != null) {
var file = GLib.File.new_for_path (line);
string filename = file.get_basename ();
string name_version_release = filename.slice (0, filename.last_index_of_char ('-'));
string? name_version_release = filename.slice (0, filename.last_index_of_char ('-'));
if (name_version_release == null) {
break;
}
string name_version = name_version_release.slice (0, name_version_release.last_index_of_char ('-'));
string? name_version = name_version_release.slice (0, name_version_release.last_index_of_char ('-'));
if (name_version == null) {
break;
}
string name = name_version.slice (0, name_version.last_index_of_char ('-'));
string? name = name_version.slice (0, name_version.last_index_of_char ('-'));
if (name == null) {
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment