You are not logged in.

#1 2021-05-21 08:43:53

jost21
Member
Registered: 2021-03-29
Posts: 6

[SOLVED] Current version of trash-cli

I've been using trash-cli (https://github.com/andreafrancia/trash-cli) for a long time now and it is a very useful tool.

I installed it via pacman since it is in the official community repo and I prefer that over installing it manually.

https://archlinux.org/packages/community/any/trash-cli/

However, there was quite some development done on trash-cli over the past months, and the version on github (0.21.5.20) and the arch repo (0.17.1.14, 7 versions earlier, flagged out-of-date on 2020-11-09) differ now.
I couldn't find any indication that it is in the testing branch either (although maybe I missed something, I'm not an expert on this).

The new version includes some good improvements and new features, so I am tempted to switch to an install via pip.


Is package still maintained in the repo, and is it worth waiting for an update there? I didn't see any commenting/discussion option on the package page (like for AUR packages), so I thought maybe I should ask here.

Last edited by jost21 (2021-05-25 09:36:13)

Offline

#2 2021-05-21 10:24:34

a821
Member
Registered: 2012-10-31
Posts: 394

Re: [SOLVED] Current version of trash-cli

The standard response is: when it is ready (question 6 https://bbs.archlinux.org/viewtopic.php?id=130138)

Please try first to update the PKGBUILD yourself. Also, maybe email the maintainer as it has been about 6 months (I think he is very active... maybe he forgot to update it).

Finally, I hope you did not run "sudo pip install trash-cli"

Offline

#3 2021-05-21 18:01:22

jost21
Member
Registered: 2021-03-29
Posts: 6

Re: [SOLVED] Current version of trash-cli

Thank you for your reply. I understand that it is ready "when it is ready" smile and I am not trying to be pushy. I was just wondering since most packages I use are usually not flagged out-of-date for that long.
I haven't really touched a PKGBUILD yet, not sure if that would be a good idea for me.

Is the "sudo" the problem? I was in fact thinking of running "pip install trash-cli", but I haven't yet. That's why I posted here.

I will email Eli Schwartz (or did you talk about Felix Yan?).

Offline

#4 2021-05-21 18:07:50

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,694

Re: [SOLVED] Current version of trash-cli

The problem with using pip / sudo is that you end up with files in the file system outside of /home of which Pacman is unaware, and cannot manage.
This creates issues later when you remove stuff (no way to cross check dependencies), or at the time of install by breaking dependencies with crossed up library versions, or later when trying to install using Pacman only to find a file in the file system that needs to be overwritten -- something at which Pacman will balk.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#5 2021-05-22 07:22:02

a821
Member
Registered: 2012-10-31
Posts: 394

Re: [SOLVED] Current version of trash-cli

This PKGBUILD builds in a clean chroot. I removed the patch as it seems the linked issue #95 is solved. The package is untested.

# Maintainer: Eli Schwartz <eschwartz@archlinux.org>
# Contributor: Pierre Neidhardt <ambrevar@gmail.com>
# Contributor: Renato Garcia <fgarcia.renato@gmail.com>

pkgname=trash-cli
pkgver=0.21.5.20
pkgrel=1
pkgdesc="Command line trashcan (recycle bin) interface"
arch=('any')
url="https://github.com/andreafrancia/${pkgname}"
license=('GPL')
depends=('python')
makedepends=('python-setuptools')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz")
sha256sums=('585b5bece43df6c9da16e26118bea3c6e0057fdc6c78c3f03530e8e2acc2e5b5')

build() {
    cd "${srcdir}"/${pkgname}-${pkgver}
    python setup.py build
}

package(){
    cd "${srcdir}"/${pkgname}-${pkgver}
    python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
}

diff

--- PKGBUILD.old	2021-05-22 09:09:16.201984224 +0200
+++ PKGBUILD	2021-05-22 09:10:46.315139129 +0200
@@ -3,24 +3,16 @@
 # Contributor: Renato Garcia <fgarcia.renato@gmail.com>
 
 pkgname=trash-cli
-pkgver=0.17.1.14
-pkgrel=6
+pkgver=0.21.5.20
+pkgrel=1
 pkgdesc="Command line trashcan (recycle bin) interface"
 arch=('any')
 url="https://github.com/andreafrancia/${pkgname}"
 license=('GPL')
 depends=('python')
 makedepends=('python-setuptools')
-source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz"
-        "0001-Use-py-bytes-to-interact-with-ctypes.patch::${url}/pull/115.patch")
-sha256sums=('8fdd20e5e9c55ea4e24677e602a06a94a93f1155f9970c55b25dede5e037b974'
-            '71c674d0c36fad172fd39c75052ac0de1a3f4739e13cffb8ed78148f11eda0a3')
-
-prepare() {
-    cd "${srcdir}"/${pkgname}-${pkgver}
-    # https://github.com/andreafrancia/trash-cli/issues/95
-    patch -p1 -i ../0001-Use-py-bytes-to-interact-with-ctypes.patch
-}
+source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz")
+sha256sums=('585b5bece43df6c9da16e26118bea3c6e0057fdc6c78c3f03530e8e2acc2e5b5')
 
 build() {
     cd "${srcdir}"/${pkgname}-${pkgver}

Offline

#6 2021-05-22 18:59:38

jost21
Member
Registered: 2021-03-29
Posts: 6

Re: [SOLVED] Current version of trash-cli

Thank you!!!!

I will try that

Offline

#7 2021-05-22 19:11:46

jost21
Member
Registered: 2021-03-29
Posts: 6

Re: [SOLVED] Current version of trash-cli

Worked smile

I put the file in its own directory and ran "makepkg", then installed "trash-cli-0.21.5.20-1-any.pkg.tar.zst" with pamac.

The version in pamac is now 0.21.5.20.

Will it be updated again once the version on the community repo is ahead of this one?

Offline

#8 2021-05-22 19:35:25

a821
Member
Registered: 2012-10-31
Posts: 394

Re: [SOLVED] Current version of trash-cli

jost21 wrote:

Will it be updated again once the version on the community repo is ahead of this one?

I don't know about pamac, but pacman will issue a warning that the local package is newer than the repos version. Eventually, the version in the repos will be newer than the local one and the package will be updated, so yes smile

Offline

#9 2021-05-23 08:58:41

jost21
Member
Registered: 2021-03-29
Posts: 6

Re: [SOLVED] Current version of trash-cli

Awesome smile Thank you so much for your help! I really appreciate it.

Not only did you help me with this issue, I also learned a lot.

Last edited by jost21 (2021-05-23 08:59:18)

Offline

#10 2021-05-23 12:03:43

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: [SOLVED] Current version of trash-cli

Please remember to mark your thread [SOLVED] (edit the title of your first post).

Offline

Board footer

Powered by FluxBB