diff options
author | Johnathan Jenkins | 2016-12-26 15:08:29 -0800 |
---|---|---|
committer | Johnathan Jenkins | 2016-12-26 15:08:29 -0800 |
commit | 243292d299565e4fb272ecb70b74a9a413a23f31 (patch) | |
tree | cd57a992f6a566f6c1ee8a99a122e048a9907e98 | |
parent | 22f6e03756f6f77ceec3a23df40caae082b0a3a2 (diff) | |
download | aur-243292d299565e4fb272ecb70b74a9a413a23f31.tar.gz |
fix md5
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | 53.patch | 164 | ||||
-rw-r--r-- | PKGBUILD | 5 |
3 files changed, 4 insertions, 170 deletions
@@ -1,8 +1,8 @@ # Generated by mksrcinfo v8 -# Mon Dec 26 23:06:14 UTC 2016 +# Mon Dec 26 23:08:16 UTC 2016 pkgbase = trash-cli-git pkgdesc = Command line trashcan (recycle bin) interface - pkgver = 457.468afec + pkgver = 591.36ae6da pkgrel = 1 url = http://github.com/andreafrancia/trash-cli arch = any @@ -13,7 +13,6 @@ pkgbase = trash-cli-git conflicts = trash-cli source = git+http://github.com/andreafrancia/trash-cli.git md5sums = SKIP - md5sums = 5f9f91c242c4c79de663e6481d226451 pkgname = trash-cli-git diff --git a/53.patch b/53.patch deleted file mode 100644 index 1fc5ae434df7..000000000000 --- a/53.patch +++ /dev/null @@ -1,164 +0,0 @@ -From c39f4e92433fb27b42b36c2747cff63b98b11ccb Mon Sep 17 00:00:00 2001 -From: Antony Lee <anntzer.lee@gmail.com> -Date: Tue, 16 Jun 2015 19:45:51 -0700 -Subject: [PATCH 1/2] Rely on Python to open/close files. - -Fixes #52. ---- - trashcli/list_mount_points.py | 31 ++++++++++++++----------------- - 1 file changed, 14 insertions(+), 17 deletions(-) - -diff --git a/trashcli/list_mount_points.py b/trashcli/list_mount_points.py -index 7f481f3..a26aef5 100644 ---- a/trashcli/list_mount_points.py -+++ b/trashcli/list_mount_points.py -@@ -27,8 +27,8 @@ def chomp(string): - yield line.split(None, 5)[-1] - - def _mounted_filesystems_from_getmnt() : -- from ctypes import Structure, c_char_p, c_int, c_void_p, cdll, POINTER -- from ctypes.util import find_library -+ from ctypes import ( -+ c_char_p, c_int, c_void_p, cdll, POINTER, pythonapi, Structure, util) - import sys - class Filesystem: - def __init__(self, mount_dir, type, name) : -@@ -49,26 +49,23 @@ class mntent_struct(Structure): - if sys.platform == "cygwin": - libc_name = "cygwin1.dll" - else: -- libc_name = find_library("c") -- -- if libc_name == None : -- libc_name="/lib/libc.so.6" # fix for my Gentoo 4.0 -- -+ libc_name = util.find_library("c") or "/lib/libc.so.6" # fix for my Gentoo 4.0 - libc = cdll.LoadLibrary(libc_name) - libc.getmntent.restype = POINTER(mntent_struct) -- libc.fopen.restype = c_void_p -+ PyFile_AsFile = pythonapi.PyFile_AsFile -+ PyFile_AsFile.argtypes = [pythonapi.py_object] - -- f = libc.fopen("/proc/mounts", "r") -- if f==None: -- f = libc.fopen("/etc/mtab", "r") -- if f == None: -+ try: -+ f = open("/proc/mounts") -+ except IOError: -+ try: -+ f = open("/etc/mtab") -+ except IOError: - raise IOError("Unable to open /proc/mounts nor /etc/mtab") - -- while True: -- entry = libc.getmntent(f) -- if bool(entry) == False: -- libc.fclose(f) -- break -+ for entry in iter(lambda: libc.getmntent(PyFile_AsFile(f)), None): - yield Filesystem(entry.contents.mnt_dir, - entry.contents.mnt_type, - entry.contents.mnt_fsname) -+ -+ f.close() - -From 8ab3c23f70eb2f373df7c588317b21211ea1b185 Mon Sep 17 00:00:00 2001 -From: Antony Lee <anntzer.lee@gmail.com> -Date: Wed, 24 Jun 2015 11:14:11 -0700 -Subject: [PATCH 2/2] Another fix that does not depend on pythonapi. - ---- - trashcli/list_mount_points.py | 47 +++++++++++++++++++++++-------------------- - 1 file changed, 25 insertions(+), 22 deletions(-) - -diff --git a/trashcli/list_mount_points.py b/trashcli/list_mount_points.py -index a26aef5..0d782bd 100644 ---- a/trashcli/list_mount_points.py -+++ b/trashcli/list_mount_points.py -@@ -1,4 +1,11 @@ - # Copyright (C) 2009-2011 Andrea Francia Trivolzio(PV) Italy -+from collections import namedtuple -+from ctypes import Structure, c_char_p, c_int, c_void_p, cdll, POINTER -+from ctypes.util import find_library -+from itertools import imap, repeat, takewhile -+import subprocess -+import sys -+ - - def mount_points(): - try: -@@ -6,15 +13,17 @@ def mount_points(): - except AttributeError: - return mount_points_from_df() - -+ - def mount_points_from_getmnt(): - for elem in _mounted_filesystems_from_getmnt(): - yield elem.mount_dir - -+ - def mount_points_from_df(): -- import subprocess - df_output = subprocess.Popen(["df", "-P"], stdout=subprocess.PIPE).stdout - return list(_mount_points_from_df_output(df_output)) - -+ - def _mount_points_from_df_output(df_output): - def skip_header(): - df_output.readline() -@@ -26,15 +35,11 @@ def chomp(string): - line = chomp(line) - yield line.split(None, 5)[-1] - -+ - def _mounted_filesystems_from_getmnt() : -- from ctypes import ( -- c_char_p, c_int, c_void_p, cdll, POINTER, pythonapi, Structure, util) -- import sys -- class Filesystem: -- def __init__(self, mount_dir, type, name) : -- self.mount_dir = mount_dir -- self.type = type -- self.name = name -+ -+ Filesystem = namedtuple("Filesystem", "mount_dir type name") -+ - class mntent_struct(Structure): - _fields_ = [("mnt_fsname", c_char_p), # Device or server for - # filesystem. -@@ -49,23 +54,21 @@ class mntent_struct(Structure): - if sys.platform == "cygwin": - libc_name = "cygwin1.dll" - else: -- libc_name = util.find_library("c") or "/lib/libc.so.6" # fix for my Gentoo 4.0 -+ libc_name = (find_library("c") or -+ find_library("/lib/libc.so.6")) # fix for Gentoo 4.0 -+ - libc = cdll.LoadLibrary(libc_name) -+ libc.fopen.restype = c_void_p -+ libc.getmntent.argtypes = libc.fclose.argtypes = [c_void_p] - libc.getmntent.restype = POINTER(mntent_struct) -- PyFile_AsFile = pythonapi.PyFile_AsFile -- PyFile_AsFile.argtypes = [pythonapi.py_object] - -- try: -- f = open("/proc/mounts") -- except IOError: -- try: -- f = open("/etc/mtab") -- except IOError: -- raise IOError("Unable to open /proc/mounts nor /etc/mtab") -- -- for entry in iter(lambda: libc.getmntent(PyFile_AsFile(f)), None): -+ f = libc.fopen("/proc/mounts", "r") or libc.fopen("/etc/mtab", "r") -+ if not f: -+ raise IOError("Unable to open /proc/mounts nor /etc/mtab") -+ -+ for entry in takewhile(bool, imap(libc.getmntent, repeat(f))): - yield Filesystem(entry.contents.mnt_dir, - entry.contents.mnt_type, - entry.contents.mnt_fsname) - -- f.close() -+ libc.fclose(f) @@ -4,7 +4,7 @@ pkgname=trash-cli-git _pkgname=trash-cli -pkgver=457.468afec +pkgver=591.36ae6da pkgrel=1 pkgdesc='Command line trashcan (recycle bin) interface' arch=('any') @@ -15,8 +15,7 @@ makedepends=('python2-setuptools') provides=('trash-cli') conflicts=('trash-cli') source=("git+http://github.com/andreafrancia/${_pkgname}.git") -md5sums=('SKIP' - '5f9f91c242c4c79de663e6481d226451') +md5sums=('SKIP') pkgver() { cd "${_pkgname}" |