Package Details: hunter 1.3.5-2

Git Clone URL: https://aur.archlinux.org/hunter.git (read-only, click to copy)
Package Base: hunter
Description: Ranger-like CLI file browser written in Rust
Upstream URL: https://github.com/rabite0/hunter
Keywords: cli file manager mc ranger
Licenses: custom:WTFPL
Provides: hunter
Submitter: flacks
Maintainer: ragouel
Last Packager: ragouel
Votes: 9
Popularity: 0.55
First Submitted: 2019-04-07 20:48
Last Updated: 2020-05-13 00:20

Dependencies (23)

Required by (0)

Sources (1)

Latest Comments

neowinx commented on 2021-03-22 04:16

Apparently the method remove_item has been removed in upstream versions of Rust. See:

I made a patch for version v1.3.5 that modifies the lines related to that change.

Feel free to try it.

fix_vector_remove_item.patch

Index: src/main.rs
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/main.rs b/src/main.rs
--- a/src/main.rs   (revision 7583e0a16e541a72cd87020414cdc53eddc958f6)
+++ b/src/main.rs   (date 1616384869756)
@@ -1,4 +1,3 @@
-#![feature(vec_remove_item)]
 #![feature(trivial_bounds)]
 #![feature(try_trait)]
 #![allow(dead_code)]
Index: src/files.rs
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/files.rs b/src/files.rs
--- a/src/files.rs  (revision 7583e0a16e541a72cd87020414cdc53eddc958f6)
+++ b/src/files.rs  (date 1616384854463)
@@ -517,7 +517,7 @@
     fn remove_placeholder(&mut self) {
         let dirpath = self.directory.path.clone();
         self.find_file_with_path(&dirpath).cloned()
-            .map(|placeholder| self.files.remove_item(&placeholder));
+            .map(|placeholder| self.files.remove(self.files.iter().position(|x| x.eq(&placeholder)).expect("needle not found")));
     }

     pub fn ready_to_refresh(&self) -> HResult<bool> {
@@ -1076,7 +1076,7 @@

         match new_state {
             true => TAGS.write()?.1.push(self.path.clone()),
-            false => { TAGS.write()?.1.remove_item(&self.path); },
+            false => { TAGS.write()?.1.remove(TAGS.write()?.1.iter().position(|x| x.eq( &self.path)).expect("needle not found")); },
         }
         self.save_tags()?;
         Ok(())

just create the file and then modify the build process in the PKGBUILD adding the patch process before the cargo build

The related code should go from this:

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  rustup override set nightly
  cargo build --release
}

to this:

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  rustup override set nightly
  patch -p1 < fix_vector_remove_item.patch
  cargo build --release
}

Hope this helps you somehow.

Regards.

neowinx

zsolt-donca commented on 2021-02-08 14:21

I cannot build this package, it fails with the below error. I am using yay. Can anyone help?

warning: unnecessary braces around block return value
  --> src/preview.rs:23:51
   |
23 |     static ref SUBPROC: Arc<Mutex<Option<u32>>> = { Arc::new(Mutex::new(None)) };
   |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these braces
   |
   = note: `#[warn(unused_braces)]` on by default

error[E0599]: no method named `remove_item` found for struct `Vec<files::File>` in the current scope
   --> src/files.rs:520:43
    |
520 |             .map(|placeholder| self.files.remove_item(&placeholder));
    |                                           ^^^^^^^^^^^ method not found in `Vec<files::File>`

error[E0599]: no method named `remove_item` found for struct `Vec<PathBuf>` in the current scope
    --> src/files.rs:1079:40
     |
1079 |             false => { TAGS.write()?.1.remove_item(&self.path); },
     |                                        ^^^^^^^^^^^ method not found in `Vec<PathBuf>`

error: aborting due to 2 previous errors; 1 warning emitted

For more information about this error, try `rustc --explain E0599`.
error: could not compile `hunter`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
==> ERROR: A failure occurred in build().
    Aborting...
error making: hunter

caleb commented on 2020-02-25 15:52

All of your AUR requests to delete other packages are invalid. Just because the stable packaging happens to be the latest after a release does not make VCS packages duplicates. *-git packages should remain for such a time as there are upsream developments that are not released yet.