LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   On slack-current: /usr/bin/mtp-getfile -> /tmp/package-libmtp/usr/bin/mtp-connect ? (https://www.linuxquestions.org/questions/slackware-14/on-slack-current-usr-bin-mtp-getfile-tmp-package-libmtp-usr-bin-mtp-connect-805445/)

LuckyCyborg 05-02-2010 07:42 AM

On slack-current: /usr/bin/mtp-getfile -> /tmp/package-libmtp/usr/bin/mtp-connect ?
 
Yup! libMTP package (libmtp-1.0.1-i486-1.txz) is cabbage! Someone drank too much while building this package ... ;)

Can someone explain to me what Patrick wanted, actually?

T3slider 05-02-2010 06:01 PM

I don't know much about this but on 64_13.0 there are also symlinks to mtp-connect for multiple mtp utilities -- and they have all worked for me in the past when experimenting with console mtp transfers. Again I haven't looked into this and I know very little on the subject but there you go.

rworkman 05-03-2010 12:47 PM

Look at the build script and tell me how you reached the conclusion that someone drank too much while *building* the package.

Actually, the upstream Makefile does it wrong. Add this to the build script:

Code:

# Fixup some bad symlinking by the Makefile
( cd $PKG/usr/bin
  rm -f mtp-sendtr mtp-sendfile mtp-newfolder mtp-getfile mtp-delfile
  ln -s mtp-connect mtp-sendtr
  ln -s mtp-connect mtp-sendfile
  ln -s mtp-connect mtp-newfolder
  ln -s mtp-connect mtp-getfile
  ln -s mtp-connect mtp-delfile
)

I'm sure you'll have no problem figuring out where to add it since you feel qualified to determine whose fault it was.

LuckyCyborg 05-03-2010 01:13 PM

Quote:

Originally Posted by rworkman (Post 3955884)
Look at the build script and tell me how you reached the conclusion that someone drank too much while *building* the package.

Actually, the upstream Makefile does it wrong. Add this to the build script:

Code:

# Fixup some bad symlinking by the Makefile
( cd $PKG/usr/bin
  rm -f mtp-sendtr mtp-sendfile mtp-newfolder mtp-getfile mtp-delfile
  ln -s mtp-connect mtp-sendtr
  ln -s mtp-connect mtp-sendfile
  ln -s mtp-connect mtp-newfolder
  ln -s mtp-connect mtp-getfile
  ln -s mtp-connect mtp-delfile
)

I'm sure you'll have no problem figuring out where to add it since you feel qualified to determine whose fault it was.

Thanks,you are right! :) But I preffer to patch the build sources. :) Anyways, was a bug report. The current package in slackware-current is crappified...

How about a little patch like:

Code:

diff -urN libmtp-1.0.1.orig/examples/Makefile.am libmtp-1.0.1/examples/Makefile.am                                                         
--- libmtp-1.0.1.orig/examples/Makefile.am      2009-05-07 02:04:19.000000000 +0300                                                       
+++ libmtp-1.0.1/examples/Makefile.am  2010-05-03 21:02:33.744733358 +0300                                                               
@@ -27,8 +27,8 @@                                                                                                                         
 EXTRA_DIST=evolution-sync.sh                                                                                                             
.                                                                                                                                         
 install-exec-hook:                                                                                                                       
-      ln -f -s $(DESTDIR)$(bindir)/mtp-connect$(EXEEXT) $(DESTDIR)$(bindir)/mtp-delfile$(EXEEXT)                                         
-      ln -f -s $(DESTDIR)$(bindir)/mtp-connect$(EXEEXT) $(DESTDIR)$(bindir)/mtp-getfile$(EXEEXT)                                         
-      ln -f -s $(DESTDIR)$(bindir)/mtp-connect$(EXEEXT) $(DESTDIR)$(bindir)/mtp-newfolder$(EXEEXT)                                       
-      ln -f -s $(DESTDIR)$(bindir)/mtp-connect$(EXEEXT) $(DESTDIR)$(bindir)/mtp-sendfile$(EXEEXT)                                       
-      ln -f -s $(DESTDIR)$(bindir)/mtp-connect$(EXEEXT) $(DESTDIR)$(bindir)/mtp-sendtr$(EXEEXT)                                         
+      ln -f -s mtp-connect$(EXEEXT) $(DESTDIR)$(bindir)/mtp-delfile$(EXEEXT)                                                             
+      ln -f -s mtp-connect$(EXEEXT) $(DESTDIR)$(bindir)/mtp-getfile$(EXEEXT)                                                             
+      ln -f -s mtp-connect$(EXEEXT) $(DESTDIR)$(bindir)/mtp-newfolder$(EXEEXT)                                                           
+      ln -f -s mtp-connect$(EXEEXT) $(DESTDIR)$(bindir)/mtp-sendfile$(EXEEXT)                                                           
+      ln -f -s mtp-connect$(EXEEXT) $(DESTDIR)$(bindir)/mtp-sendtr$(EXEEXT)

and

Code:

--- libmtp.SlackBuild.orig      2010-04-10 23:30:04.000000000 +0300                                                                       
+++ libmtp.SlackBuild  2010-05-03 21:08:54.687770161 +0300                                                                               
@@ -62,6 +62,11 @@                                                                                                                         
 tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1                                                                                         
 cd ${PKGNAM}-$VERSION                                                                                                                     
.                                                                                                                                         
+# Fix examples/Makefile.am                                                                                                               
+zcat $CWD/${PKGNAM}-$VERSION.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit                                               
+                                                                                                                                         
+autoreconf                                                                                                                               
+                                                                                                                                         
 # Make sure ownerships and permissions are sane:                                                                                         
 chown -R root:root .                                                                                                                     
 find . \



All times are GMT -5. The time now is 12:04 PM.