-
-
Save CzBiX/e64256b23687bb13da02 to your computer and use it in GitHub Desktop.
#!/bin/bash | |
# Author: CzBiX | |
# URL: https://gist.github.com/CzBiX/e64256b23687bb13da02 | |
# Support only Ubuntu 16.04 | |
DEST_PACKAGE="libglib2.0-0" | |
DEST_VERSION="2.48.1-1~ubuntu16.04.1" | |
DEST_FILE="/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.4800.1" | |
PATCH_DATA="f626c: eb" | |
SUCCESS_MSG="Please quit nautilus with 'nautilus -q' to make sure patch worked." | |
function failed { | |
echo >&2 $1; | |
exit 1; | |
} | |
[ $(arch) == 'x86_64' ] || failed "only support x86_64." | |
type xxd >/dev/null 2>&1 || failed "xxd not found, please install vim." | |
[ $(apt-cache policy $DEST_PACKAGE | grep Installed | cut -d ' ' -f 4) == $DEST_VERSION ] || failed "$DEST_PACKAGE version not match with '$DEST_VERSION'." | |
echo $PATCH_DATA | sudo xxd -r - $DEST_FILE || failed "patch failed." | |
echo $SUCCESS_MSG |
@Sadi58 No, do NOT do it.
It's binary patch, and should be update in every time that package upgraded, even that's build from the same source code.
I will update it later.
Thanks for the patch. But could I please update to Xenial (at least once it's released)?
@Sadi58 @petersaints Just updated for Ubuntu 16.04. Please try it.
Hello, with Ubuntu 16.04.1 the package was updated to version 2.48.1-1-ubuntu16.04.1
So I guess I can't use your patch.
Any news from the devs ?
@CzBiX Can you update to 16.04.1? Nuts that this is still broken.
@CzBiX Never saw that you had updated to 16.04.1, but I updated to 16.10 hoping it was fixed and it's still broken. AARGH...
Unfortunately the problem has got worse in Ubuntu 16.10 with Nautilus 3.20.3: nothing can be moved to the "Rubbish Bin" anywhere (accessed directly or via symlink) in an NTFS partition on an internal hard disk now (the reason given for this is "Unable to find or create wastebasket directory" and manually creating such a directory leads to nothing) although no such problem exists for removable media such as USB hard disks.
I wish I knew how to compile libglib from source (https://launchpad.net/ubuntu/+source/glib2.0/2.50.0-1) excluding that patch apparently causing this annoying side effect: https://sources.debian.net/patches/glib2.0/2.50.1-1/0001-Fix-trashing-on-overlayfs.patch/
Maybe you can also include step-by-step instructions for this???
This worked on my install of 16.04.01. How can I make this change in code instead of using the binary patch?
@Sadi58 Sorry, but the steps are hard to teach if you are not developer.
@antonioshadji compile source without debian/patches/0001-Fix-trashing-on-overlayfs.patch
.
Thank you so much for this fix, but now that libglib2.0-0 version changed recently to '2.46.1-1' I wonder if it's OK to simply change the corresponding number in the variables DEST_VERSION and DEST_FILE or it also requires different PATCH_DATA.