You are not logged in.
Hey guys, I just created a new pkgbuild for this guy, but every time I build the package, I get the following error:
Reversed (or previously applied) patch detected! Assume -R? [n]
I cannot figure out why this is the case and my google-fu is too weak to find an appropriate solution. Anyone know how to fix this?
Here are the contents of my PKGBUILD file:
pkgname=xpyb
pkgver=1.3.1
pkgrel=1
pkgdesc="X Python Binding, based on the XCB library"
url=http://xcb.freedesktop.org/
arch=('i686' 'x86_64')
license=('custom:public')
depends=('python2' 'libxcb')
options=(!libtool)
source=(http://xcb.freedesktop.org/dist/${pkgname}-${pkgver}.tar.bz2
64bit.patch)
md5sums=('b9b70746cd348836516edcba96d24677'
'c8874db6baf2fd6e3e82b8dad5fae4fe')
build() {
cd "$srcdir/$pkgname-$pkgver/src"
patch -p1 -i $srcdir/64bit.patch
cd ..
PYTHON=python2 ./configure --prefix=/usr
make
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" install
install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
}
And here's the patch:
diff -aur src/py_client.py src.old/py_client.py
--- src/py_client.py 2013-12-11 19:54:42.526201029 -0600
+++ src.previous/py_client.py 2013-12-11 19:52:51.392867067 -0600
@@ -19,7 +19,6 @@
'INT8': 'b', 'int8_t': 'b',
'INT16': 'h', 'int16_t': 'h',
'INT32': 'i', 'int32_t': 'i',
- 'INT64': 'i', 'int64_t': 'i',
'BYTE': 'B',
'BOOL': 'B',
'char': 'b',
It builds appropriately if you press "y," but I don't know how to get rid of it.
Thanks.
Last edited by Leios (2013-12-20 05:08:05)
Youtube: https://www.youtube.com/user/LeiosOS
Twitch: http://www.twitch.tv/simuleios
Offline
It's telling you that there's nothing to do; the patch was already applied upstream. Look at the source code for py_client.py:
_cardinal_types = {'CARD8': 'B', 'uint8_t': 'B',
'CARD16': 'H','uint16_t': 'H',
'CARD32': 'I','uint32_t': 'I',
'INT8': 'b', 'int8_t': 'b',
'INT16': 'h', 'int16_t': 'h',
'INT32': 'i', 'int32_t': 'i',
'BYTE': 'B',
'BOOL': 'B',
'char': 'b',
'void': 'B',
'float': 'f',
'double' : 'd'}
Last edited by skottish (2013-12-12 02:55:32)
Offline
Look at the source code and compare what it already states to what your patch is attempting to do. Perhaps the patch is unneeded / this has already been fixed upstream and you are attempting to change lines that have already been changed. That would explain the whole previously applied thing.
Edit: skottish beat me too it.
Last edited by dodo3773 (2013-12-12 02:56:59)
Offline
So, If I run the diff command on the two files after the patch is done:
22d21
< 'INT64': 'i', 'int64_t': 'i',
Without this patch, I receive this error
So far as I can see (correct me if I'm wrong), this patch is changing the file in a clear and necessary way.
Youtube: https://www.youtube.com/user/LeiosOS
Twitch: http://www.twitch.tv/simuleios
Offline
So, If I run the diff command on the two files after the patch is done:
22d21 < 'INT64': 'i', 'int64_t': 'i',
Without this patch, I receive this error
So far as I can see (correct me if I'm wrong), this patch is changing the file in a clear and necessary way.
Well in that case change your patch to only reflect that one line since it's the only one that still needs to be changed.
Edit: Nevermind I see now.
Last edited by dodo3773 (2013-12-12 03:21:34)
Offline
The weird thing is that this line is not in the upstream code:
'INT64': 'i', 'int64_t': 'i',
and that's what the patch is trying to remove.
**EDIT**
Your patch is wrong. You're attempting to subtract the line instead of add it.
Last edited by skottish (2013-12-12 03:21:52)
Offline
Yup. I just realized my problem... I need to ADD that. I mixed up the diff -aur command
Where I should have used:
diff -aur package.pristine package.new > package.patch
I used:
diff -aur package.new package.pristine > package.patch
Thanks for the help guys! I had been scratching my head on this one for hours.
Youtube: https://www.youtube.com/user/LeiosOS
Twitch: http://www.twitch.tv/simuleios
Offline