Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/usr/local/bin/pastebin lmde2 #27

Closed
orcus-de opened this issue Jul 8, 2017 · 3 comments
Closed

/usr/local/bin/pastebin lmde2 #27

orcus-de opened this issue Jul 8, 2017 · 3 comments

Comments

@orcus-de
Copy link

orcus-de commented Jul 8, 2017

[edit2:
pastebin "not working/broken" on lmde(2)
I found the real problem: pastebin on lmde(2) was originally located in
/usr/local/bin/pastebin
Due to updates/cleanups it's now located in:
/usr/bin/pastebin
As - in my lmde(2) environment at least - /usr/local/bin is searched prior to /usr/bin; thus the old outdated/broken version in /usr/local/bin is found first and used.
Renaming/removing the outdated version at /usr/local/bin solves the problems - as the current version in /usr/bin works as expected.
Thus I've to correct my statement: the update-process should enshure that older versions (of every software) originally located in /usr/local/bin get removed in case the newer version moves to /usr/bin.
Which should by made a general rule - I guess,

thx - orcus

leaving the original - now completly irrelevant - post as history]

It looks like lmde(2) : /usr/local/bin/pastebin was (re)moved from mintsystem to xapps (where it does not seem to have been "arrived") + there is a problem with the installed version (which does not get updated due ?? to that (re)move-al )

I've made a local fix regarding the call + url - the original call is left as a comment above.

The problem hit's every lmde2 user comming to #linuxmint-help channel @spotchat as /usr/local/bin/pastebin is heavily used to pipe inxi -output to pastebin/gist-paste ...
fix see - below..

[edit: for some reason the formatting of the code is lost after pasting it here - which wil break the python code structure - which will in turn make the snippet not runable :-( - if somebody tries to fix his local lmde(2) pastebin DO NOT COPY THE WHOLE SCRIPT just copy the relevant line below the comment and watch your indents at your local copy... ]

`
#!/usr/bin/python2

import sys, os, stat, subprocess

content = ""

mode = os.fstat(0).st_mode
if stat.S_ISFIFO(mode):
content = sys.stdin.read()
elif stat.S_ISREG(mode):
content = sys.stdin.read()
else:
args = sys.argv[1:]
if len(args) == 1 and os.path.exists(args[0]):
with open(args[0], 'r') as infile:
content = infile.read()
else:
str_args = ' '.join(args)
content = str_args

if content != "":
#p = subprocess.Popen(["/bin/nc", "paste.linuxmint.com", "9999"], stdin = subprocess.PIPE)
p = subprocess.Popen(["/usr/bin/gist-paste"], stdin=subprocess.PIPE)
p.communicate(content)
`

@xenopeek
Copy link

/usr/local/bin/pastebin comes from mintsystem package and uses the now shut down Linux Mint paste site. /usr/bin/pastebin comes from xapps-common package and uses the new GitHub paste site.
Upstream mintsystem is already patched. An update needs to be pushed to LMDE 2. I've mentioned this to the developers.

@monsta
Copy link

monsta commented Jul 10, 2017

Yes, it's fixed in mintsystem 8.3.2 (linuxmint/mintsystem@3c2696a).

The link to the code formatting guide is right below the field where you enter the comments.

https://guides.github.com/features/mastering-markdown/

@clefebvre
Copy link
Member

Fixed in 8.1.7.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants